public final class PemX509Certificate extends X509Certificate
X509Certificate which allows
the user to pass PEM/PKCS#8 encoded data straight into OpenSslContext without
having to parse and re-encode bytes in Java land.
All methods other than what's implemented in PemEncoded's throw
UnsupportedOperationExceptions.PemEncoded,
OpenSslContext,
valueOf(byte[]),
valueOf(ByteBuf),
Serialized FormCertificate.CertificateRep| Modifier and Type | Method and Description |
|---|---|
void |
checkValidity() |
void |
checkValidity(Date date) |
ByteBuf |
content()
Return the data which is held by this
ByteBufHolder. |
PemX509Certificate |
copy()
Creates a deep copy of this
ByteBufHolder. |
PemX509Certificate |
duplicate()
Duplicates this
ByteBufHolder. |
boolean |
equals(Object o) |
int |
getBasicConstraints() |
Set<String> |
getCriticalExtensionOIDs() |
byte[] |
getEncoded() |
byte[] |
getExtensionValue(String oid) |
Principal |
getIssuerDN() |
boolean[] |
getIssuerUniqueID() |
boolean[] |
getKeyUsage() |
Set<String> |
getNonCriticalExtensionOIDs() |
Date |
getNotAfter() |
Date |
getNotBefore() |
PublicKey |
getPublicKey() |
BigInteger |
getSerialNumber() |
String |
getSigAlgName() |
String |
getSigAlgOID() |
byte[] |
getSigAlgParams() |
byte[] |
getSignature() |
Principal |
getSubjectDN() |
boolean[] |
getSubjectUniqueID() |
byte[] |
getTBSCertificate() |
int |
getVersion() |
int |
hashCode() |
boolean |
hasUnsupportedCriticalExtension() |
boolean |
isSensitive()
Returns
true if the PEM encoded value is considered
sensitive information such as a private key. |
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0. |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0. |
PemX509Certificate |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content. |
PemX509Certificate |
retain()
Increases the reference count by
1. |
PemX509Certificate |
retain(int increment)
Increases the reference count by the specified
increment. |
PemX509Certificate |
retainedDuplicate()
Duplicates this
ByteBufHolder. |
String |
toString() |
PemX509Certificate |
touch()
Records the current access location of this object for debugging purposes.
|
PemX509Certificate |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
static PemX509Certificate |
valueOf(byte[] key)
Creates a
PemX509Certificate from raw byte[]. |
static PemX509Certificate |
valueOf(ByteBuf key)
Creates a
PemX509Certificate from raw ByteBuf. |
void |
verify(PublicKey key) |
void |
verify(PublicKey key,
String sigProvider) |
getExtendedKeyUsage, getIssuerAlternativeNames, getIssuerX500Principal, getSubjectAlternativeNames, getSubjectX500Principal, verifygetType, writeReplacepublic static PemX509Certificate valueOf(byte[] key)
PemX509Certificate from raw byte[].
ATTENTION: It's assumed that the given argument is a PEM/PKCS#8 encoded value.
No input validation is performed to validate it.public static PemX509Certificate valueOf(ByteBuf key)
PemX509Certificate from raw ByteBuf.
ATTENTION: It's assumed that the given argument is a PEM/PKCS#8 encoded value.
No input validation is performed to validate it.public boolean isSensitive()
true if the PEM encoded value is considered
sensitive information such as a private key.public int refCnt()
ReferenceCounted0, it means this object has been deallocated.public ByteBuf content()
ByteBufHolderByteBufHolder.public PemX509Certificate copy()
ByteBufHolderByteBufHolder.public PemX509Certificate duplicate()
ByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().public PemX509Certificate retainedDuplicate()
ByteBufHolderByteBufHolder. This method returns a retained duplicate unlike ByteBufHolder.duplicate().ByteBuf.retainedDuplicate()public PemX509Certificate replace(ByteBuf content)
ByteBufHolderByteBufHolder which contains the specified content.public PemX509Certificate retain()
ReferenceCounted1.public PemX509Certificate retain(int increment)
ReferenceCountedincrement.public PemX509Certificate touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).public PemX509Certificate touch(Object hint)
ReferenceCountedResourceLeakDetector.public boolean release()
ReferenceCounted1 and deallocates this object if the reference count reaches at
0.true if and only if the reference count became 0 and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounteddecrement and deallocates this object if the reference
count reaches at 0.true if and only if the reference count became 0 and this object has been deallocatedpublic byte[] getEncoded()
getEncoded in class Certificatepublic boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension in interface X509Extensionpublic Set<String> getCriticalExtensionOIDs()
getCriticalExtensionOIDs in interface X509Extensionpublic Set<String> getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs in interface X509Extensionpublic byte[] getExtensionValue(String oid)
getExtensionValue in interface X509Extensionpublic void checkValidity()
checkValidity in class X509Certificatepublic void checkValidity(Date date)
checkValidity in class X509Certificatepublic int getVersion()
getVersion in class X509Certificatepublic BigInteger getSerialNumber()
getSerialNumber in class X509Certificatepublic Principal getIssuerDN()
getIssuerDN in class X509Certificatepublic Principal getSubjectDN()
getSubjectDN in class X509Certificatepublic Date getNotBefore()
getNotBefore in class X509Certificatepublic Date getNotAfter()
getNotAfter in class X509Certificatepublic byte[] getTBSCertificate()
getTBSCertificate in class X509Certificatepublic byte[] getSignature()
getSignature in class X509Certificatepublic String getSigAlgName()
getSigAlgName in class X509Certificatepublic String getSigAlgOID()
getSigAlgOID in class X509Certificatepublic byte[] getSigAlgParams()
getSigAlgParams in class X509Certificatepublic boolean[] getIssuerUniqueID()
getIssuerUniqueID in class X509Certificatepublic boolean[] getSubjectUniqueID()
getSubjectUniqueID in class X509Certificatepublic boolean[] getKeyUsage()
getKeyUsage in class X509Certificatepublic int getBasicConstraints()
getBasicConstraints in class X509Certificatepublic void verify(PublicKey key)
verify in class Certificatepublic void verify(PublicKey key, String sigProvider)
verify in class Certificatepublic PublicKey getPublicKey()
getPublicKey in class Certificatepublic boolean equals(Object o)
equals in class Certificatepublic int hashCode()
hashCode in class Certificatepublic String toString()
toString in class CertificateCopyright © 2008–2017 The Netty Project. All rights reserved.