summaryrefslogtreecommitdiffstats
path: root/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/util/src/netscape/security/x509/X509CRLImpl.java')
-rwxr-xr-xpki/base/util/src/netscape/security/x509/X509CRLImpl.java36
1 files changed, 33 insertions, 3 deletions
diff --git a/pki/base/util/src/netscape/security/x509/X509CRLImpl.java b/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
index 8e74af6d2..cc21f626f 100755
--- a/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
+++ b/pki/base/util/src/netscape/security/x509/X509CRLImpl.java
@@ -89,9 +89,9 @@ import netscape.security.util.*;
public class X509CRLImpl extends X509CRL {
// CRL data, and its envelope
- private byte[] signedCRL; // DER encoded crl
- private byte[] signature; // raw signature bits
- private byte[] tbsCertList; // DER encoded "to-be-signed" CRL
+ private byte[] signedCRL = null; // DER encoded crl
+ private byte[] signature = null; // raw signature bits
+ private byte[] tbsCertList = null; // DER encoded "to-be-signed" CRL
private AlgorithmId sigAlgId; // sig alg in CRL
// crl information
@@ -306,6 +306,21 @@ public class X509CRLImpl extends X509CRL {
return dup;
}
+ /**
+ * Returns true if signedCRL was set.
+ *
+ * @param byte array of containing signed CRL.
+ */
+ public boolean setSignedCRL(byte[] crl) {
+ boolean done = false;
+ if (tbsCertList != null && signedCRL == null) {
+ signedCRL = new byte[crl.length];
+ System.arraycopy(crl, 0, signedCRL, 0, signedCRL.length);
+ done = true;
+ }
+ return done;
+ }
+
public boolean hasUnsupportedCriticalExtension() {
// XXX NOT IMPLEMENTED
return true;
@@ -713,6 +728,21 @@ public class X509CRLImpl extends X509CRL {
}
/**
+ * Returns true if signature was set.
+ *
+ * @param byte array of containing CRL signature.
+ */
+ public boolean setSignature(byte[] crlSignature) {
+ boolean done = false;
+ if (tbsCertList != null && signature == null) {
+ signature = new byte[crlSignature.length];
+ System.arraycopy(crlSignature, 0, signature, 0, signature.length);
+ done = true;
+ }
+ return done;
+ }
+
+ /**
* Gets the signature algorithm name for the CRL
* signature algorithm. For example, the string "SHA1withDSA".
* The ASN.1 definition for this is: