summaryrefslogtreecommitdiffstats
path: root/bcpkix/src/main/java/org/bouncycastle/cert
diff options
context:
space:
mode:
authorSergio Giro <sgiro@google.com>2015-04-21 23:20:25 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-21 23:20:25 +0000
commit7f729f07947047c1ceaad8a78febacd1269a62b3 (patch)
tree35d98bf60cbe7a6487bd0014728eb263e89004bb /bcpkix/src/main/java/org/bouncycastle/cert
parentbf9fc13901d0666be69118222a1eb0161202af5f (diff)
parentfb93a7697b35e8a059d93e3d1776bc307981fc0e (diff)
downloadandroid_external_bouncycastle-7f729f07947047c1ceaad8a78febacd1269a62b3.tar.gz
android_external_bouncycastle-7f729f07947047c1ceaad8a78febacd1269a62b3.tar.bz2
android_external_bouncycastle-7f729f07947047c1ceaad8a78febacd1269a62b3.zip
am fb93a769: Merge "bouncycastle: upgrade to version 1.52"
* commit 'fb93a7697b35e8a059d93e3d1776bc307981fc0e': bouncycastle: upgrade to version 1.52
Diffstat (limited to 'bcpkix/src/main/java/org/bouncycastle/cert')
-rw-r--r--bcpkix/src/main/java/org/bouncycastle/cert/AttributeCertificateHolder.java18
-rw-r--r--bcpkix/src/main/java/org/bouncycastle/cert/X509AttributeCertificateHolder.java2
-rw-r--r--bcpkix/src/main/java/org/bouncycastle/cert/X509CRLHolder.java2
-rw-r--r--bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java4
4 files changed, 24 insertions, 2 deletions
diff --git a/bcpkix/src/main/java/org/bouncycastle/cert/AttributeCertificateHolder.java b/bcpkix/src/main/java/org/bouncycastle/cert/AttributeCertificateHolder.java
index 074d3fc..0fc3433 100644
--- a/bcpkix/src/main/java/org/bouncycastle/cert/AttributeCertificateHolder.java
+++ b/bcpkix/src/main/java/org/bouncycastle/cert/AttributeCertificateHolder.java
@@ -53,20 +53,36 @@ public class AttributeCertificateHolder
holder = Holder.getInstance(seq);
}
+ /**
+ * Create a holder using the baseCertificateID element.
+ *
+ * @param issuerName name of associated certificate's issuer.
+ * @param serialNumber serial number of associated certificate.
+ */
public AttributeCertificateHolder(X500Name issuerName,
BigInteger serialNumber)
{
holder = new Holder(new IssuerSerial(
- new GeneralNames(new GeneralName(issuerName)),
+ generateGeneralNames(issuerName),
new ASN1Integer(serialNumber)));
}
+ /**
+ * Create a holder using the baseCertificateID option based on the passed in associated certificate,
+ *
+ * @param cert the certificate to be associated with this holder.
+ */
public AttributeCertificateHolder(X509CertificateHolder cert)
{
holder = new Holder(new IssuerSerial(generateGeneralNames(cert.getIssuer()),
new ASN1Integer(cert.getSerialNumber())));
}
+ /**
+ * Create a holder using the entityName option based on the passed in principal.
+ *
+ * @param principal the entityName to be associated with the attribute certificate.
+ */
public AttributeCertificateHolder(X500Name principal)
{
holder = new Holder(generateGeneralNames(principal));
diff --git a/bcpkix/src/main/java/org/bouncycastle/cert/X509AttributeCertificateHolder.java b/bcpkix/src/main/java/org/bouncycastle/cert/X509AttributeCertificateHolder.java
index a34b3b3..c465c83 100644
--- a/bcpkix/src/main/java/org/bouncycastle/cert/X509AttributeCertificateHolder.java
+++ b/bcpkix/src/main/java/org/bouncycastle/cert/X509AttributeCertificateHolder.java
@@ -21,11 +21,13 @@ import org.bouncycastle.asn1.x509.Extension;
import org.bouncycastle.asn1.x509.Extensions;
import org.bouncycastle.operator.ContentVerifier;
import org.bouncycastle.operator.ContentVerifierProvider;
+import org.bouncycastle.util.Encodable;
/**
* Holding class for an X.509 AttributeCertificate structure.
*/
public class X509AttributeCertificateHolder
+ implements Encodable
{
private static Attribute[] EMPTY_ARRAY = new Attribute[0];
diff --git a/bcpkix/src/main/java/org/bouncycastle/cert/X509CRLHolder.java b/bcpkix/src/main/java/org/bouncycastle/cert/X509CRLHolder.java
index b3723f3..29c48fa 100644
--- a/bcpkix/src/main/java/org/bouncycastle/cert/X509CRLHolder.java
+++ b/bcpkix/src/main/java/org/bouncycastle/cert/X509CRLHolder.java
@@ -24,11 +24,13 @@ import org.bouncycastle.asn1.x509.IssuingDistributionPoint;
import org.bouncycastle.asn1.x509.TBSCertList;
import org.bouncycastle.operator.ContentVerifier;
import org.bouncycastle.operator.ContentVerifierProvider;
+import org.bouncycastle.util.Encodable;
/**
* Holding class for an X.509 CRL structure.
*/
public class X509CRLHolder
+ implements Encodable
{
private CertificateList x509CRL;
private boolean isIndirect;
diff --git a/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java b/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
index 1081d93..dc61c78 100644
--- a/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
+++ b/bcpkix/src/main/java/org/bouncycastle/cert/X509CertificateHolder.java
@@ -19,11 +19,13 @@ import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
import org.bouncycastle.asn1.x509.TBSCertificate;
import org.bouncycastle.operator.ContentVerifier;
import org.bouncycastle.operator.ContentVerifierProvider;
+import org.bouncycastle.util.Encodable;
/**
* Holding class for an X.509 Certificate structure.
*/
public class X509CertificateHolder
+ implements Encodable
{
private Certificate x509Certificate;
private Extensions extensions;
@@ -214,7 +216,7 @@ public class X509CertificateHolder
/**
* Return the underlying ASN.1 structure for the certificate in this holder.
*
- * @return a X509CertificateStructure object.
+ * @return a Certificate object.
*/
public Certificate toASN1Structure()
{