|
Dieser Artikel wurde maschinell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen. Weitere Informationen
|
Übersetzung
Original
|
X509Certificate-Konstruktor (Byte[])
Namespace: System.Security.Cryptography.X509Certificates
Assembly: mscorlib (in mscorlib.dll)
Parameter
- data
- Typ: System.Byte[]
Ein Bytearray mit Daten aus einem X.509-Zertifikat.
| Ausnahme | Bedingung |
|---|---|
| CryptographicException |
|
| ArgumentException |
using System; using System.Security.Cryptography.X509Certificates; public class X509 { public static void Main() { // The path to the certificate. string Certificate = "test.pfx"; // Load the certificate into an X509Certificate object. X509Certificate cert = new X509Certificate(Certificate); byte[] certData = cert.Export(X509ContentType.Cert); X509Certificate newCert = new X509Certificate(certData); // Get the value. string resultsTrue = newCert.ToString(true); // Display the value to the console. Console.WriteLine(resultsTrue); // Get the value. string resultsFalse = newCert.ToString(false); // Display the value to the console. Console.WriteLine(resultsFalse); } }
- KeyContainerPermission
für die Berechtigung zum Erstellen eines Schlüsselcontainers. Sicherheitsaktion: Demand. Zugeordnete Enumeration: KeyContainerPermissionFlags.Create.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core-Rolle wird nicht unterstützt), Windows Server 2008 R2 (Server Core-Rolle wird mit SP1 oder höher unterstützt; Itanium wird nicht unterstützt)
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.