Package com.azure.security.keyvault.jca
Class KeyVaultTrustManager
java.lang.Object
javax.net.ssl.X509ExtendedTrustManager
com.azure.security.keyvault.jca.KeyVaultTrustManager
- All Implemented Interfaces:
TrustManager,X509TrustManager
The Azure Key Vault variant of the X509TrustManager.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] chain, String authType) Check if the client is trusted.voidcheckClientTrusted(X509Certificate[] chain, String authType, Socket socket) Check if the client is trusted.voidcheckClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) Check if the client is trusted.voidcheckServerTrusted(X509Certificate[] chain, String authType) Check if the server is trusted.voidcheckServerTrusted(X509Certificate[] chain, String authType, Socket socket) Check if the server is trusted.voidcheckServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) Check if the server is trusted.Get accepted issuers.
-
Constructor Details
-
KeyVaultTrustManager
public KeyVaultTrustManager()Constructor. -
KeyVaultTrustManager
Constructor.- Parameters:
keyStore- the keystore.
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException Check if the client is trusted.- Parameters:
chain- the chainauthType- the authType- Throws:
CertificateException- if any of the certificates in the keystore could not be loaded.
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException Check if the server is trusted.- Parameters:
chain- the chainauthType- the authType- Throws:
CertificateException- if any of the certificates in the keystore could not be loaded.
-
getAcceptedIssuers
Get accepted issuers.- Returns:
- X509Certificate the X509Certificate
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException Check if the client is trusted.- Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Parameters:
chain- the chainauthType- the authTypesocket- the socket- Throws:
CertificateException- if any of the certificates in the keystore could not be loaded.
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException Check if the server is trusted.- Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Parameters:
chain- the chainauthType- the authTypesocket- 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) throws CertificateException Check if the client is trusted.- Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Parameters:
chain- the chainauthType- the authTypeengine- the engine- Throws:
CertificateException- if any of the certificates in the keystore could not be loaded.
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException Check if the server is trusted.- Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Parameters:
chain- the chainauthType- the authTypeengine- the engine- Throws:
CertificateException- if any of the certificates in the keystore could not be loaded.
-