Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pkix
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2014-07-17 09:16:36 +0400
committerDavid Hook <dgh@cryptoworkshop.com>2014-07-17 09:16:36 +0400
commit012bbb4ac7c556e4d89eb91d31b91e61ccdeccfe (patch)
tree0429e27243c01486ba09768b93636d054c6d02d9 /pkix
parentcebc7ce746820ed896818cbc0f67d9f1784f13db (diff)
added method for taking raw byte array
Diffstat (limited to 'pkix')
-rw-r--r--pkix/src/main/java/org/bouncycastle/cert/X509v3CertificateBuilder.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkix/src/main/java/org/bouncycastle/cert/X509v3CertificateBuilder.java b/pkix/src/main/java/org/bouncycastle/cert/X509v3CertificateBuilder.java
index 0a0aa50a..a93f2157 100644
--- a/pkix/src/main/java/org/bouncycastle/cert/X509v3CertificateBuilder.java
+++ b/pkix/src/main/java/org/bouncycastle/cert/X509v3CertificateBuilder.java
@@ -108,6 +108,26 @@ public class X509v3CertificateBuilder
}
/**
+ * Add a given extension field for the standard extensions tag (tag 3) using a byte encoding of the
+ * extension value.
+ *
+ * @param oid the OID defining the extension type.
+ * @param isCritical true if the extension is critical, false otherwise.
+ * @param encodedValue a byte array representing the encoding of the extension value.
+ * @return this builder object.
+ */
+ public X509v3CertificateBuilder addExtension(
+ ASN1ObjectIdentifier oid,
+ boolean isCritical,
+ byte[] encodedValue)
+ throws CertIOException
+ {
+ extGenerator.addExtension(oid, isCritical, encodedValue);
+
+ return this;
+ }
+
+ /**
* Add a given extension field for the standard extensions tag (tag 3)
* copying the extension value from another certificate.
*