Home
last modified time | relevance | path

Searched refs:Security (Results 1 – 25 of 95) sorted by relevance

1234

/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecurityTest.java27 import java.security.Security;
44 Security.insertProviderAt(null, 1); in test_insertProviderAtLjava_security_ProviderLI()
50 int initNum = Security.getProviders().length; // initial number of in test_insertProviderAtLjava_security_ProviderLI()
52 Provider initialSecondProviderName = Security.getProviders()[1]; in test_insertProviderAtLjava_security_ProviderLI()
57 assertEquals(initNum + 1, Security.insertProviderAt(p, -1)); in test_insertProviderAtLjava_security_ProviderLI()
58 assertSame(p, Security.getProviders()[initNum]); in test_insertProviderAtLjava_security_ProviderLI()
61 assertEquals(-1, Security.insertProviderAt(p, 1)); in test_insertProviderAtLjava_security_ProviderLI()
63 Security.removeProvider(p.getName()); in test_insertProviderAtLjava_security_ProviderLI()
66 assertEquals(initNum + 1, Security.insertProviderAt(p, in test_insertProviderAtLjava_security_ProviderLI()
68 assertSame(p, Security.getProviders()[initNum]); in test_insertProviderAtLjava_security_ProviderLI()
[all …]
DSecurity2Test.java22 import java.security.Security;
40 Provider[] allProviders = Security.getProviders(); in test_getProvidersLjava_lang_String()
77 Provider[] provTest = Security.getProviders(filterString); in test_getProvidersLjava_lang_String()
89 Security.getProviders("Signature.SHA1withDSA :512"); in test_getProvidersLjava_lang_String()
116 Provider[] allProviders = Security.getProviders(); in getProvidersCount()
185 Provider[] provTest = Security.getProviders(filter); in test_getProvidersLjava_util_Map()
198 provTest = Security.getProviders(filter); in test_getProvidersLjava_util_Map()
211 provTest = Security.getProviders(filter); in test_getProvidersLjava_util_Map()
223 provTest = Security.getProviders(filter); in test_getProvidersLjava_util_Map()
234 provTest = Security.getProviders(filter); in test_getProvidersLjava_util_Map()
[all …]
DProvider2Test.java23 import java.security.Security;
140 Security.addProvider(mockProvider); in test_getAlias()
149 Security.removeProvider("MOCKNAME"); in test_getAlias()
DKeyStoreTest.java29 import java.security.Security;
89 Security.insertProviderAt(mProv, 2); in setUp()
101 Security.removeProvider(mProv.getName()); in tearDown()
188 String defKSType = Security.getProperty(propName); in testKeyStore01()
198 Security.setProperty(propName, defaultType); in testKeyStore01()
200 resType = Security.getProperty(propName); in testKeyStore01()
DIdentityScopeTest.java28 import java.security.Security;
90 String name = Security.getProperty("system.scope"); in testGetSystemScope()
DSignature2Test.java33 import java.security.Security;
114 Provider[] providers = Security.getProviders("Signature.DSA"); in test_getInstanceLjava_lang_StringLjava_lang_String_java_security_Provider()
153 Provider[] providers = Security.getProviders("Signature.DSA"); in test_getInstanceLjava_lang_StringLjava_lang_String()
165 Provider[] pp = Security.getProviders(); in test_getInstanceLjava_lang_StringLjava_lang_String()
278 Security.addProvider(myProvider); in test_initVerifyLjava_security_Certificate()
281 Provider[] pp = Security.getProviders(); in test_initVerifyLjava_security_Certificate()
292 Security.removeProvider(myProvider.getName()); in test_initVerifyLjava_security_Certificate()
/libcore/luni/src/test/java/libcore/javax/crypto/
DCipherTest.java23 import java.security.Security;
65 Security.addProvider(mockProvider); in testCipher_getInstance_DoesNotSupportKeyClass_Success()
71 Security.removeProvider(mockProvider.getName()); in testCipher_getInstance_DoesNotSupportKeyClass_Success()
98 Security.addProvider(mockProvider); in testCipher_getInstance_OnlyUsesSpecifiedProvider_SameNameAndClass_Success()
110 Security.removeProvider(mockProvider.getName()); in testCipher_getInstance_OnlyUsesSpecifiedProvider_SameNameAndClass_Success()
133 Security.addProvider(mockProviderSpecific); in testCipher_getInstance_DelayedInitialization_KeyType()
134 Security.addProvider(mockProviderSpecific2); in testCipher_getInstance_DelayedInitialization_KeyType()
135 Security.addProvider(mockProviderAll); in testCipher_getInstance_DelayedInitialization_KeyType()
139 System.out.println(Arrays.deepToString(Security.getProviders("Cipher.FOO"))); in testCipher_getInstance_DelayedInitialization_KeyType()
183 Security.removeProvider(mockProviderSpecific.getName()); in testCipher_getInstance_DelayedInitialization_KeyType()
[all …]
DKeyAgreementTest.java21 import java.security.Security;
63 Security.addProvider(mockProvider); in testKeyAgreement_getInstance_DoesNotSupportKeyClass_Success()
69 Security.removeProvider(mockProvider.getName()); in testKeyAgreement_getInstance_DoesNotSupportKeyClass_Success()
88 Security.addProvider(mockProvider); in testKeyAgreement_init_DoesNotSupportKeyClass_throwsInvalidKeyException()
95 Security.removeProvider(mockProvider.getName()); in testKeyAgreement_init_DoesNotSupportKeyClass_throwsInvalidKeyException()
DMacTest.java23 import java.security.Security;
67 Security.addProvider(mockProvider); in testMac_init_DoesNotSupportKeyClass_throwsInvalidKeyException()
74 Security.removeProvider(mockProvider.getName()); in testMac_init_DoesNotSupportKeyClass_throwsInvalidKeyException()
83 Provider androidOpenSSLProvider = Security.getProvider("AndroidOpenSSL"); in testMac_correctAlias()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLServerSocketFactoryTest.java22 import java.security.Security;
47 Security.insertProviderAt(fakeProvider, 1); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
57 Security.removeProvider(fakeProvider.getName()); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
68 Security.setProperty(SSL_PROPERTY, FakeSSLServerSocketFactory.class.getName()); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
79 Security.setProperty(SSL_PROPERTY, origProvider); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
87 String origProvider = Security.getProperty(SSL_PROPERTY); in resetSslProvider()
90 Field field_secprops = Security.class.getDeclaredField("props"); in resetSslProvider()
94 Method m_increaseVersion = Security.class.getDeclaredMethod("increaseVersion"); in resetSslProvider()
101 assertNull(Security.getProperty(SSL_PROPERTY)); in resetSslProvider()
DSSLSocketFactoryTest.java24 import java.security.Security;
49 Security.insertProviderAt(fakeProvider, 1); in test_SSLSocketFactory_getDefault_cacheInvalidate()
59 Security.removeProvider(fakeProvider.getName()); in test_SSLSocketFactory_getDefault_cacheInvalidate()
69 Security.setProperty(SSL_PROPERTY, FakeSSLSocketFactory.class.getName()); in test_SSLSocketFactory_getDefault_cacheInvalidate()
80 Security.setProperty(SSL_PROPERTY, origProvider); in test_SSLSocketFactory_getDefault_cacheInvalidate()
88 String origProvider = Security.getProperty(SSL_PROPERTY); in resetSslProvider()
91 Field field_secprops = Security.class.getDeclaredField("props"); in resetSslProvider()
95 Method m_increaseVersion = Security.class.getDeclaredMethod("increaseVersion"); in resetSslProvider()
102 assertNull(Security.getProperty(SSL_PROPERTY)); in resetSslProvider()
/libcore/luni/src/test/java/libcore/java/security/
DProviderTest.java25 import java.security.Security;
90 Provider[] providers = Security.getProviders(); in test_Provider_getServices()
216 Provider[] providers = Security.getProviders(); in testProviderList()
253 Provider[] providers = Security.getProviders(); in test_Provider_Properties()
366 Provider conscrypt = Security.getProvider("AndroidOpenSSL"); in test_Provider_ConscryptOverridesBouncyCastle()
367 Provider bc = Security.getProvider("BC"); in test_Provider_ConscryptOverridesBouncyCastle()
452 Provider[] providers = Security.getProviders(); in test_Provider_getServices_supportsParameter()
502 Security.addProvider(provider); in testProviderService_supportsParameter_UnknownService_Success()
507 Security.removeProvider(provider.getName()); in testProviderService_supportsParameter_UnknownService_Success()
522 Security.addProvider(provider); in testProviderService_supportsParameter_KnownService_NoClassInitialization_Success()
[all …]
DSignatureTest.java32 import java.security.Security;
87 Security.addProvider(mockProvider); in testSignature_getInstance_DoesNotSupportKeyClass_Success()
93 Security.removeProvider(mockProvider.getName()); in testSignature_getInstance_DoesNotSupportKeyClass_Success()
112 Security.addProvider(mockProvider); in testSignature_init_DoesNotSupportKeyClass_throwsInvalidKeyException()
119 Security.removeProvider(mockProvider.getName()); in testSignature_init_DoesNotSupportKeyClass_throwsInvalidKeyException()
132 Security.addProvider(mockProvider); in testSignature_getInstance_OnlyUsesSpecifiedProvider_SameNameAndClass_Success()
145 Security.removeProvider(mockProvider.getName()); in testSignature_getInstance_OnlyUsesSpecifiedProvider_SameNameAndClass_Success()
171 Security.addProvider(mockProviderSpecific); in testSignature_getInstance_DelayedInitialization_KeyType()
172 Security.addProvider(mockProviderSpecific2); in testSignature_getInstance_DelayedInitialization_KeyType()
173 Security.addProvider(mockProviderAll); in testSignature_getInstance_DelayedInitialization_KeyType()
[all …]
DSecureRandomTest.java21 import java.security.Security;
36 Provider[] providers = Security.getProviders(); in test_getInstance()
119 for (Provider p : Security.getProviders()) { in testGetInstanceStrong()
138 Security.insertProviderAt(weakProvider, 1); in testGetInstanceStrong()
145 Security.removeProvider(weakProvider.getName()); in testGetInstanceStrong()
/libcore/benchmarks/src/benchmarks/regression/
DProviderBenchmark.java20 import java.security.Security;
32 Security.addProvider(new MockProvider()); in timeWithNewProvider()
36 Security.removeProvider("Mock"); in timeWithNewProvider()
/libcore/luni/src/test/java/libcore/sun/security/jca/
DProvidersTest.java34 import java.security.Security;
397 for (int i = 0; i < Security.getProviders().length; i++) { in testCustomProvider()
398 if (Security.getProviders()[i].getName().equals("BC")) { in testCustomProvider()
399 originalBouncyCastle = Security.getProviders()[i]; in testCustomProvider()
409 Security.removeProvider("BC"); in testCustomProvider()
410 Security.insertProviderAt(newBouncyCastle, originalBouncyCastleIndex); in testCustomProvider()
425 Security.removeProvider("BC"); in testCustomProvider()
426 Security.insertProviderAt(originalBouncyCastle, originalBouncyCastleIndex); in testCustomProvider()
437 Provider bcProvider = Security.getProvider("BC"); in testRemovedBCAlgorithms()
/libcore/luni/src/test/java/tests/targets/security/
DMessageDigestTestMD2.java21 import java.security.Security;
46 Security.addProvider(provider); in testMessageDigest2()
53 Security.removeProvider(provider.getName()); in testMessageDigest2()
DSignatureTestMD2withRSA.java24 import java.security.Security;
95 Security.addProvider(provider); in testSignature2()
106 Security.removeProvider(provider.getName()); in testSignature2()
/libcore/tools/crypto/src/java/libcore/java/security/
DProviderOverlap.java20 import java.security.Security;
36 Set<String> conscrypt = getAlgorithms(Security.getProvider("AndroidOpenSSL")); in main()
37 Set<String> bc = getAlgorithms(Security.getProvider("BC")); in main()
/libcore/ojluni/src/main/java/java/security/
DAlgorithmParameterGenerator.java182 Object[] objs = Security.getImpl(algorithm, in getInstance()
235 Object[] objs = Security.getImpl(algorithm, in getInstance()
279 Object[] objs = Security.getImpl(algorithm, in getInstance()
DAlgorithmParameters.java241 Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters", in getInstance()
296 Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters", in getInstance()
343 Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters", in getInstance()
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DSpiEngUtils.java25 import java.security.Security;
49 Provider[] provs = Security.getProviders(service.concat(".") in isSupport()
/libcore/luni/src/test/java/tests/security/cert/
DCertPathValidator2Test.java35 import java.security.Security;
69 Security.insertProviderAt(mProv, 1); in setUp()
77 Security.removeProvider(mProv.getName()); in tearDown()
85 Security.setProperty(propName, invalidValues[i]); in checkResult()
89 Security.setProperty(propName, dt); in checkResult()
/libcore/support/src/test/java/libcore/java/security/
DStandardNames.java22 import java.security.Security;
319 if (Security.getProvider("SunPKCS11-NSS") != null) {
336 if (Security.getProvider("SunPKCS11-NSS") != null ||
337 Security.getProvider("SunEC") != null) {
599 if (Security.getProvider("AndroidKeyStore") != null) {
604 if (Security.getProvider("TimaKeyStore") != null) {
608 if (Security.getProvider("KnoxAndroidKeyStore") != null) {
/libcore/ojluni/src/main/java/sun/security/util/
DAbstractAlgorithmConstraints.java31 import java.security.Security;
52 return Security.getProperty(propertyName); in getAlgorithms()

1234