====== WvdS.System.Security.Cryptography.X509Certificates Namespace ====== Contains extension methods for X.509 certificate operations with PQ support. ---- ===== Classes ===== ^ Class ^ Description ^ | [[.:certificaterequestextensions|CertificateRequestExtensions]] | Extensions for ''CertificateRequest'' | | [[.:x509certificate2extensions|X509Certificate2Extensions]] | Extensions for ''X509Certificate2'' | | [[.:x509chainextensions|X509ChainExtensions]] | Extensions for ''X509Chain'' | | [[.:x509certificate2exportextensions|X509Certificate2ExportExtensions]] | PFX export/import with PQ keys | | [[.:x509storeextensions|X509StoreExtensions]] | Store operations with PQ key persistence | | [[.:certificaterevocationlistextensions|CertificateRevocationListExtensions]] | CRL creation with PQ signatures | | [[.:revocationextensions|RevocationExtensions]] | Revocation checking (CRL/OCSP) | | [[.:truststoreextensions|TrustStoreExtensions & PqTrustStore]] | Custom trust store management | ---- ===== Extended Types ===== These classes extend the following .NET types: ^ .NET Type ^ Extension Class ^ | ''System.Security.Cryptography.X509Certificates.CertificateRequest''((Microsoft Docs: https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.certificaterequest)) | CertificateRequestExtensions | | ''System.Security.Cryptography.X509Certificates.X509Certificate2''((Microsoft Docs: https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)) | X509Certificate2Extensions, RevocationExtensions | | ''System.Security.Cryptography.X509Certificates.X509Chain''((Microsoft Docs: https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509chain)) | X509ChainExtensions | | ''System.Security.Cryptography.X509Certificates.X509Store''((Microsoft Docs: https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509store)) | X509StoreExtensions | | ''System.Security.Cryptography.X509Certificates.CertificateRevocationListBuilder''((Microsoft Docs: https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.certificaterevocationlistbuilder)) | CertificateRevocationListExtensions | ---- ===== Example ===== using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using WvdS.System.Security.Cryptography; using WvdS.System.Security.Cryptography.X509Certificates; CryptoConfig.DefaultMode = CryptoMode.Hybrid; using var rsa = RSA.Create(2048); var request = new CertificateRequest("CN=Test", rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); // Extension method is used automatically var cert = request.CreateSelfSigned( DateTimeOffset.Now, DateTimeOffset.Now.AddYears(1)); // Check PQ status bool hasPq = cert.HasPqSignature(); // true ---- ===== See Also ===== * [[..:start|Root Namespace]] * [[..:signatures:start|Signatures Namespace]] * [[en:int:pqcrypt:api:start|API Overview]] {{tag>namespace x509 certificates}} ---- //Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//