Package io.netty.handler.ssl.util
Class LazyJavaxX509Certificate
java.lang.Object
javax.security.cert.Certificate
javax.security.cert.X509Certificate
io.netty.handler.ssl.util.LazyJavaxX509Certificate
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLazyJavaxX509Certificate
(byte[] bytes) Creates a new instance which will lazy parse the given bytes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkValidity
(Date date) (package private) byte[]
getBytes()
Return the underylingbyte[]
without cloning it first.byte[]
byte[]
int
toString()
private X509Certificate
unwrap()
void
void
Methods inherited from class javax.security.cert.X509Certificate
getInstance, getInstance
Methods inherited from class javax.security.cert.Certificate
equals, hashCode
-
Field Details
-
bytes
private final byte[] bytes -
wrapped
-
-
Constructor Details
-
LazyJavaxX509Certificate
public LazyJavaxX509Certificate(byte[] bytes) Creates a new instance which will lazy parse the given bytes. Be aware that the bytes will not be cloned.
-
-
Method Details
-
checkValidity
- 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
-
getVersion
public int getVersion()- Specified by:
getVersion
in classX509Certificate
-
getSerialNumber
- Specified by:
getSerialNumber
in classX509Certificate
-
getIssuerDN
- Specified by:
getIssuerDN
in classX509Certificate
-
getSubjectDN
- Specified by:
getSubjectDN
in classX509Certificate
-
getNotBefore
- Specified by:
getNotBefore
in classX509Certificate
-
getNotAfter
- Specified by:
getNotAfter
in classX509Certificate
-
getSigAlgName
- Specified by:
getSigAlgName
in classX509Certificate
-
getSigAlgOID
- Specified by:
getSigAlgOID
in classX509Certificate
-
getSigAlgParams
public byte[] getSigAlgParams()- Specified by:
getSigAlgParams
in classX509Certificate
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncoded
in classCertificate
-
getBytes
byte[] getBytes()Return the underylingbyte[]
without cloning it first. Thisbyte[]
must never be mutated. -
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
- Specified by:
toString
in classCertificate
-
getPublicKey
- Specified by:
getPublicKey
in classCertificate
-
unwrap
-