diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-01-20 00:08:43 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-01-20 00:08:43 +0000 |
commit | 7e0e69b19ac1458b7643fc773fcf0ac891ac9221 (patch) | |
tree | aed888bdd47c08ae8dcca6ab6c0fd82896a636fb /pki/base/util | |
parent | 85d0899477c19031ea1895cc3e7f21fcf82c0761 (diff) | |
download | pki-7e0e69b19ac1458b7643fc773fcf0ac891ac9221.tar.gz pki-7e0e69b19ac1458b7643fc773fcf0ac891ac9221.tar.xz pki-7e0e69b19ac1458b7643fc773fcf0ac891ac9221.zip |
Fixed bugzilla bug #531137.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1752 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/util')
-rwxr-xr-x | pki/base/util/src/netscape/security/x509/X509CRLImpl.java | 36 |
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: |