- java.lang.Object
-
- java.security.cert.Certificate
-
- java.security.cert.X509Certificate
-
- io.netty5.handler.ssl.util.LazyX509Certificate
-
- All Implemented Interfaces:
Serializable
,X509Extension
public final class LazyX509Certificate extends X509Certificate
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.security.cert.Certificate
Certificate.CertificateRep
-
-
Constructor Summary
Constructors Constructor Description LazyX509Certificate(byte[] bytes)
Creates a new instance which will lazy parse the given bytes.
-
Method Summary
-
Methods inherited from class java.security.cert.Certificate
equals, getType, hashCode, writeReplace
-
-
-
-
Method Detail
-
checkValidity
public void checkValidity() throws CertificateExpiredException, CertificateNotYetValidException
- Specified by:
checkValidity
in classX509Certificate
- Throws:
CertificateExpiredException
CertificateNotYetValidException
-
checkValidity
public void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException
- Specified by:
checkValidity
in classX509Certificate
- Throws:
CertificateExpiredException
CertificateNotYetValidException
-
getIssuerX500Principal
public X500Principal getIssuerX500Principal()
- Overrides:
getIssuerX500Principal
in classX509Certificate
-
getSubjectX500Principal
public X500Principal getSubjectX500Principal()
- Overrides:
getSubjectX500Principal
in classX509Certificate
-
getExtendedKeyUsage
public List<String> getExtendedKeyUsage() throws CertificateParsingException
- Overrides:
getExtendedKeyUsage
in classX509Certificate
- Throws:
CertificateParsingException
-
getSubjectAlternativeNames
public Collection<List<?>> getSubjectAlternativeNames() throws CertificateParsingException
- Overrides:
getSubjectAlternativeNames
in classX509Certificate
- Throws:
CertificateParsingException
-
getIssuerAlternativeNames
public Collection<List<?>> getIssuerAlternativeNames() throws CertificateParsingException
- Overrides:
getIssuerAlternativeNames
in classX509Certificate
- Throws:
CertificateParsingException
-
verify
public void verify(PublicKey key, Provider sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, SignatureException
- Overrides:
verify
in classX509Certificate
- Throws:
CertificateException
NoSuchAlgorithmException
InvalidKeyException
SignatureException
-
getVersion
public int getVersion()
- Specified by:
getVersion
in classX509Certificate
-
getSerialNumber
public BigInteger getSerialNumber()
- Specified by:
getSerialNumber
in classX509Certificate
-
getIssuerDN
public Principal getIssuerDN()
- Specified by:
getIssuerDN
in classX509Certificate
-
getSubjectDN
public Principal getSubjectDN()
- Specified by:
getSubjectDN
in classX509Certificate
-
getNotBefore
public Date getNotBefore()
- Specified by:
getNotBefore
in classX509Certificate
-
getNotAfter
public Date getNotAfter()
- Specified by:
getNotAfter
in classX509Certificate
-
getTBSCertificate
public byte[] getTBSCertificate() throws CertificateEncodingException
- Specified by:
getTBSCertificate
in classX509Certificate
- Throws:
CertificateEncodingException
-
getSignature
public byte[] getSignature()
- Specified by:
getSignature
in classX509Certificate
-
getSigAlgName
public String getSigAlgName()
- Specified by:
getSigAlgName
in classX509Certificate
-
getSigAlgOID
public String getSigAlgOID()
- Specified by:
getSigAlgOID
in classX509Certificate
-
getSigAlgParams
public byte[] getSigAlgParams()
- Specified by:
getSigAlgParams
in classX509Certificate
-
getIssuerUniqueID
public boolean[] getIssuerUniqueID()
- Specified by:
getIssuerUniqueID
in classX509Certificate
-
getSubjectUniqueID
public boolean[] getSubjectUniqueID()
- Specified by:
getSubjectUniqueID
in classX509Certificate
-
getKeyUsage
public boolean[] getKeyUsage()
- Specified by:
getKeyUsage
in classX509Certificate
-
getBasicConstraints
public int getBasicConstraints()
- Specified by:
getBasicConstraints
in classX509Certificate
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in classCertificate
-
verify
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
- Specified by:
verify
in classCertificate
- Throws:
CertificateException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException
-
verify
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
- Specified by:
verify
in classCertificate
- Throws:
CertificateException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException
-
toString
public String toString()
- Specified by:
toString
in classCertificate
-
getPublicKey
public PublicKey getPublicKey()
- Specified by:
getPublicKey
in classCertificate
-
hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()
-
getExtensionValue
public byte[] getExtensionValue(String oid)
-
-