Class DefaultTestCerts

java.lang.Object
io.servicetalk.test.resources.DefaultTestCerts

public final class DefaultTestCerts extends Object
Provides a set of certificates useful for tests that require SSL.
  • Method Details

    • loadServerKey

      public static InputStream loadServerKey()
      Load the server private key.
      Returns:
      an InputStream from the server private key file.
    • loadServerPem

      public static InputStream loadServerPem()
      Load the server certificate chain file.
      Returns:
      an InputStream from the server certificate chain file.
    • loadServerP12

      public static InputStream loadServerP12()
      Load the server certificate PKCS#12 keystore file.
      Returns:
      an InputStream from the server key/certificate keystore file.
    • serverPemHostname

      public static String serverPemHostname()
      Get the hostname contained within loadServerPem() which should match for client hostname verification.
      Returns:
      hostname contained within loadServerPem() which should match for client hostname verification.
    • loadServerCAPem

      public static InputStream loadServerCAPem()
      Load the certificate of the Certificate Authority used to sign the loadServerPem().
      Returns:
      an InputStream whose contents is the certificate of the Certificate Authority used to sign the loadServerPem().
    • loadClientKey

      public static InputStream loadClientKey()
      Load the client private key.
      Returns:
      an InputStream from the client private key file.
    • loadClientPem

      public static InputStream loadClientPem()
      Load the client certificate chain file.
      Returns:
      an InputStream from the client certificate chain file.
    • loadClientCAPem

      public static InputStream loadClientCAPem()
      Load the certificate of the Certificate Authority used to sign the loadClientPem().
      Returns:
      an InputStream whose contents is the certificate of the Certificate Authority used to sign the loadClientPem().
    • loadClientP12

      public static InputStream loadClientP12()
      Load the client certificate PKCS#12 keystore file.
      Returns:
      an InputStream from the client key/certificate keystore file.
    • loadTruststoreP12

      public static InputStream loadTruststoreP12()
      Load the PKCS#12 truststore file.
      Returns:
      an InputStream from the truststore file.