Home
last modified time | relevance | path

Searched refs:getProvider (Results 1 – 25 of 91) sorted by relevance

1234

/libcore/luni/src/test/java/libcore/java/security/
DSecureRandomTest.java54 assertEquals(provider, sr2.getProvider()); in test_getInstance()
60 assertEquals(provider, sr3.getProvider()); in test_getInstance()
99 assertEquals(EXPECTED_PROVIDER, sr.getProvider().getClass().getName()); in testGetCommonInstances_Success()
104 assertNotNull(sr1.getProvider()); in testNewConstructors_Success()
105 assertEquals(EXPECTED_PROVIDER, sr1.getProvider().getClass().getName()); in testNewConstructors_Success()
109 assertEquals(EXPECTED_PROVIDER, sr2.getProvider().getClass().getName()); in testNewConstructors_Success()
129 assertEquals(openSSLProvider, SecureRandom.getInstance("SHA1PRNG").getProvider()); in testGetInstanceStrong()
130 assertEquals(openSSLProvider, new SecureRandom().getProvider()); in testGetInstanceStrong()
140 assertEquals(weakProvider, SecureRandom.getInstance("SHA1PRNG").getProvider()); in testGetInstanceStrong()
141 assertEquals(weakProvider, new SecureRandom().getProvider()); in testGetInstanceStrong()
[all …]
/libcore/luni/src/test/java/libcore/javax/crypto/
DCipherTest.java53 assertEquals(mockProvider, c.getProvider()); in testCipher_getInstance_SuppliedProviderNotRegistered_Success()
69 assertEquals(mockProvider, c.getProvider()); in testCipher_getInstance_DoesNotSupportKeyClass_Success()
86 assertEquals(mockProvider, c.getProvider()); in testCipher_getInstance_SuppliedProviderNotRegistered_MultipartTransform_Success()
107 assertEquals(mockProvider2, c.getProvider()); in testCipher_getInstance_OnlyUsesSpecifiedProvider_SameNameAndClass_Success()
142 assertEquals(mockProviderSpecific, c.getProvider()); in testCipher_getInstance_DelayedInitialization_KeyType()
146 assertEquals(mockProviderSpecific2, c.getProvider()); in testCipher_getInstance_DelayedInitialization_KeyType()
175 assertEquals(mockProviderAll, c.getProvider()); in testCipher_getInstance_DelayedInitialization_KeyType()
180 assertEquals(mockProviderSpecific, c.getProvider()); in testCipher_getInstance_DelayedInitialization_KeyType()
205 assertEquals(mockProviderOnlyAlgorithm, c.getProvider()); in testCipher_getInstance_CorrectPriority_AlgorithmOnlyFirst()
228 assertEquals(mockProviderFullTransformSpecified, c.getProvider()); in testCipher_getInstance_CorrectPriority_FullTransformFirst()
[all …]
DKeyAgreementTest.java49 assertEquals(mockProvider, c.getProvider()); in testKeyAgreement_getInstance_SuppliedProviderNotRegistered_Success()
67 assertEquals(mockProvider, c.getProvider()); in testKeyAgreement_getInstance_DoesNotSupportKeyClass_Success()
/libcore/ojluni/src/main/java/sun/security/jca/
DProviderList.java97 if (providerList.getProvider(p.getName()) != null) {
112 if (providerList.getProvider(name) == null) {
119 if (config.getProvider().getName().equals(name) == false) {
148 return getProvider(index);
232 Provider getProvider(int index) {
233 Provider p = configs[index].getProvider();
252 public Provider getProvider(String name) {
254 return (config == null) ? null : config.getProvider();
263 Provider p = getProvider(i);
282 Provider p = configs[i].getProvider();
[all …]
/libcore/luni/src/test/java/libcore/sun/security/jca/
DProvidersTest.java321 private static Provider getProvider(Object object) throws Exception { in getProvider() method in ProvidersTest
335 assertEquals("BC", getProvider(result).getName()); in testBeforeLimit()
339 assertEquals("AndroidOpenSSL", getProvider(result).getName()); in testBeforeLimit()
355 assertEquals("BC", getProvider(result).getName()); in testAtLimit()
359 assertEquals("AndroidOpenSSL", getProvider(result).getName()); in testAtLimit()
383 assertEquals("AndroidOpenSSL", getProvider(result).getName()); in testPastLimit()
416 assertEquals("BC", getProvider(result).getName()); in testCustomProvider()
420 assertEquals("AndroidOpenSSL", getProvider(result).getName()); in testCustomProvider()
437 Provider bcProvider = Security.getProvider("BC"); in testRemovedBCAlgorithms()
/libcore/ojluni/src/main/java/javax/crypto/
DKeyAgreement.java203 if (JceSecurity.canUseProvider(s.getProvider()) == false) { in getInstance()
339 if (JceSecurity.canUseProvider(s.getProvider()) == false) { in chooseFirstProvider()
348 provider = s.getProvider(); in chooseFirstProvider()
399 if (JceSecurity.canUseProvider(s.getProvider()) == false) { in chooseProvider()
405 provider = s.getProvider(); in chooseProvider()
444 public final Provider getProvider() { in getProvider() method in KeyAgreement
DSecretKeyFactory.java443 public final Provider getProvider() { in getProvider() method in SecretKeyFactory
483 if (JceSecurity.canUseProvider(s.getProvider()) == false) { in nextSpi()
492 provider = s.getProvider(); in nextSpi()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DKeyGeneratorTest.java122 assertEquals("Incorrect provider", keyG.getProvider(), defaultProvider); in testKeyGenerator()
137 assertNull("Provider must be null", keyG.getProvider()); in testKeyGenerator()
267 assertEquals("Incorrect provider", keyG.getProvider().getName(), defaultProviderName); in testGetInstanceStringString03()
332 assertEquals("Incorrect provider", keyA.getProvider(), defaultProvider); in testGetInstanceStringProvider03()
359 assertEquals(defaultProvider, kgs[i].getProvider()); in testInitKey()
464 assertNotNull(kg.getProvider()); in test_getProvider()
468 assertNull(kg.getProvider()); in test_getProvider()
479 assertNotNull(kg.getProvider()); in test_initILjava_security_SecureRandom()
500 assertNotNull(kg.getProvider()); in test_Ljava_security_SecureRandom()
522 assertNotNull(kg.getProvider()); in test_initLjava_security_spec_AlgorithmParameterSpec()
DSecretKeyFactoryTest.java131 assertEquals("Incorrect provider", secKF.getProvider(), defaultProvider); in testSecretKeyFactory01()
137 assertNull("Provider must be null", secKF.getProvider()); in testSecretKeyFactory01()
270 assertEquals("Incorrect provider", secKF.getProvider().getName(), in testSecretKeyFactory06()
338 assertEquals("Incorrect provider", secKF.getProvider(), in testSecretKeyFactory09()
367 assertEquals(defaultProvider, skF[i].getProvider()); in testSecretKeyFactory10()
447 assertNotNull(secKF.getProvider()); in test_getProvider()
451 assertNull(msf.getProvider()); in test_getProvider()
463 assertNotNull(secKF.getProvider()); in test_translateKeyLjavax_crypto_SecretKey()
DMacTest.java91 defaultProvider = mac.getProvider();
242 assertEquals("Incorrect provider", mac.getProvider().getName(), in testMac05()
307 assertEquals("Incorrect provider", mac.getProvider(), defaultProvider); in testMac08()
570 assertEquals(mac1.getProvider(), macs[i].getProvider()); in testMacClone()
789 assertEquals("Incorrect provider", defaultProvider, mac.getProvider()); in testMacConstructor()
799 assertNull("Provider must be null", mac.getProvider()); in testMacConstructor()
827 assertNotNull(mac.getProvider()); in test_getProvider()
831 assertNull(mac.getProvider()); in test_getProvider()
926 assertEquals(mockProvider, s.getProvider()); in testMac_getInstance_DoesNotSupportKeyClass_Success()
942 assertEquals(mockProvider, s.getProvider()); in testMac_getInstance_SuppliedProviderNotRegistered_Success()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecureRandom2Test.java39 assertNotNull(sr1.getProvider()); in testGetProvider()
42 assertNotNull(sr2.getProvider()); in testGetProvider()
47 assertEquals(p, sr3.getProvider()); in testGetProvider()
50 assertNotNull(random.getProvider()); in testGetProvider()
101 assertEquals(p, sr.getProvider()); in test_ConstructorLjava_security_SecureRandomSpi_java_security_Provider()
DKeyFactory2Test.java100 assertEquals(providers[i], kf.getProvider()); in test_constructor()
157 + fact.getProvider().getName() + ")", in test_generatePublicLjava_security_spec_KeySpec()
252 + fact.getProvider().getName() + ")", in test_getKeySpecLjava_security_KeyLjava_lang_Class()
258 + fact.getProvider().getName() + ")", in test_getKeySpecLjava_security_KeyLjava_lang_Class()
278 Provider p = fact.getProvider(); in test_getProvider()
325 Provider provider = Security.getProvider(providerName); in getKeyFactoryAlgorithms()
DProviderServiceTest.java77 if (s.getProvider() != p) { in testService()
144 assertSame(p, s.getProvider()); in testNewlyCreatedServiceDoesntGetsRegistered()
186 assertTrue(s1.getProvider() == p); in testGetProvider()
191 assertTrue(s2.getProvider() == p); in testGetProvider()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneRulesProvider.java183 return getProvider(zoneId).provideRules(zoneId, forCaching); in getRules()
212 return getProvider(zoneId).provideVersions(zoneId); in getVersions()
222 private static ZoneRulesProvider getProvider(String zoneId) { in getProvider() method in ZoneRulesProvider
/libcore/luni/src/test/java/libcore/java/security/spec/
DAlgorithmParametersPSSTest.java74 assertNotNull(params.getProvider()); in testGetProvider()
150 if (!"BC".equals(params.getProvider().getName())) { in testGetEncodedWithBrokenInput()
152 "Unexpected exception. Provider: " + params.getProvider(), in testGetEncodedWithBrokenInput()
164 if (!"BC".equals(params.getProvider().getName())) { in testGetEncodedWithBrokenInput()
166 "Unexpected exception. Provider: " + params.getProvider(), in testGetEncodedWithBrokenInput()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLContext.java303 public final Provider getProvider() { in getProvider() method in SSLContext
377 "Provider: " + getProvider() + in createSSLEngine()
409 "Provider: " + getProvider() + in createSSLEngine()
/libcore/tools/crypto/src/java/libcore/java/security/
DProviderOverlap.java36 Set<String> conscrypt = getAlgorithms(Security.getProvider("AndroidOpenSSL")); in main()
37 Set<String> bc = getAlgorithms(Security.getProvider("BC")); in main()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DTrustManagerFactory1Test.java107 assertEquals("Incorrect provider", tmF.getProvider(), getDefaultProvider()); in test_ConstructorLjavax_net_ssl_TrustManagerFactorySpiLjava_security_ProviderLjava_lang_String()
112 assertNull("Provider must be null", tmF.getProvider()); in test_ConstructorLjavax_net_ssl_TrustManagerFactorySpiLjava_security_ProviderLjava_lang_String()
285 assertEquals("Invalid provider", trustMF.getProvider(), getDefaultProvider()); in test_getInstanceLjava_lang_StringLjava_lang_String04()
341 assertEquals("Invalid provider", trustMF.getProvider(), getDefaultProvider()); in test_getInstanceLjava_lang_StringLjava_security_Provider03()
355 .getInstance(getDefaultAlgorithm()).getProvider()); in test_getProvider()
360 .getProvider()); in test_getProvider()
364 .getProvider()); in test_getProvider()
DKeyManagerFactory1Test.java287 assertEquals("Incorrect provider", kMF.getProvider().getName(), in test_getInstanceLjava_lang_StringLjava_lang_String04()
359 assertEquals(kMF.getProvider(), defaultProvider); in test_getInstanceLjava_lang_StringLjava_security_Provider03()
377 assertEquals("Incorrect provider", keyMF.getProvider(), defaultProvider); in test_Constructor()
387 assertNull("Provider must be null", keyMF.getProvider()); in test_Constructor()
422 .getInstance(defaultAlgorithm).getProvider()); in test_getProvider()
427 .getProvider()); in test_getProvider()
431 .getProvider()); in test_getProvider()
/libcore/luni/src/test/java/libcore/java/security/cert/
DX509CertificateTest.java491 if ("BC".equals(f.getProvider().getName())) { in getIssuerDN()
493 assertEquals(f.getProvider().getName(), in getIssuerDN()
544 if ("BC".equals(f.getProvider().getName())) { in getSubjectDN()
546 assertEquals(f.getProvider().getName(), in getSubjectDN()
667 assertNull(f.getProvider().getName(), c.getSigAlgParams()); in getSigAlgParams()
669 assertNotNull(f.getProvider().getName(), c.getSigAlgParams()); in getSigAlgParams()
675 assertNull(f.getProvider().getName(), c.getSigAlgParams()); in getSigAlgParams()
680 assertNull(f.getProvider().getName(), c.getSigAlgParams()); in getSigAlgParams()
697 assertNotNull(f.getProvider().getName(), params); in getSigAlgParams()
802 assertEquals(f.getProvider().getName(), -1, c.getBasicConstraints()); in getBasicConstraints()
[all …]
DX509CRLTest.java173 interned.verify(caCert.getPublicKey(), f.getProvider()); in test_X509CRLImpl_verify()
220 crlRsa.verify(caCert.getPublicKey(), f.getProvider()); in verify()
225 if (!f.getProvider().getName().equals("AndroidOpenSSL")) { in verify()
241 crlRsa.verify(dsaCert.getPublicKey(), f.getProvider()); in verify()
249 if (!f.getProvider().getName().equals("AndroidOpenSSL")) { in verify()
275 if ("BC".equals(f.getProvider().getName())) { in isRevoked()
279 if (!"BC".equals(f.getProvider().getName())) { in isRevoked()
456 assertNull(f.getProvider().getName(), sigAlgParams); in getSigAlgParams()
458 assertNotNull(f.getProvider().getName(), sigAlgParams); in getSigAlgParams()
463 assertEquals(f.getProvider().getName(), Arrays.toString(expected), in getSigAlgParams()
[all …]
/libcore/luni/src/test/java/tests/java/security/
DSecureRandomTest.java103 sr.getProvider()!= p) { in testSecureRandom()
132 if (sr.getProvider() != p || !"someRandom".equals(sr.getAlgorithm())) { in testGetInstanceString()
142 if (sr.getProvider() != p || !"someRandom".equals(sr.getAlgorithm())) { in testGetInstanceStringString()
205 if (sr.getProvider() != p || !"someRandom".equals(sr.getAlgorithm())) { in testGetInstanceStringProvider()
/libcore/tools/docs/crypto/src/java/libcore/java/security/
DListProviders.java150 print(sslContext.getProvider(), "SSLEngine.Supported", suite); in main()
153 print(sslContext.getProvider(), "SSLEngine.Enabled", suite); in main()
157 print(sslContext.getProvider(), "SSLSocket.Supported", suite); in main()
160 print(sslContext.getProvider(), "SSLSocket.Enabled", suite); in main()
/libcore/luni/src/test/java/tests/security/cert/
DCertPathBuilder1Test.java229 … assertEquals("Incorrect provider name", certPB.getProvider().getName(), defaultProviderName); in testCertPathBuilder07()
292 assertEquals("Incorrect provider name", certPB.getProvider(), defaultProvider); in testCertPathBuilder10()
349 assertEquals("Incorrect provider", certPB.getProvider(), defaultProvider); in testCertPathBuilder12()
357 assertNull("Incorrect provider", certPB.getProvider()); in testCertPathBuilder12()
413 assertEquals("Incorrect provider", cpb2.getProvider(), in testCertPathBuilder14()
419 assertEquals("Incorrect provider", cpb3.getProvider(), in testCertPathBuilder14()
DCertPathValidator1Test.java249 assertEquals("Incorrect provider name", certPV.getProvider() in testCertPathValidator07()
316 assertEquals("Incorrect provider name", certPV.getProvider(), in testCertPathValidator10()
366 assertEquals("Incorrect provider", certPV.getProvider(), defaultProvider); in testCertPathValidator12()
375 assertNull("Incorrect provider", certPV.getProvider()); in testCertPathValidator12()
427 assertEquals("Incorrect provider", certPV.getProvider(), in testCertPathValidator14()
435 assertEquals("Incorrect provider", certPV.getProvider(), in testCertPathValidator14()

1234