From 3e5ab53725678c662b5d351fb4a9bc2d3c5d8822 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 30 Jul 2023 13:48:59 +0700 Subject: Add extra properties on X509Certificate --- crypto/src/x509/PrincipalUtil.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'crypto/src/x509/PrincipalUtil.cs') diff --git a/crypto/src/x509/PrincipalUtil.cs b/crypto/src/x509/PrincipalUtil.cs index 733da1dca..fb1b01b40 100644 --- a/crypto/src/x509/PrincipalUtil.cs +++ b/crypto/src/x509/PrincipalUtil.cs @@ -1,9 +1,4 @@ -using System; -using System.IO; - -using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.X509; -using Org.BouncyCastle.Security.Certificates; namespace Org.BouncyCastle.X509 { @@ -20,13 +15,13 @@ namespace Org.BouncyCastle.X509 /// Return the issuer of the given cert as an X509Principal. public static X509Name GetIssuerX509Principal(X509Certificate cert) { - return cert.CertificateStructure.TbsCertificate.Issuer; + return cert.TbsCertificate.Issuer; } /// Return the subject of the given cert as an X509Principal. public static X509Name GetSubjectX509Principal(X509Certificate cert) { - return cert.CertificateStructure.TbsCertificate.Subject; + return cert.TbsCertificate.Subject; } /// Return the issuer of the given CRL as an X509Principal. -- cgit 1.4.1