Class TestHBaseTrustManager
java.lang.Object
org.apache.hadoop.hbase.io.crypto.tls.TestHBaseTrustManager
@Tag("org.apache.hadoop.hbase.testclassification.MiscTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestHBaseTrustManager
extends Object
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 TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static KeyPairprivate InetAddressprivate InetAddressprivate Socketprivate Socketprivate SSLEngineprivate SSLEngineprivate X509ExtendedTrustManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate X509Certificate[]createSelfSignedCertificateChain(String ipAddress, String hostname) static voidvoidsetup()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
keyPair
-
mockX509ExtendedTrustManager
-
IP_ADDRESS
- See Also:
-
HOSTNAME
- See Also:
-
mockInetAddressWithoutHostname
-
mockInetAddressWithHostname
-
mockSocketWithoutHostname
-
mockSocketWithHostname
-
mockSSLEngineWithoutPeerhost
-
mockSSLEngineWithPeerhost
-
-
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
@Test public void testServerTrustedWithHostnameVerificationEnabledNoReverseLookup() throws Exception- Throws:
Exception
-
testServerTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup
@Test public void testServerTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup() throws Exception- Throws:
Exception
-
testClientTrustedWithHostnameVerificationDisabled
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabled
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabledUsingIpAddress
- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabledWithoutReverseLookup
@Test public void testClientTrustedWithHostnameVerificationEnabledWithoutReverseLookup() throws Exception- Throws:
Exception
-
testClientTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup
@Test public void testClientTrustedWithHostnameVerificationEnabledWithHostnameNoReverseLookup() throws Exception- Throws:
Exception
-
testClientTrustedSslEngineWithPeerHostReverseLookup
- Throws:
Exception
-
testClientTrustedSslEngineWithPeerHostNoReverseLookup
- Throws:
Exception
-
testClientTrustedSslEngineWithoutPeerHost
- Throws:
Exception
-
testClientTrustedSslEngineNotAvailable
- Throws:
Exception
-