/** * 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)) ); }
return nextFragment(); return tlsResponse(flags, null); if (doTunnelAuthentication(id, in)) handler.writeApplicationData(is, os, getAppBuffer()); return nextFragment(); return tlsResponse(flags, data);
if (getKeyFile() != null) keyManagers = KeyStoreUtil.loadKeyManager(getKeyFileType(), new FileInputStream(getKeyFile()), getKeyPassword()); if (getTrustAll().booleanValue()) else if (getCaFile() != null) trustManagers = KeyStoreUtil.loadTrustManager(getCaFileType(), new FileInputStream(getCaFile()), getCaPassword()); tlsClient.enableClientAuthentication(new Certificate(certs), createKey(key.getEncoded())); handler.setSendCertificate(isCertificateRequired()); handler.setKeyManagers(keyManagers); handler.setTrustManagers(trustManagers);
if (getKeyFile() != null) keyManagers = KeyStoreUtil.loadKeyManager(getKeyFileType(), new FileInputStream(getKeyFile()), getKeyPassword()); if (getTrustAll().booleanValue()) else if (getCaFile() != null) trustManagers = KeyStoreUtil.loadTrustManager(getCaFileType(), new FileInputStream(getCaFile()), getCaPassword()); tlsClient.enableClientAuthentication(new Certificate(certs), createKey(key.getEncoded())); handler.setSendCertificate(isCertificateRequired()); handler.setKeyManagers(keyManagers); handler.setTrustManagers(trustManagers);
if (getKeyFile() != null) keyManagers = KeyStoreUtil.loadKeyManager(getKeyFileType(), new FileInputStream(getKeyFile()), getKeyPassword()); if (getTrustAll().booleanValue()) else if (getCaFile() != null) trustManagers = KeyStoreUtil.loadTrustManager(getCaFileType(), new FileInputStream(getCaFile()), getCaPassword()); tlsClient.enableClientAuthentication(new Certificate(certs), createKey(key.getEncoded())); handler.setSendCertificate(isCertificateRequired()); handler.setKeyManagers(keyManagers); handler.setTrustManagers(trustManagers);
return nextFragment(); return tlsResponse(flags, null); if (doTunnelAuthentication(id, in)) handler.writeApplicationData(is, os, getAppBuffer()); return nextFragment(); return tlsResponse(flags, data);
/** * 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))); }
return nextFragment(); return tlsResponse(flags, null); if (doTunnelAuthentication(id, in)) handler.writeApplicationData(is, os, getAppBuffer()); return nextFragment(); return tlsResponse(flags, data);
/** * 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 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())); }