Code example for PrivateKey

Methods: getAlgorithm

0
    public String chooseServerAlias(String keyType, Principal[] issuers,
            Socket socket) {
        if (serverKeyAlias != null) {
            PrivateKey key = delegate.getPrivateKey(serverKeyAlias);
            if (key != null) {
                if (key.getAlgorithm().equals(keyType)) {
                    return serverKeyAlias;
                } else { 
                    return null; 
                } 
            } else { 
                return null; 
            } 
        } else { 
            return delegate.chooseServerAlias(keyType, issuers, socket);
        } 
    } 
 
    /** 
     * Returns the certificate chain associated with the given alias. 
Connect your IDE to all the code out there  Get Codota for Java