summary refs log tree commit diff
path: root/crypto/src/asn1/cmp
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cmp')
-rw-r--r--crypto/src/asn1/cmp/RevDetails.cs25
1 files changed, 12 insertions, 13 deletions
diff --git a/crypto/src/asn1/cmp/RevDetails.cs b/crypto/src/asn1/cmp/RevDetails.cs
index 1bd95f1db..6bdf5b2e9 100644
--- a/crypto/src/asn1/cmp/RevDetails.cs
+++ b/crypto/src/asn1/cmp/RevDetails.cs
@@ -11,17 +11,15 @@ namespace Org.BouncyCastle.Asn1.Cmp
 		private readonly CertTemplate certDetails;
 		private readonly X509Extensions crlEntryDetails;
 
-		private RevDetails(Asn1Sequence seq)
+        private RevDetails(Asn1Sequence seq)
 		{
 			certDetails = CertTemplate.GetInstance(seq[0]);
-
-			if  (seq.Count > 1)
-			{
-				crlEntryDetails = X509Extensions.GetInstance(seq[1]);
-			}
+            crlEntryDetails = seq.Count <= 1
+                ?   null
+                :   X509Extensions.GetInstance(seq[1]);
 		}
 
-		public static RevDetails GetInstance(object obj)
+        public static RevDetails GetInstance(object obj)
 		{
 			if (obj is RevDetails)
 				return (RevDetails)obj;
@@ -33,21 +31,22 @@ namespace Org.BouncyCastle.Asn1.Cmp
 		}
 
 		public RevDetails(CertTemplate certDetails)
+            :   this(certDetails, null)
 		{
-			this.certDetails = certDetails;
 		}
-		
-		public RevDetails(CertTemplate certDetails, X509Extensions crlEntryDetails)
+
+        public RevDetails(CertTemplate certDetails, X509Extensions crlEntryDetails)
 		{
-			this.crlEntryDetails = crlEntryDetails;
+            this.certDetails = certDetails;
+            this.crlEntryDetails = crlEntryDetails;
 		}
 
-		public virtual CertTemplate CertDetails
+        public virtual CertTemplate CertDetails
 		{
 			get { return certDetails; }
 		}
 
-		public virtual X509Extensions CrlEntryDetails
+        public virtual X509Extensions CrlEntryDetails
 		{
 			get { return crlEntryDetails; }
 		}