public class X509Cert extends Object
X509Certificate.| Constructor and Description |
|---|
X509Cert(org.bouncycastle.asn1.x509.Certificate cert) |
X509Cert(org.bouncycastle.asn1.x509.Certificate cert,
byte[] encoded) |
X509Cert(X509Certificate cert) |
X509Cert(X509Certificate cert,
byte[] encoded) |
X509Cert(org.bouncycastle.cert.X509CertificateHolder cert) |
X509Cert(org.bouncycastle.cert.X509CertificateHolder cert,
byte[] encoded) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
byte[] |
getAuthorityKeyId() |
int |
getBasicConstraints()
Gets the certificate constraints path length from the
critical
BasicConstraints extension, (OID = 2.5.29.19). |
String |
getCommonName() |
byte[] |
getEncoded() |
byte[] |
getExtensionCoreValue(org.bouncycastle.asn1.ASN1ObjectIdentifier extnType) |
org.bouncycastle.asn1.x500.X500Name |
getIssuer() |
String |
getIssuerRfc4519Text() |
boolean[] |
getKeyUsage() |
Date |
getNotAfter() |
Date |
getNotBefore() |
PublicKey |
getPublicKey() |
BigInteger |
getSerialNumber() |
String |
getSerialNumberHex() |
org.bouncycastle.asn1.x500.X500Name |
getSubject() |
byte[] |
getSubjectKeyId() |
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo |
getSubjectPublicKeyInfo() |
String |
getSubjectRfc4519Text() |
int |
hashCode() |
boolean |
hasKeyusage(KeyUsage usage) |
boolean |
isSelfSigned() |
org.bouncycastle.cert.X509CertificateHolder |
toBcCert() |
X509Certificate |
toJceCert() |
void |
verify(PublicKey key) |
void |
verify(PublicKey key,
Provider sigProvider) |
void |
verify(PublicKey key,
String sigProvider) |
public X509Cert(org.bouncycastle.asn1.x509.Certificate cert)
public X509Cert(org.bouncycastle.asn1.x509.Certificate cert,
byte[] encoded)
public X509Cert(X509Certificate cert)
public X509Cert(X509Certificate cert, byte[] encoded)
public X509Cert(org.bouncycastle.cert.X509CertificateHolder cert)
public X509Cert(org.bouncycastle.cert.X509CertificateHolder cert,
byte[] encoded)
public int getBasicConstraints()
BasicConstraints extension, (OID = 2.5.29.19).
The basic constraints extension identifies whether the subject
of the certificate is a Certificate Authority (CA) and
how deep a certification path may exist through that CA. The
pathLenConstraint field (see below) is meaningful
only if cA is set to TRUE. In this case, it gives the
maximum number of CA certificates that may follow this certificate in a
certification path. A value of zero indicates that only an end-entity
certificate may follow in the path.
The ASN.1 definition for this is:
BasicConstraints ::= SEQUENCE {
cA BOOLEAN DEFAULT FALSE,
pathLenConstraint INTEGER (0..MAX) OPTIONAL }
pathLenConstraint if the
BasicConstraints extension is present in the certificate and the
subject of the certificate is a CA, otherwise -1.
If the subject of the certificate is a CA and
pathLenConstraint does not appear,
Integer.MAX_VALUE is returned to indicate that there is no
limit to the allowed length of the certification path.public BigInteger getSerialNumber()
public String getSerialNumberHex()
public PublicKey getPublicKey()
public boolean[] getKeyUsage()
public org.bouncycastle.asn1.x500.X500Name getIssuer()
public org.bouncycastle.asn1.x500.X500Name getSubject()
public byte[] getSubjectKeyId()
public byte[] getAuthorityKeyId()
public String getSubjectRfc4519Text()
public String getIssuerRfc4519Text()
public org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getSubjectPublicKeyInfo()
public X509Certificate toJceCert()
public org.bouncycastle.cert.X509CertificateHolder toBcCert()
public boolean isSelfSigned()
public Date getNotBefore()
public Date getNotAfter()
public byte[] getEncoded()
public String getCommonName()
public void verify(PublicKey key) throws SignatureException, InvalidKeyException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException
public void verify(PublicKey key, Provider sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException, NoSuchProviderException
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException, NoSuchProviderException
public byte[] getExtensionCoreValue(org.bouncycastle.asn1.ASN1ObjectIdentifier extnType)
public boolean hasKeyusage(KeyUsage usage)
Copyright © 2020. All rights reserved.