/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | SecurityTest.java | 27 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 …]
|
D | Security2Test.java | 22 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 …]
|
D | Provider2Test.java | 23 import java.security.Security; 140 Security.addProvider(mockProvider); in test_getAlias() 149 Security.removeProvider("MOCKNAME"); in test_getAlias()
|
D | KeyStoreTest.java | 29 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()
|
D | IdentityScopeTest.java | 28 import java.security.Security; 90 String name = Security.getProperty("system.scope"); in testGetSystemScope()
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | CipherTest.java | 23 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 …]
|
D | KeyAgreementTest.java | 21 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()
|
D | MacTest.java | 23 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/ |
D | SSLServerSocketFactoryTest.java | 22 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()
|
D | SSLSocketFactoryTest.java | 24 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/ |
D | ProviderTest.java | 25 import java.security.Security; 91 Provider[] providers = Security.getProviders(); in test_Provider_getServices() 217 Provider[] providers = Security.getProviders(); in testProviderList() 254 Provider[] providers = Security.getProviders(); in test_Provider_Properties() 367 Provider conscrypt = Security.getProvider("AndroidOpenSSL"); in test_Provider_ConscryptOverridesBouncyCastle() 368 Provider bc = Security.getProvider("BC"); in test_Provider_ConscryptOverridesBouncyCastle() 453 Provider[] providers = Security.getProviders(); in test_Provider_getServices_supportsParameter() 503 Security.addProvider(provider); in testProviderService_supportsParameter_UnknownService_Success() 508 Security.removeProvider(provider.getName()); in testProviderService_supportsParameter_UnknownService_Success() 523 Security.addProvider(provider); in testProviderService_supportsParameter_KnownService_NoClassInitialization_Success() [all …]
|
D | SecureRandomTest.java | 21 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/ |
D | ProviderBenchmark.java | 20 import java.security.Security; 32 Security.addProvider(new MockProvider()); in timeWithNewProvider() 36 Security.removeProvider("Mock"); in timeWithNewProvider()
|
/libcore/luni/src/test/java/tests/targets/security/ |
D | MessageDigestTestMD2.java | 21 import java.security.Security; 46 Security.addProvider(provider); in testMessageDigest2() 53 Security.removeProvider(provider.getName()); in testMessageDigest2()
|
D | SignatureTestMD2withRSA.java | 24 import java.security.Security; 95 Security.addProvider(provider); in testSignature2() 106 Security.removeProvider(provider.getName()); in testSignature2()
|
/libcore/luni/src/test/java/libcore/sun/security/jca/ |
D | ProvidersTest.java | 34 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/tools/crypto/src/java/libcore/java/security/ |
D | ProviderOverlap.java | 20 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/support/src/test/java/org/apache/harmony/security/tests/support/ |
D | SpiEngUtils.java | 25 import java.security.Security; 49 Provider[] provs = Security.getProviders(service.concat(".") in isSupport()
|
/libcore/ojluni/src/main/java/java/security/ |
D | AlgorithmParameterGenerator.java | 182 Object[] objs = Security.getImpl(algorithm, in getInstance() 235 Object[] objs = Security.getImpl(algorithm, in getInstance() 279 Object[] objs = Security.getImpl(algorithm, in getInstance()
|
D | AlgorithmParameters.java | 241 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/luni/src/test/java/tests/security/cert/ |
D | CertPathValidator2Test.java | 35 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/ |
D | StandardNames.java | 22 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/javax/net/ssl/ |
D | KeyManagerFactory.java | 28 import java.security.Security; 85 return Security.getProperty( in getDefaultAlgorithm()
|
D | TrustManagerFactory.java | 28 import java.security.Security; 85 return Security.getProperty( in getDefaultAlgorithm()
|
D | SSLSocketFactory.java | 99 if (defaultSocketFactory != null && lastVersion == Security.getVersion()) { in getDefault() 103 lastVersion = Security.getVersion(); in getDefault() 166 String s = java.security.Security.getProperty(name); in getSecurityProperty()
|