summary refs log tree commit diff
path: root/crypto/src/x509/X509Crl.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-04-05 13:58:29 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-04-05 13:58:29 +0700
commita50f22c7ecc8d6a238b9bb5ca9d8f453d5f00e3c (patch)
tree3ce1d940538d5a738766d96f1f93cb205461b95e /crypto/src/x509/X509Crl.cs
parentFix bad MAC padding length calculation (diff)
downloadBouncyCastle.NET-ed25519-a50f22c7ecc8d6a238b9bb5ca9d8f453d5f00e3c.tar.xz
Improve SigAlgName for certs/CRLs
Diffstat (limited to 'crypto/src/x509/X509Crl.cs')
-rw-r--r--crypto/src/x509/X509Crl.cs12
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/src/x509/X509Crl.cs b/crypto/src/x509/X509Crl.cs
index 8903e69d0..7b841599f 100644
--- a/crypto/src/x509/X509Crl.cs
+++ b/crypto/src/x509/X509Crl.cs
@@ -48,16 +48,10 @@ namespace Org.BouncyCastle.X509
 			{
 				this.sigAlgName = X509SignatureUtilities.GetSignatureName(c.SignatureAlgorithm);
 
-				if (c.SignatureAlgorithm.Parameters != null)
-				{
-					this.sigAlgParams = ((Asn1Encodable)c.SignatureAlgorithm.Parameters).GetDerEncoded();
-				}
-				else
-				{
-					this.sigAlgParams = null;
-				}
+                Asn1Encodable parameters = c.SignatureAlgorithm.Parameters;
+                this.sigAlgParams = (null == parameters) ? null : parameters.GetEncoded(Asn1Encodable.Der);
 
-				this.isIndirect = IsIndirectCrl;
+                this.isIndirect = IsIndirectCrl;
 			}
 			catch (Exception e)
 			{