From 9f562ae2423c550b95b3e00e6bcbeb6616b2a034 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 21 Feb 2020 18:06:14 +0700 Subject: Refactoring --- crypto/src/x509/X509Certificate.cs | 6 +++--- crypto/src/x509/X509CrlEntry.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/src/x509') diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index fd156e487..d8d97ec5e 100644 --- a/crypto/src/x509/X509Certificate.cs +++ b/crypto/src/x509/X509Certificate.cs @@ -515,9 +515,9 @@ namespace Org.BouncyCastle.X509 if (ext.Value != null) { - byte[] octs = ext.Value.GetOctets(); - Asn1Object obj = Asn1Object.FromByteArray(octs); - buf.Append(" critical(").Append(ext.IsCritical).Append(") "); + Asn1Object obj = X509ExtensionUtilities.FromExtensionValue(ext.Value); + + buf.Append(" critical(").Append(ext.IsCritical).Append(") "); try { if (oid.Equals(X509Extensions.BasicConstraints)) diff --git a/crypto/src/x509/X509CrlEntry.cs b/crypto/src/x509/X509CrlEntry.cs index 9e3608c18..9660a7099 100644 --- a/crypto/src/x509/X509CrlEntry.cs +++ b/crypto/src/x509/X509CrlEntry.cs @@ -188,7 +188,7 @@ namespace Org.BouncyCastle.X509 if (ext.Value != null) { - Asn1Object obj = Asn1Object.FromByteArray(ext.Value.GetOctets()); + Asn1Object obj = X509ExtensionUtilities.FromExtensionValue(ext.Value); buf.Append(" critical(") .Append(ext.IsCritical) -- cgit 1.4.1