Home
last modified time | relevance | path

Searched refs:privateKey (Results 1 – 25 of 35) sorted by relevance

12

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
DAsymmetricKeyParameter.java8 boolean privateKey; field in AsymmetricKeyParameter
11 boolean privateKey) in AsymmetricKeyParameter() argument
13 this.privateKey = privateKey; in AsymmetricKeyParameter()
18 return privateKey; in isPrivate()
/external/conscrypt/src/main/java/org/conscrypt/
DOpenSSLECPrivateKey.java81 static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
84 if (privateKey instanceof ECKey) { in wrapJCAPrivateKeyForTLSStackOnly()
85 params = ((ECKey) privateKey).getParams(); in wrapJCAPrivateKeyForTLSStackOnly()
90 throw new InvalidKeyException("EC parameters not available. Private: " + privateKey in wrapJCAPrivateKeyForTLSStackOnly()
93 return wrapJCAPrivateKeyForTLSStackOnly(privateKey, params); in wrapJCAPrivateKeyForTLSStackOnly()
101 static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
104 if (privateKey instanceof ECKey) { in wrapJCAPrivateKeyForTLSStackOnly()
105 params = ((ECKey) privateKey).getParams(); in wrapJCAPrivateKeyForTLSStackOnly()
109 throw new InvalidKeyException("EC parameters not available: " + privateKey); in wrapJCAPrivateKeyForTLSStackOnly()
120 NativeCrypto.getECPrivateKeyWrapper(privateKey, group.getNativeRef()), true); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLSignatureRawRSA.java85 protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException { in engineInitSign() argument
86 if (privateKey instanceof OpenSSLRSAPrivateKey) { in engineInitSign()
87 OpenSSLRSAPrivateKey rsaPrivateKey = (OpenSSLRSAPrivateKey) privateKey; in engineInitSign()
89 } else if (privateKey instanceof RSAPrivateCrtKey) { in engineInitSign()
90 RSAPrivateCrtKey rsaPrivateKey = (RSAPrivateCrtKey) privateKey; in engineInitSign()
92 } else if (privateKey instanceof RSAPrivateKey) { in engineInitSign()
93 RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey; in engineInitSign()
DOpenSSLKey.java110 PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException { in fromPrivateKeyForTLSStackOnly() argument
111 OpenSSLKey result = getOpenSSLKey(privateKey); in fromPrivateKeyForTLSStackOnly()
116 result = fromKeyMaterial(privateKey); in fromPrivateKeyForTLSStackOnly()
121 return wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in fromPrivateKeyForTLSStackOnly()
188 private static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
190 String keyAlgorithm = privateKey.getAlgorithm(); in wrapJCAPrivateKeyForTLSStackOnly()
192 return OpenSSLRSAPrivateKey.wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
194 return OpenSSLECPrivateKey.wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLRSAPrivateKey.java110 static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
113 if (privateKey instanceof RSAKey) { in wrapJCAPrivateKeyForTLSStackOnly()
114 modulus = ((RSAKey) privateKey).getModulus(); in wrapJCAPrivateKeyForTLSStackOnly()
119 throw new InvalidKeyException("RSA modulus not available. Private: " + privateKey in wrapJCAPrivateKeyForTLSStackOnly()
123 NativeCrypto.getRSAPrivateKeyWrapper(privateKey, modulus.toByteArray()), true); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLSocketImpl.java950 public void setChannelIdPrivateKey(PrivateKey privateKey) { in setChannelIdPrivateKey() argument
963 if (privateKey == null) { in setChannelIdPrivateKey()
970 if (privateKey instanceof ECKey) { in setChannelIdPrivateKey()
971 ecParams = ((ECKey) privateKey).getParams(); in setChannelIdPrivateKey()
979 OpenSSLKey.fromECPrivateKeyForTLSStackOnly(privateKey, ecParams); in setChannelIdPrivateKey()
DOpenSSLSignature.java137 protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException { in engineInitSign() argument
138 initInternal(OpenSSLKey.fromPrivateKey(privateKey), true); in engineInitSign()
/external/oauth/core/src/main/java/net/oauth/signature/
DRSA_SHA1.java89 private PrivateKey privateKey = null; field in RSA_SHA1
101 privateKey = (PrivateKey)privateKeyObject; in initialize()
103 privateKey = getPrivateKeyFromPem((String)privateKeyObject); in initialize()
105 privateKey = getPrivateKeyFromDer((byte[])privateKeyObject); in initialize()
216 if (privateKey == null) { in sign()
222 signer.initSign(privateKey); in sign()
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/
DKeyStore2Test.java52 static PrivateKey privateKey; field in KeyStore2Test
62 privateKey = keyPair.getPrivate();
147 keyTest.setKeyEntry("alias2", privateKey, pssWord, cert); in creatCertificate()
276 keyTest.setKeyEntry("alias2", privateKey, pssWord, cert); in test_getCertificateAliasLjava_security_cert_Certificate()
307 keyTest.setKeyEntry("alias2", privateKey, pssWord, cert); in test_getCertificateChainLjava_lang_String()
367 keyTest.setKeyEntry("alias2", privateKey, pssWord, cert); in test_getKeyLjava_lang_String$C()
370 byte[] priB = privateKey.getEncoded(); in test_getKeyLjava_lang_String$C()
373 .equals(privateKey.getAlgorithm()); in test_getKeyLjava_lang_String$C()
374 equality &= returnedKey.getFormat().equals(privateKey.getFormat()); in test_getKeyLjava_lang_String$C()
432 keyTest.setKeyEntry("alias2", privateKey, pssWord, cert); in test_isCertificateEntryLjava_lang_String()
[all …]
DSignerTest.java101 PrivateKeyStub privateKey = new PrivateKeyStub("private", "fff", privateKeyData); in testGetPrivateKey() local
103 KeyPair kp = new KeyPair(publicKey, privateKey); in testGetPrivateKey()
110 assertSame(privateKey, s.getPrivateKey()); in testGetPrivateKey()
DKeyStorePrivateKeyEntryTest.java69 PrivateKey privateKey = keyPair.getPrivate(); in testGetCertificateChain() local
74 privateKey, new Certificate[] { certificate }); in testGetCertificateChain()
DKeyFactory2Test.java111 PrivateKey privateKey = fact.generatePrivate(privateKeySpec); in test_generatePrivateLjava_security_spec_KeySpec() local
113 .getEncoded(), privateKey.getEncoded()); in test_generatePrivateLjava_security_spec_KeySpec()
262 PrivateKey privateKey = fact.generatePrivate(privateKeySpec); in test_getKeySpecLjava_security_KeyLjava_lang_Class() local
267 .getEncoded(), privateKey.getEncoded()); in test_getKeySpecLjava_security_KeyLjava_lang_Class()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
DPrivateKeyInfo.java53 ASN1Encodable privateKey) in PrivateKeyInfo() argument
56 this(algId, privateKey, null); in PrivateKeyInfo()
61 ASN1Encodable privateKey, in PrivateKeyInfo() argument
65 … this.privKey = new DEROctetString(privateKey.toASN1Primitive().getEncoded(ASN1Encoding.DER)); in PrivateKeyInfo()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/
DDSASigner.java95 PrivateKey privateKey, in engineInitSign() argument
100 engineInitSign(privateKey); in engineInitSign()
104 PrivateKey privateKey) in engineInitSign() argument
109 param = DSAUtil.generatePrivateKeyParameter(privateKey); in engineInitSign()
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/operator/jcajce/
DJcaContentSignerBuilder.java56 public ContentSigner build(PrivateKey privateKey) in build() argument
65 sig.initSign(privateKey, random); in build()
69 sig.initSign(privateKey); in build()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/
DDigestSignatureSpi.java93 PrivateKey privateKey) in engineInitSign() argument
96 if (!(privateKey instanceof RSAPrivateKey)) in engineInitSign()
98 …throw new InvalidKeyException("Supplied key (" + getType(privateKey) + ") is not a RSAPrivateKey i… in engineInitSign()
101 CipherParameters param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); in engineInitSign()
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/serialization/
DKeyPairTest.java46 PrivateKeyStub privateKey = new PrivateKeyStub("privateAlgorithm", in setUp() local
51 keyPair = new KeyPair(publicKey, privateKey); in setUp()
/external/apache-harmony/x-net/src/test/impl/java/org/apache/harmony/xnet/tests/provider/jsse/
DDigitalSignatureTest.java79 PrivateKey privateKey = keyFactory in test_Sign() local
122 dsig.init(privateKey); in test_Sign()
/external/boringssl/src/crypto/ec/
Dec_asn1.c135 ASN1_OCTET_STRING *privateKey; member
155 ASN1_SIMPLE(EC_PRIVATEKEY, privateKey, ASN1_OCTET_STRING),
317 if (priv_key->privateKey) { in d2i_ECPrivateKey()
319 BN_bin2bn(M_ASN1_STRING_data(priv_key->privateKey), in d2i_ECPrivateKey()
320 M_ASN1_STRING_length(priv_key->privateKey), ret->priv_key); in d2i_ECPrivateKey()
414 if (!M_ASN1_OCTET_STRING_set(priv_key->privateKey, buffer, buf_len)) { in i2d_ECPrivateKey()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/
DECUtil.java207 … PrivateKey privateKey = BouncyCastleProvider.getPrivateKey(PrivateKeyInfo.getInstance(bytes)); in generatePrivateKeyParameter() local
209 if (privateKey instanceof java.security.interfaces.ECPrivateKey) in generatePrivateKeyParameter()
211 return ECUtil.generatePrivateKeyParameter(privateKey); in generatePrivateKeyParameter()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/
DSignatureSpi.java58 PrivateKey privateKey) in engineInitSign() argument
61 CipherParameters param = ECUtil.generatePrivateKeyParameter(privateKey); in engineInitSign()
/external/apache-harmony/security/src/test/support/common/java/org/apache/harmony/security/tests/support/
DMySignature2.java49 protected void engineInitSign(PrivateKey privateKey) in engineInitSign() argument
DMySignature1.java64 protected void engineInitSign(PrivateKey privateKey) in engineInitSign() argument
/external/conscrypt/src/compat/java/org/conscrypt/
DKitKatPlatformOpenSSLSocketImplAdapter.java410 public void setChannelIdPrivateKey(PrivateKey privateKey) { in setChannelIdPrivateKey() argument
411 delegate.setChannelIdPrivateKey(privateKey); in setChannelIdPrivateKey()
DPreKitKatPlatformOpenSSLSocketImplAdapter.java410 public void setChannelIdPrivateKey(PrivateKey privateKey) { in setChannelIdPrivateKey() argument
411 delegate.setChannelIdPrivateKey(privateKey); in setChannelIdPrivateKey()

12