====== X509Certificate2Extensions Klasse ======
Stellt Extension Methods für ''X509Certificate2'' mit PQ-Unterstützung bereit.
----
===== Definition =====
namespace WvdS.System.Security.Cryptography.X509Certificates
public static class X509Certificate2Extensions
----
===== Methoden =====
^ Name ^ Beschreibung ^
| [[.:x509certificate2extensions-copywithprivatekey|CopyWithPrivateKey(RSA, CryptoMode?)]] | Kopiert Zertifikat mit RSA Private Key und optionalem PQ-Key |
| [[.:x509certificate2extensions-copywithprivatekey-ecdsa|CopyWithPrivateKey(ECDsa, CryptoMode?)]] | Kopiert Zertifikat mit ECDsa Private Key und optionalem PQ-Key |
| [[.:x509certificate2extensions-haspqsignature|HasPqSignature()]] | Prüft ob PQ-Signatur-Extension vorhanden |
| [[.:x509certificate2extensions-getcryptomode|GetCryptoMode()]] | Ermittelt den Krypto-Modus des Zertifikats |
| [[.:x509certificate2extensions-getsignaturealgorithmdescription|GetSignatureAlgorithmDescription()]] | Gibt lesbare Algorithmus-Beschreibung zurück |
----
===== Hinweise =====
Diese Extension-Klasse erweitert ''System.Security.Cryptography.X509Certificates.X509Certificate2''((Microsoft Docs: https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)).
----
===== Beispiel =====
using WvdS.System.Security.Cryptography.X509Certificates;
var cert = new X509Certificate2("server.pfx", "password");
// PQ-Status prüfen
if (cert.HasPqSignature())
{
Console.WriteLine($"Modus: {cert.GetCryptoMode()}");
Console.WriteLine($"Algorithmus: {cert.GetSignatureAlgorithmDescription()}");
// Ausgabe: "RSA2048 + ML-DSA-65 (Hybrid)"
}
----
===== Siehe auch =====
* [[.:start|X509Certificates Namespace]]
* [[.:certificaterequestextensions|CertificateRequestExtensions]]
* [[.:x509chainextensions|X509ChainExtensions]]
{{tag>klasse extension static}}
----
//Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//