public class OpenSSLX509CRL extends X509CRL
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
static List<OpenSSLX509CRL> |
fromPkcs7DerInputStream(InputStream is) |
static List<OpenSSLX509CRL> |
fromPkcs7PemInputStream(InputStream is) |
static OpenSSLX509CRL |
fromX509DerInputStream(InputStream is) |
static OpenSSLX509CRL |
fromX509PemInputStream(InputStream is) |
Set<String> |
getCriticalExtensionOIDs()
Returns the set of OIDs of the extension(s) marked as CRITICAL, that this
implementation manages.
|
byte[] |
getEncoded()
Returns this CRL in ASN.1 DER encoded form.
|
byte[] |
getExtensionValue(String oid)
Returns the extension value as DER-encoded OCTET string for the specified
OID.
|
Principal |
getIssuerDN()
Do not use, use
X509CRL.getIssuerX500Principal() instead. |
X500Principal |
getIssuerX500Principal()
Returns the issuer distinguished name of this CRL.
|
Date |
getNextUpdate()
Returns the
nextUpdate value of this CRL. |
Set<String> |
getNonCriticalExtensionOIDs()
Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that
this implementation manages.
|
X509CRLEntry |
getRevokedCertificate(BigInteger serialNumber)
Returns the CRL entry with the specified certificate serial number.
|
X509CRLEntry |
getRevokedCertificate(X509Certificate certificate)
Returns the CRL entry for the specified certificate.
|
Set<? extends X509CRLEntry> |
getRevokedCertificates()
Returns the set of revoked certificates.
|
String |
getSigAlgName()
Returns the name of the signature algorithm.
|
String |
getSigAlgOID()
Returns the OID of the signature algorithm.
|
byte[] |
getSigAlgParams()
Returns the parameters of the signature algorithm in DER encoded form.
|
byte[] |
getSignature()
Returns the signature bytes of this CRL.
|
byte[] |
getTBSCertList()
Returns the
tbsCertList information of this CRL in DER encoded
form. |
Date |
getThisUpdate()
Returns the
thisUpdate value of this CRL. |
int |
getVersion()
Returns the version number of this CRL.
|
boolean |
hasUnsupportedCriticalExtension()
Returns whether this instance has an extension marked as CRITICAL that it
cannot support.
|
boolean |
isRevoked(Certificate cert)
Returns whether the specified certificate is revoked by this CRL.
|
String |
toString()
Returns the string representation of this instance.
|
void |
verify(PublicKey key)
Verifies this CRL by verifying that this CRL was signed with the
corresponding private key to the specified public key.
|
void |
verify(PublicKey key,
String sigProvider)
Verifies this CRL by verifying that this CRL was signed with the
corresponding private key to the specified public key.
|
public static OpenSSLX509CRL fromX509DerInputStream(InputStream is) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException
org.conscrypt.OpenSSLX509CertificateFactory.ParsingExceptionpublic static List<OpenSSLX509CRL> fromPkcs7DerInputStream(InputStream is) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException
org.conscrypt.OpenSSLX509CertificateFactory.ParsingExceptionpublic static OpenSSLX509CRL fromX509PemInputStream(InputStream is) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException
org.conscrypt.OpenSSLX509CertificateFactory.ParsingExceptionpublic static List<OpenSSLX509CRL> fromPkcs7PemInputStream(InputStream is) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException
org.conscrypt.OpenSSLX509CertificateFactory.ParsingExceptionpublic Set<String> getCriticalExtensionOIDs()
X509Extensionnull if no extensions are
present.public byte[] getExtensionValue(String oid)
X509Extensionoid - the object identifier to get the extension value for.null
if no extension for the specified OID can be found.public Set<String> getNonCriticalExtensionOIDs()
X509Extensionnull if no
extensions are present.public boolean hasUnsupportedCriticalExtension()
X509Extensiontrue if an unsupported CRITICAL extension is present,
false otherwise.public byte[] getEncoded()
throws CRLException
X509CRLgetEncoded in class X509CRLCRLException - if encoding fails.public void verify(PublicKey key) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
X509CRLverify in class X509CRLkey - the public key to verify this CRL with.CRLException - if encoding or decoding fails.NoSuchAlgorithmException - if a needed algorithm is not present.InvalidKeyException - if the specified key is invalid.NoSuchProviderException - if no provider can be found.SignatureException - if errors occur on signatures.public void verify(PublicKey key, String sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
X509CRLverify in class X509CRLkey - the public key to verify this CRL with.sigProvider - the name of the provider for the signature algorithm.CRLException - if encoding decoding fails.NoSuchAlgorithmException - if a needed algorithm is not present.InvalidKeyException - if the specified key is invalid.NoSuchProviderException - if the specified provider cannot be found.SignatureException - if errors occur on signatures.public int getVersion()
X509CRLgetVersion in class X509CRLpublic Principal getIssuerDN()
X509CRLX509CRL.getIssuerX500Principal() instead. Returns
the issuer as an implementation specific Principal object.getIssuerDN in class X509CRLpublic X500Principal getIssuerX500Principal()
X509CRLgetIssuerX500Principal in class X509CRLpublic Date getThisUpdate()
X509CRLthisUpdate value of this CRL.getThisUpdate in class X509CRLthisUpdate value of this CRL.public Date getNextUpdate()
X509CRLnextUpdate value of this CRL.getNextUpdate in class X509CRLnextUpdate value of this CRL, or null if none
is present.public X509CRLEntry getRevokedCertificate(BigInteger serialNumber)
X509CRLgetRevokedCertificate in class X509CRLserialNumber - the certificate serial number to search for a CRL entry.null if not found.public X509CRLEntry getRevokedCertificate(X509Certificate certificate)
X509CRLgetRevokedCertificate in class X509CRLcertificate - the certificate to search a CRL entry for.null if not
found.public Set<? extends X509CRLEntry> getRevokedCertificates()
X509CRLgetRevokedCertificates in class X509CRLnull if no revoked
certificates are in this CRL.public byte[] getTBSCertList()
throws CRLException
X509CRLtbsCertList information of this CRL in DER encoded
form.getTBSCertList in class X509CRLCRLException - if encoding fails.public byte[] getSignature()
X509CRLgetSignature in class X509CRLpublic String getSigAlgName()
X509CRLgetSigAlgName in class X509CRLpublic String getSigAlgOID()
X509CRLgetSigAlgOID in class X509CRLpublic byte[] getSigAlgParams()
X509CRLgetSigAlgParams in class X509CRLnull if not present.public boolean isRevoked(Certificate cert)
CRLpublic String toString()
CRLprotected void finalize()
throws Throwable
ObjectNote that objects that override finalize are significantly more expensive than
objects that don't. Finalizers may be run a long time after the object is no longer
reachable, depending on memory pressure, so it's a bad idea to rely on them for cleanup.
Note also that finalizers are run on a single VM-wide finalizer thread,
so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary
for a class that has a native peer and needs to call a native method to destroy that peer.
Even then, it's better to provide an explicit close method (and implement
Closeable), and insist that callers manually dispose of instances. This
works well for something like files, but less well for something like a BigInteger
where typical calling code would have to deal with lots of temporaries. Unfortunately,
code that creates lots of temporaries is the worst kind of code from the point of view of
the single finalizer thread.
If you must use finalizers, consider at least providing your own
ReferenceQueue and having your own thread process that queue.
Unlike constructors, finalizers are not automatically chained. You are responsible for
calling super.finalize() yourself.
Uncaught exceptions thrown by finalizers are ignored and do not terminate the finalizer thread. See Effective Java Item 7, "Avoid finalizers" for more.