KeyVaultTrustManager Class

  • java.lang.Object
    • javax.net.ssl.X509ExtendedTrustManager
      • com.azure.security.keyvault.jca.KeyVaultTrustManager

public final class KeyVaultTrustManager
extends X509ExtendedTrustManager

The Azure Key Vault variant of the X509TrustManager.

Constructor Summary

Constructor Description
KeyVaultTrustManager()

Constructor.

KeyVaultTrustManager(KeyStore keyStore)

Constructor.

Method Summary

Modifier and Type Method and Description
void checkClientTrusted(X509Certificate[] chain, String authType)

Check if the client is trusted.

void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket)

Check if the client is trusted.

void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine)

Check if the client is trusted.

void checkServerTrusted(X509Certificate[] chain, String authType)

Check if the server is trusted.

void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket)

Check if the server is trusted.

void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)

Check if the server is trusted.

X509Certificate[] getAcceptedIssuers()

Get accepted issuers.

Methods inherited from java.lang.Object

Methods inherited from javax.net.ssl.X509ExtendedTrustManager

Constructor Details

KeyVaultTrustManager

public KeyVaultTrustManager()

Constructor.

KeyVaultTrustManager

public KeyVaultTrustManager(KeyStore keyStore)

Constructor.

Parameters:

keyStore - the keystore.

Method Details

checkClientTrusted

public void checkClientTrusted(X509Certificate[] chain, String authType)

Check if the client is trusted.

Parameters:

chain - the chain
authType - the authType

Throws:

CertificateException

- if any of the certificates in the keystore could not be loaded.

checkClientTrusted

public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket)

Check if the client is trusted.

Overrides:

KeyVaultTrustManager.checkClientTrusted(X509Certificate[] chain, String authType, Socket socket)

Parameters:

chain - the chain
authType - the authType
socket - the socket

Throws:

CertificateException

- if any of the certificates in the keystore could not be loaded.

checkClientTrusted

public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine)

Check if the client is trusted.

Overrides:

KeyVaultTrustManager.checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine)

Parameters:

chain - the chain
authType - the authType
engine - the engine

Throws:

CertificateException

- if any of the certificates in the keystore could not be loaded.

checkServerTrusted

public void checkServerTrusted(X509Certificate[] chain, String authType)

Check if the server is trusted.

Parameters:

chain - the chain
authType - the authType

Throws:

CertificateException

- if any of the certificates in the keystore could not be loaded.

checkServerTrusted

public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket)

Check if the server is trusted.

Overrides:

KeyVaultTrustManager.checkServerTrusted(X509Certificate[] chain, String authType, Socket socket)

Parameters:

chain - the chain
authType - the authType
socket - the socket

Throws:

CertificateException

- if any of the certificates in the keystore could not be loaded.

checkServerTrusted

public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)

Check if the server is trusted.

Overrides:

KeyVaultTrustManager.checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)

Parameters:

chain - the chain
authType - the authType
engine - the engine

Throws:

CertificateException

- if any of the certificates in the keystore could not be loaded.

getAcceptedIssuers

public X509Certificate[] getAcceptedIssuers()

Get accepted issuers.

Returns:

X509Certificate the X509Certificate

Applies to