private static OpenSSLKey getOpenSSLKey(PrivateKey key) {
        if (key instanceof OpenSSLKeyHolder) {
            return ((OpenSSLKeyHolder) key).getOpenSSLKey();
        }
        return null;
    }
Gets the {@code OpenSSLKey} instance of the provided key.

@return instance or {@code null} if the {@code key} is not backed by OpenSSL's
        {@code EVP_PKEY}.
common/src/main/java/org/conscrypt/OpenSSLKey.java