Package software.amazon.awssdk.crt.io
Class TlsKeyOperation
java.lang.Object
software.amazon.awssdk.crt.io.TlsKeyOperation
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!
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of TlsKeyOperation that needs to be performed by the TlsKeyOperationHandler interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete(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.voidThe function to call when you either have an exception and want to complete the operation with an exception or you cannot complete the operation.Returns the TLS Hash algorithm used in the digest.byte[]getInput()Returns the input data from native that needs to be operated on using the private key.Returns the TLS algorithm used in the signature.getType()Returns the operation that needs to be performed.
-
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
Returns the operation that needs to be performed.- Returns:
- The operation that needs to be performed.
-
getSignatureAlgorithm
Returns the TLS algorithm used in the signature.- Returns:
- The TLS algorithm used in the signature
-
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
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
-