Class PemPrivateKey
java.lang.Object
io.netty.util.AbstractReferenceCounted
io.netty.handler.ssl.PemPrivateKey
- All Implemented Interfaces:
ByteBufHolder, ReferenceCounted, Serializable, Key, PrivateKey, Destroyable
This is a special purpose implementation of a
PrivateKey which allows the
user to pass PEM/PKCS#8 encoded key material straight into OpenSslContext
without having to parse and re-encode bytes in Java land.
All methods other than what's implemented in PemEncoded and Destroyable
throw UnsupportedOperationExceptions.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncontent()Return the data which is held by thisByteBufHolder.copy()Creates a deep copy of thisByteBufHolder.protected voidCalled onceAbstractReferenceCounted.refCnt()is equals 0.voiddestroy()NOTE: This is a JDK8 interface/method.Duplicates thisByteBufHolder.byte[]booleanNOTE: This is a JDK8 interface/method.booleanReturns a newByteBufHolderwhich contains the specifiedcontent.retain()Increases the reference count by1.retain(int increment) Increases the reference count by the specifiedincrement.Duplicates thisByteBufHolder.touch()Records the current access location of this object for debugging purposes.Records the current access location of this object with an additional arbitrary information for debugging purposes.static PemPrivateKeyvalueOf(byte[] key) Creates aPemPrivateKeyfrom rawbyte[].static PemPrivateKeyCreates aPemPrivateKeyfrom rawByteBuf.Methods inherited from class AbstractReferenceCounted
refCnt, release, release, setRefCntMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ReferenceCounted
refCnt, release, release
-
Method Details
-
valueOf
Creates aPemPrivateKeyfrom rawbyte[]. ATTENTION: It's assumed that the given argument is a PEM/PKCS#8 encoded value. No input validation is performed to validate it. -
valueOf
Creates aPemPrivateKeyfrom rawByteBuf. ATTENTION: It's assumed that the given argument is a PEM/PKCS#8 encoded value. No input validation is performed to validate it. -
isSensitive
public boolean isSensitive() -
content
Description copied from interface:ByteBufHolderReturn the data which is held by thisByteBufHolder.- Specified by:
contentin interfaceByteBufHolder
-
copy
Description copied from interface:ByteBufHolderCreates a deep copy of thisByteBufHolder.- Specified by:
copyin interfaceByteBufHolder
-
duplicate
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. Be aware that this will not automatically callByteBufHolder.retain().- Specified by:
duplicatein interfaceByteBufHolder
-
retainedDuplicate
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. This method returns a retained duplicate unlikeByteBufHolder.duplicate().- Specified by:
retainedDuplicatein interfaceByteBufHolder- See Also:
-
replace
Description copied from interface:ByteBufHolderReturns a newByteBufHolderwhich contains the specifiedcontent.- Specified by:
replacein interfaceByteBufHolder
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classAbstractReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector.- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
deallocate
protected void deallocate()Description copied from class:AbstractReferenceCountedCalled onceAbstractReferenceCounted.refCnt()is equals 0.- Specified by:
deallocatein classAbstractReferenceCounted
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
destroy
public void destroy()NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the@Overrideannotation onto this method.- Specified by:
destroyin interfaceDestroyable- See Also:
-
isDestroyed
public boolean isDestroyed()NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the@Overrideannotation onto this method.- Specified by:
isDestroyedin interfaceDestroyable- See Also:
-