From 32c9881dae69931c1c5a175d596768d7bdfafbc2 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 6 Mar 2023 17:35:46 +0700 Subject: Avoid recoding issuer name --- crypto/src/pkix/Rfc3280CertPathUtilities.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'crypto') diff --git a/crypto/src/pkix/Rfc3280CertPathUtilities.cs b/crypto/src/pkix/Rfc3280CertPathUtilities.cs index 5a13ccd1d..b2d47c0f1 100644 --- a/crypto/src/pkix/Rfc3280CertPathUtilities.cs +++ b/crypto/src/pkix/Rfc3280CertPathUtilities.cs @@ -1105,17 +1105,8 @@ namespace Org.BouncyCastle.Pkix * omitted and a distribution point name of the certificate * issuer. */ - X509Name issuer; - try - { - issuer = X509Name.GetInstance(cert.IssuerDN.GetEncoded()); - } - catch (Exception e) - { - throw new Exception("Issuer from certificate for CRL could not be reencoded.", e); - } DistributionPoint dp = new DistributionPoint(new DistributionPointName(0, new GeneralNames( - new GeneralName(GeneralName.DirectoryName, issuer))), null, null); + new GeneralName(GeneralName.DirectoryName, cert.IssuerDN))), null, null); PkixParameters paramsPKIXClone = (PkixParameters)paramsPKIX.Clone(); CheckCrl(dp, paramsPKIXClone, cert, validDate, sign, workingPublicKey, certStatus, reasonsMask, -- cgit 1.4.1