Class OpenSslPrivateKey

java.lang.Object
io.netty.util.AbstractReferenceCounted
io.netty.handler.ssl.OpenSslPrivateKey
All Implemented Interfaces:
ReferenceCounted, java.io.Serializable, java.security.Key, java.security.PrivateKey, javax.security.auth.Destroyable

final class OpenSslPrivateKey extends AbstractReferenceCounted implements java.security.PrivateKey
  • Field Details

    • privateKeyAddress

      private long privateKeyAddress
  • Constructor Details

    • OpenSslPrivateKey

      OpenSslPrivateKey(long privateKeyAddress)
  • Method Details

    • getAlgorithm

      public java.lang.String getAlgorithm()
      Specified by:
      getAlgorithm in interface java.security.Key
    • getFormat

      public java.lang.String getFormat()
      Specified by:
      getFormat in interface java.security.Key
    • getEncoded

      public byte[] getEncoded()
      Specified by:
      getEncoded in interface java.security.Key
    • privateKeyAddress

      long privateKeyAddress()
    • deallocate

      protected void deallocate()
      Description copied from class: AbstractReferenceCounted
      Called once AbstractReferenceCounted.refCnt() is equals 0.
      Specified by:
      deallocate in class AbstractReferenceCounted
    • retain

      public OpenSslPrivateKey retain()
      Description copied from interface: ReferenceCounted
      Increases the reference count by 1.
      Specified by:
      retain in interface ReferenceCounted
      Overrides:
      retain in class AbstractReferenceCounted
    • retain

      public OpenSslPrivateKey retain(int increment)
      Description copied from interface: ReferenceCounted
      Increases the reference count by the specified increment.
      Specified by:
      retain in interface ReferenceCounted
      Overrides:
      retain in class AbstractReferenceCounted
    • touch

      public OpenSslPrivateKey touch()
      Description copied from interface: ReferenceCounted
      Records 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 via ResourceLeakDetector. This method is a shortcut to touch(null).
      Specified by:
      touch in interface ReferenceCounted
      Overrides:
      touch in class AbstractReferenceCounted
    • touch

      public OpenSslPrivateKey touch(java.lang.Object hint)
      Description copied from interface: ReferenceCounted
      Records 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 via ResourceLeakDetector.
      Specified by:
      touch in interface ReferenceCounted
    • destroy

      public void destroy()
      NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the @Override annotation onto this method.
      Specified by:
      destroy in interface javax.security.auth.Destroyable
      See Also:
      • Destroyable.destroy()
    • isDestroyed

      public boolean isDestroyed()
      NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the @Override annotation onto this method.
      Specified by:
      isDestroyed in interface javax.security.auth.Destroyable
      See Also:
      • Destroyable.isDestroyed()
    • newKeyMaterial

      OpenSslKeyMaterial newKeyMaterial(long certificateChain, java.security.cert.X509Certificate[] chain)
      Create a new OpenSslKeyMaterial which uses the private key that is held by OpenSslPrivateKey. When the material is created we increment the reference count of the enclosing OpenSslPrivateKey and decrement it again when the reference count of the OpenSslKeyMaterial reaches 0.