public static interface NativeCrypto.SSLHandshakeCallbacks
| Modifier and Type | Method and Description |
|---|---|
void |
clientCertificateRequested(byte[] keyTypes,
byte[][] asn1DerEncodedX500Principals)
Called on an SSL client when the server requests (or
requires a certificate).
|
int |
clientPSKKeyRequested(String identityHint,
byte[] identity,
byte[] key)
Gets the key to be used in client mode for this connection in Pre-Shared Key (PSK) key
exchange.
|
void |
onSSLStateChange(int type,
int val)
Called when SSL state changes.
|
int |
serverPSKKeyRequested(String identityHint,
String identity,
byte[] key)
Gets the key to be used in server mode for this connection in Pre-Shared Key (PSK) key
exchange.
|
void |
verifyCertificateChain(long[] certificateChainRefs,
String authMethod)
Verify that we trust the certificate chain is trusted.
|
void verifyCertificateChain(long[] certificateChainRefs,
String authMethod)
throws CertificateException
certificateChainRefs - chain of X.509 certificate referencesauthMethod - auth algorithm nameCertificateException - if the certificate is untrustedvoid clientCertificateRequested(byte[] keyTypes,
byte[][] asn1DerEncodedX500Principals)
throws CertificateEncodingException,
SSLException
keyTypes - key types supported by the server,
convertible to strings with #keyTypeasn1DerEncodedX500Principals - CAs known to the serverCertificateEncodingExceptionSSLExceptionint clientPSKKeyRequested(String identityHint, byte[] identity, byte[] key)
identityHint - PSK identity hint provided by the server or null if no hint
provided.identity - buffer to be populated with PSK identity (NULL-terminated modified UTF-8)
by this method. This identity will be provided to the server.key - buffer to be populated with key material by this method.key buffer or 0 if an
error occurred in which case the handshake will be aborted.int serverPSKKeyRequested(String identityHint, String identity, byte[] key)
identityHint - PSK identity hint provided by this server to the client or
null if no hint was provided.identity - PSK identity provided by the client.key - buffer to be populated with key material by this method.key buffer or 0 if an
error occurred in which case the handshake will be aborted.void onSSLStateChange(int type,
int val)