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
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final Stringprivate static final Stringprivate static KeyPairprivate InetAddressprivate InetAddressprivate Socketprivate Socketprivate X509ExtendedTrustManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate X509Certificate[]createSelfSignedCertificateChain(String ipAddress, String hostname) static voidvoidsetup()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
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
-