Package javax.net.ssl

Interface X509KeyManager

    • Method Detail

      • chooseClientAlias

        String chooseClientAlias​(String[] keyType,
                                 Principal[] issuers,
                                 Socket socket)
        Chooses an alias for the client side of an SSL connection to authenticate it with the specified public key type and certificate issuers.
        Parameters:
        keyType - the list of public key algorithm names.
        issuers - the list of certificate issuers, or null if any issuer will do.
        socket - the socket for the connection, or null if the alias selected does not depend on a specific socket.
        Returns:
        the alias name of a matching key or null if there are no matches.
      • chooseServerAlias

        String chooseServerAlias​(String keyType,
                                 Principal[] issuers,
                                 Socket socket)
        Chooses an alias for the server side of an SSL connection to authenticate it with the specified public key type and certificate issuers.
        Parameters:
        keyType - the list of public key algorithm type names.
        issuers - the list of certificate issuers, or null if any issuer will do.
        socket - the socket for the connection, or null if the alias selected does not depend on a specific socket.
        Returns:
        the alias name of a matching key or null if there are no matches.
      • getCertificateChain

        X509Certificate[] getCertificateChain​(String alias)
        Returns the certificate chain for the specified alias.
        Parameters:
        alias - the alias to get the certificate chain for.
        Returns:
        the certificate chain for the specified alias, or null if the alias cannot be found.
      • getClientAliases

        String[] getClientAliases​(String keyType,
                                  Principal[] issuers)
        Returns the client aliases for the specified public key type and list of certificate issuers.
        Parameters:
        keyType - the public key algorithm type name.
        issuers - the list of certificate issuers, or null if any issuer will do.
        Returns:
        the client aliases for the specified public key type, or null if there are no matching aliases.
      • getServerAliases

        String[] getServerAliases​(String keyType,
                                  Principal[] issuers)
        Returns the server aliases for the specified public key type and list of certificate issuers.
        Parameters:
        keyType - the public key algorithm type name.
        issuers - the list of certificate issuers, or null if any issuer will do.
        Returns:
        the client aliases for the specified public key type, or null if there are no matching aliases.
      • getPrivateKey

        PrivateKey getPrivateKey​(String alias)
        Returns the private key for the specified alias.
        Parameters:
        alias - the alias to get the private key for.
        Returns:
        the private key for the specified alias, or null if the alias cannot be found.