/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding. * * @param privateKeyInfoData the PrivateKeyInfo encoding * @return a suitable private key parameter * @throws IOException on an error decoding the key */ public static AsymmetricKeyParameter createKey( byte[] privateKeyInfoData) throws IOException { return createKey( PrivateKeyInfo.getInstance( ASN1Object.fromByteArray(privateKeyInfoData))); }
/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding. * * @param privateKeyInfoData the PrivateKeyInfo encoding * @return a suitable private key parameter * @throws IOException on an error decoding the key */ public static AsymmetricKeyParameter createKey( byte[] privateKeyInfoData) throws IOException { return createKey( PrivateKeyInfo.getInstance( ASN1Object.fromByteArray(privateKeyInfoData))); }
/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding. * * @param privateKeyInfoData the PrivateKeyInfo encoding * @return a suitable private key parameter * @throws IOException on an error decoding the key */ public static AsymmetricKeyParameter createKey( byte[] privateKeyInfoData) throws IOException { return createKey( PrivateKeyInfo.getInstance(ASN1TaggedObject.fromByteArray(privateKeyInfoData)) ); }
/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream. * * @param inStr the stream to read the PrivateKeyInfo encoding from * @return a suitable private key parameter * @throws IOException on an error decoding the key */ public static AsymmetricKeyParameter createKey( InputStream inStr) throws IOException { return createKey( PrivateKeyInfo.getInstance( new ASN1InputStream(inStr).readObject())); }
/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream. * * @param inStr the stream to read the PrivateKeyInfo encoding from * @return a suitable private key parameter * @throws IOException on an error decoding the key */ public static AsymmetricKeyParameter createKey( InputStream inStr) throws IOException { return createKey( PrivateKeyInfo.getInstance( new ASN1InputStream(inStr).readObject())); }
/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream. * * @param inStr the stream to read the PrivateKeyInfo encoding from * @return a suitable private key parameter * @throws IOException on an error decoding the key */ public static AsymmetricKeyParameter createKey( InputStream inStr) throws IOException { return createKey( PrivateKeyInfo.getInstance( new ASN1InputStream(inStr).readObject())); }
tlsClient.enableClientAuthentication(new Certificate(certs), createKey(key.getEncoded()));
tlsClient.enableClientAuthentication(new Certificate(certs), createKey(key.getEncoded()));
tlsClient.enableClientAuthentication(new Certificate(certs), createKey(key.getEncoded()));