Class TlsKeyOperation

java.lang.Object
software.amazon.awssdk.crt.io.TlsKeyOperation

public final class TlsKeyOperation extends Object
A class containing a mutual TLS (mTLS) Private Key operation that needs to be performed. This class is passed to TlsKeyOperationHandler if a custom key operation is set. You MUST call either complete(output) or completeExceptionally(exception) or the TLS connection will hang forever!
  • Method Details

    • getInput

      public byte[] getInput()
      Returns the input data from native that needs to be operated on using the private key. You can determine the operation that needs to be performed on the data using the getType function.
      Returns:
      The input data from native that needs to be operated on
    • getType

      public TlsKeyOperation.Type getType()
      Returns the operation that needs to be performed.
      Returns:
      The operation that needs to be performed.
    • getSignatureAlgorithm

      public TlsSignatureAlgorithm getSignatureAlgorithm()
      Returns the TLS algorithm used in the signature.
      Returns:
      The TLS algorithm used in the signature
    • getDigestAlgorithm

      public TlsHashAlgorithm getDigestAlgorithm()
      Returns the TLS Hash algorithm used in the digest.
      Returns:
      The TLS Hash algorithm used in the digest
    • complete

      public void complete(byte[] output)
      The function to call when you have modified the input data using the private key and are ready to return it for use in the mutual TLS Handshake.
      Parameters:
      output - The modified input data that has been modified by the custom key operation
    • completeExceptionally

      public void completeExceptionally(Throwable ex)
      The function to call when you either have an exception and want to complete the operation with an exception or you cannot complete the operation. This will mark the operation as complete with an exception so it can be reacted to accordingly.
      Parameters:
      ex - The exeception to complete with