summary refs log tree commit diff
path: root/crypto/src/x509
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/x509')
-rw-r--r--crypto/src/x509/X509Certificate.cs8
-rw-r--r--crypto/src/x509/X509Crl.cs15
2 files changed, 18 insertions, 5 deletions
diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs
index 4f4f1e991..985ec0aeb 100644
--- a/crypto/src/x509/X509Certificate.cs
+++ b/crypto/src/x509/X509Certificate.cs
@@ -73,8 +73,12 @@ namespace Org.BouncyCastle.X509
         {
         }
 
-        public X509Certificate(
-            X509CertificateStructure c)
+        public X509Certificate(byte[] certData)
+            : this(X509CertificateStructure.GetInstance(certData))
+        {
+        }
+
+        public X509Certificate(X509CertificateStructure c)
         {
             this.c = c;
 
diff --git a/crypto/src/x509/X509Crl.cs b/crypto/src/x509/X509Crl.cs
index a5aabf974..9acebf2dd 100644
--- a/crypto/src/x509/X509Crl.cs
+++ b/crypto/src/x509/X509Crl.cs
@@ -71,8 +71,12 @@ namespace Org.BouncyCastle.X509
         private volatile bool hashValueSet;
         private volatile int hashValue;
 
-		public X509Crl(
-			CertificateList c)
+        public X509Crl(byte[] encoding)
+            : this(CertificateList.GetInstance(encoding))
+        {
+        }
+
+        public X509Crl(CertificateList c)
 		{
 			this.c = c;
 
@@ -91,7 +95,12 @@ namespace Org.BouncyCastle.X509
 			}
 		}
 
-		protected override X509Extensions GetX509Extensions()
+        public virtual CertificateList CertificateList
+        {
+            get { return c; }
+        }
+
+        protected override X509Extensions GetX509Extensions()
 		{
 			return c.Version >= 2
 				?	c.TbsCertList.Extensions