Package io.servicetalk.test.resources
Class DefaultTestCerts
java.lang.Object
io.servicetalk.test.resources.DefaultTestCerts
Provides a set of certificates useful for tests that require SSL.
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamLoad the certificate of the Certificate Authority used to sign theloadClientPem().static InputStreamLoad the client private key.static InputStreamLoad the client certificate PKCS#12 keystore file.static InputStreamLoad the client certificate chain file.static InputStreamLoad the certificate of the Certificate Authority used to sign theloadServerPem().static InputStreamLoad the server private key.static InputStreamLoad the server certificate PKCS#12 keystore file.static InputStreamLoad the server certificate chain file.static InputStreamLoad the PKCS#12 truststore file.static StringGet the hostname contained withinloadServerPem()which should match for client hostname verification.
-
Method Details
-
loadServerKey
Load the server private key.- Returns:
- an
InputStreamfrom the server private key file.
-
loadServerPem
Load the server certificate chain file.- Returns:
- an
InputStreamfrom the server certificate chain file.
-
loadServerP12
Load the server certificate PKCS#12 keystore file.- Returns:
- an
InputStreamfrom the server key/certificate keystore file.
-
serverPemHostname
Get the hostname contained withinloadServerPem()which should match for client hostname verification.- Returns:
- hostname contained within
loadServerPem()which should match for client hostname verification.
-
loadServerCAPem
Load the certificate of the Certificate Authority used to sign theloadServerPem().- Returns:
- an
InputStreamwhose contents is the certificate of the Certificate Authority used to sign theloadServerPem().
-
loadClientKey
Load the client private key.- Returns:
- an
InputStreamfrom the client private key file.
-
loadClientPem
Load the client certificate chain file.- Returns:
- an
InputStreamfrom the client certificate chain file.
-
loadClientCAPem
Load the certificate of the Certificate Authority used to sign theloadClientPem().- Returns:
- an
InputStreamwhose contents is the certificate of the Certificate Authority used to sign theloadClientPem().
-
loadClientP12
Load the client certificate PKCS#12 keystore file.- Returns:
- an
InputStreamfrom the client key/certificate keystore file.
-
loadTruststoreP12
Load the PKCS#12 truststore file.- Returns:
- an
InputStreamfrom the truststore file.
-