summaryrefslogtreecommitdiffstats
path: root/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
diff options
context:
space:
mode:
Diffstat (limited to 'bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java')
-rw-r--r--bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java b/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
index 52d5bcf..1081d93 100644
--- a/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
+++ b/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
@@ -109,6 +109,16 @@ public class X509CertificateHolder
}
/**
+ * Return the extensions block associated with this certificate if there is one.
+ *
+ * @return the extensions block, null otherwise.
+ */
+ public Extensions getExtensions()
+ {
+ return extensions;
+ }
+
+ /**
* Returns a list of ASN1ObjectIdentifier objects representing the OIDs of the
* extensions contained in this holder's certificate.
*
@@ -254,7 +264,7 @@ public class X509CertificateHolder
{
TBSCertificate tbsCert = x509Certificate.getTBSCertificate();
- if (!tbsCert.getSignature().equals(x509Certificate.getSignatureAlgorithm()))
+ if (!CertUtils.isAlgIdEqual(tbsCert.getSignature(), x509Certificate.getSignatureAlgorithm()))
{
throw new CertException("signature invalid - algorithm identifier mismatch");
}