Package io.servicetalk.test.resources
Class DefaultTestCerts
- java.lang.Object
-
- io.servicetalk.test.resources.DefaultTestCerts
-
public final class DefaultTestCerts extends java.lang.Object
Provides a set of certificates useful for tests that require SSL.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.InputStream
loadClientCAPem()
Load the certificate of the Certificate Authority used to sign theloadClientPem()
.static java.io.InputStream
loadClientKey()
Load the client private key.static java.io.InputStream
loadClientPem()
Load the client certificate chain file.static java.io.InputStream
loadServerCAPem()
Load the certificate of the Certificate Authority used to sign theloadServerPem()
.static java.io.InputStream
loadServerKey()
Load the server private key.static java.io.InputStream
loadServerPem()
Load the server certificate chain file.static java.lang.String
serverPemHostname()
Get the hostname contained withinloadServerPem()
which should match for client hostname verification.
-
-
-
Method Detail
-
loadServerKey
public static java.io.InputStream loadServerKey()
Load the server private key.- Returns:
- an
InputStream
from the server private key file.
-
loadServerPem
public static java.io.InputStream loadServerPem()
Load the server certificate chain file.- Returns:
- an
InputStream
from the server certificate chain file.
-
serverPemHostname
public static java.lang.String 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
public static java.io.InputStream loadServerCAPem()
Load the certificate of the Certificate Authority used to sign theloadServerPem()
.- Returns:
- an
InputStream
whose contents is the certificate of the Certificate Authority used to sign theloadServerPem()
.
-
loadClientKey
public static java.io.InputStream loadClientKey()
Load the client private key.- Returns:
- an
InputStream
from the client private key file.
-
loadClientPem
public static java.io.InputStream loadClientPem()
Load the client certificate chain file.- Returns:
- an
InputStream
from the client certificate chain file.
-
loadClientCAPem
public static java.io.InputStream loadClientCAPem()
Load the certificate of the Certificate Authority used to sign theloadClientPem()
.- Returns:
- an
InputStream
whose contents is the certificate of the Certificate Authority used to sign theloadClientPem()
.
-
-