Class TestHBaseTrustManager
java.lang.Object
org.apache.hadoop.hbase.io.crypto.tls.TestHBaseTrustManager
Test cases taken and adapted from Apache ZooKeeper Project. We can only test calls to
HBaseTrustManager using Sockets (not SSLEngines). This can be fine since the logic is the same.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final String
private static final String
private static KeyPair
private InetAddress
private InetAddress
private Socket
private Socket
private X509ExtendedTrustManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
private X509Certificate[]
createSelfSignedCertificateChain
(String ipAddress, String hostname) static void
void
setup()
void
void
void
void
void
void
void
void
void
void
void
-
Field Details
-
CLASS_RULE
-
keyPair
-
mockX509ExtendedTrustManager
-
IP_ADDRESS
- See Also:
-
HOSTNAME
- See Also:
-
mockInetAddressWithoutHostname
-
mockInetAddressWithHostname
-
mockSocketWithoutHostname
-
mockSocketWithHostname
-
-
Constructor Details
-
TestHBaseTrustManager
public TestHBaseTrustManager()
-
-
Method Details
-
createKeyPair
- Throws:
Exception
-
removeBouncyCastleProvider
- Throws:
Exception
-
setup
- Throws:
Exception
-
createSelfSignedCertificateChain
private X509Certificate[] createSelfSignedCertificateChain(String ipAddress, String hostname) throws Exception - Throws:
Exception
-
testServerHostnameVerificationWithHostnameVerificationDisabled
- Throws:
Exception
-
testServerTrustedWithHostnameVerificationDisabled
- Throws:
Exception
-
testServerTrustedWithHostnameVerificationEnabled
- Throws:
Exception
-
testServerTrustedWithHostnameVerificationEnabledUsingIpAddress
- Throws:
Exception
-
testServerTrustedWithHostnameVerificationEnabledNoReverseLookup
- Throws:
Exception
-
testServerTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup
public void testServerTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup() throws Exception- Throws:
Exception
-
testClientTrustedWithHostnameVerificationDisabled
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabled
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabledUsingIpAddress
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabledWithoutReverseLookup
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup
public void testClientTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup() throws Exception- Throws:
Exception
-