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
UnsupportedOperationException
s.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, verify
getType, writeReplace
public 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()
ReferenceCounted
0
, it means this object has been deallocated.public ByteBuf content()
ByteBufHolder
ByteBufHolder
.public PemX509Certificate copy()
ByteBufHolder
ByteBufHolder
.public PemX509Certificate duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.public PemX509Certificate retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.ByteBuf.retainedDuplicate()
public PemX509Certificate replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.public PemX509Certificate retain()
ReferenceCounted
1
.public PemX509Certificate retain(int increment)
ReferenceCounted
increment
.public PemX509Certificate touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.public PemX509Certificate touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.public boolean release()
ReferenceCounted
1
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)
ReferenceCounted
decrement
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 Certificate
public boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension
in interface X509Extension
public Set<String> getCriticalExtensionOIDs()
getCriticalExtensionOIDs
in interface X509Extension
public Set<String> getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs
in interface X509Extension
public byte[] getExtensionValue(String oid)
getExtensionValue
in interface X509Extension
public void checkValidity()
checkValidity
in class X509Certificate
public void checkValidity(Date date)
checkValidity
in class X509Certificate
public int getVersion()
getVersion
in class X509Certificate
public BigInteger getSerialNumber()
getSerialNumber
in class X509Certificate
public Principal getIssuerDN()
getIssuerDN
in class X509Certificate
public Principal getSubjectDN()
getSubjectDN
in class X509Certificate
public Date getNotBefore()
getNotBefore
in class X509Certificate
public Date getNotAfter()
getNotAfter
in class X509Certificate
public byte[] getTBSCertificate()
getTBSCertificate
in class X509Certificate
public byte[] getSignature()
getSignature
in class X509Certificate
public String getSigAlgName()
getSigAlgName
in class X509Certificate
public String getSigAlgOID()
getSigAlgOID
in class X509Certificate
public byte[] getSigAlgParams()
getSigAlgParams
in class X509Certificate
public boolean[] getIssuerUniqueID()
getIssuerUniqueID
in class X509Certificate
public boolean[] getSubjectUniqueID()
getSubjectUniqueID
in class X509Certificate
public boolean[] getKeyUsage()
getKeyUsage
in class X509Certificate
public int getBasicConstraints()
getBasicConstraints
in class X509Certificate
public void verify(PublicKey key)
verify
in class Certificate
public void verify(PublicKey key, String sigProvider)
verify
in class Certificate
public PublicKey getPublicKey()
getPublicKey
in class Certificate
public boolean equals(Object o)
equals
in class Certificate
public int hashCode()
hashCode
in class Certificate
public String toString()
toString
in class Certificate
Copyright © 2008–2024 The Netty Project. All rights reserved.