/libcore/luni/src/main/java/java/security/ |
D | KeyPairGenerator.java | 43 private Provider provider; field in KeyPairGenerator 87 Provider provider = sap.provider; in getInstance() local 91 result.provider = provider; in getInstance() 94 return new KeyPairGeneratorImpl((KeyPairGeneratorSpi) spi, provider, algorithm); in getInstance() 113 public static KeyPairGenerator getInstance(String algorithm, String provider) in getInstance() argument 115 if (provider == null || provider.isEmpty()) { in getInstance() 118 Provider impProvider = Security.getProvider(provider); in getInstance() 120 throw new NoSuchProviderException(provider); in getInstance() 142 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument 143 if (provider == null) { in getInstance() [all …]
|
D | AlgorithmParameterGenerator.java | 39 private final Provider provider; field in AlgorithmParameterGenerator 59 AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, in AlgorithmParameterGenerator() argument 61 this.provider = provider; in AlgorithmParameterGenerator() 95 sap.provider, algorithm); in getInstance() 118 String provider) throws NoSuchAlgorithmException, in getInstance() argument 120 if (provider == null || provider.isEmpty()) { in getInstance() 123 Provider impProvider = Security.getProvider(provider); in getInstance() 125 throw new NoSuchProviderException(provider); in getInstance() 148 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument 149 if (provider == null) { in getInstance() [all …]
|
D | KeyFactory.java | 38 private final Provider provider; field in KeyFactory 58 Provider provider, in KeyFactory() argument 60 this.provider = provider; in KeyFactory() 82 return new KeyFactory((KeyFactorySpi) sap.spi, sap.provider, algorithm); in getInstance() 101 public static KeyFactory getInstance(String algorithm, String provider) in getInstance() argument 103 if (provider == null || provider.isEmpty()) { in getInstance() 106 Provider p = Security.getProvider(provider); in getInstance() 108 throw new NoSuchProviderException(provider); in getInstance() 128 public static KeyFactory getInstance(String algorithm, Provider provider) in getInstance() argument 130 if (provider == null) { in getInstance() [all …]
|
D | SecureRandom.java | 26 import org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl; 75 private final Provider provider; field in SecureRandom 91 this.provider = null; in SecureRandom() 96 this.provider = service.getProvider(); in SecureRandom() 125 Provider provider) { in SecureRandom() argument 126 this(secureRandomSpi, provider, "unknown"); in SecureRandom() 131 Provider provider, in SecureRandom() argument 134 this.provider = provider; in SecureRandom() 157 return new SecureRandom((SecureRandomSpi) sap.spi, sap.provider, in getInstance() 179 public static SecureRandom getInstance(String algorithm, String provider) in getInstance() argument [all …]
|
D | MessageDigest.java | 57 private Provider provider; field in MessageDigest 93 Provider provider = sap.provider; in getInstance() local 97 result.provider = provider; in getInstance() 100 return new MessageDigestImpl((MessageDigestSpi) sap.spi, sap.provider, algorithm); in getInstance() 121 public static MessageDigest getInstance(String algorithm, String provider) in getInstance() argument 123 if (provider == null || provider.isEmpty()) { in getInstance() 126 Provider p = Security.getProvider(provider); in getInstance() 128 throw new NoSuchProviderException(provider); in getInstance() 150 public static MessageDigest getInstance(String algorithm, Provider provider) in getInstance() argument 152 if (provider == null) { in getInstance() [all …]
|
D | AlgorithmParameters.java | 44 private final Provider provider; field in AlgorithmParameters 73 Provider provider, String algorithm) { in AlgorithmParameters() argument 74 this.provider = provider; in AlgorithmParameters() 98 return new AlgorithmParameters((AlgorithmParametersSpi) sap.spi, sap.provider, algorithm); in getInstance() 120 String provider) throws NoSuchAlgorithmException, in getInstance() argument 122 if (provider == null || provider.isEmpty()) { in getInstance() 125 Provider p = Security.getProvider(provider); in getInstance() 127 throw new NoSuchProviderException(provider); in getInstance() 150 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument 151 if (provider == null) { in getInstance() [all …]
|
D | Signature.java | 46 Provider provider; field in Signature 126 public static Signature getInstance(String algorithm, String provider) in getInstance() argument 131 if (provider == null || provider.isEmpty()) { in getInstance() 134 Provider p = Security.getProvider(provider); in getInstance() 136 throw new NoSuchProviderException(provider); in getInstance() 158 public static Signature getInstance(String algorithm, Provider provider) in getInstance() argument 163 if (provider == null) { in getInstance() 166 return getSignature(algorithm, provider); in getInstance() 169 private static Signature getSignature(String algorithm, Provider provider) in getSignature() argument 175 SpiAndProvider spiAndProvider = tryAlgorithm(null, provider, algorithm); in getSignature() [all …]
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | ProviderTest.java | 71 for (Provider provider : providers) { in test_Provider_getServices() 72 String providerName = provider.getName(); in test_Provider_getServices() 77 Set<Provider.Service> services = provider.getServices(); in test_Provider_getServices() 115 Cipher.getInstance(remainingAlgo, provider); in test_Provider_getServices() 132 provider.getClass().getClassLoader())); in test_Provider_getServices() 169 for (Provider provider : providers) { in test_Provider_Properties() 171 assertEquals(provider.getName(), in test_Provider_Properties() 172 provider.get("Provider.id name")); in test_Provider_Properties() 173 assertEquals(String.valueOf(provider.getVersion()), in test_Provider_Properties() 174 provider.get("Provider.id version")); in test_Provider_Properties() [all …]
|
/libcore/luni/src/main/java/java/nio/channels/spi/ |
D | SelectorProvider.java | 41 private static SelectorProvider provider = null; field in SelectorProvider 65 synchronized public static SelectorProvider provider() { in provider() method in SelectorProvider 66 if (provider == null) { in provider() 67 provider = ServiceLoader.loadFromSystemProperty(SelectorProvider.class); in provider() 68 if (provider == null) { in provider() 69 provider = loadProviderByJar(); in provider() 71 if (provider == null) { in provider() 72 provider = new SelectorProviderImpl(); in provider() 75 return provider; in provider() 79 for (SelectorProvider provider : ServiceLoader.load(SelectorProvider.class)) { in loadProviderByJar() [all …]
|
/libcore/luni/src/main/java/java/security/cert/ |
D | CertPathValidator.java | 47 private final Provider provider; field in CertPathValidator 66 Provider provider, String algorithm) { in CertPathValidator() argument 67 this.provider = provider; in CertPathValidator() 87 return provider; in getProvider() 107 return new CertPathValidator((CertPathValidatorSpi) sap.spi, sap.provider, algorithm); in getInstance() 129 String provider) throws NoSuchAlgorithmException, in getInstance() argument 131 if (provider == null || provider.isEmpty()) { in getInstance() 134 Provider impProvider = Security.getProvider(provider); in getInstance() 136 throw new NoSuchProviderException(provider); in getInstance() 159 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument [all …]
|
D | CertPathBuilder.java | 46 private final Provider provider; field in CertPathBuilder 64 protected CertPathBuilder(CertPathBuilderSpi builderSpi, Provider provider, in CertPathBuilder() argument 66 this.provider = provider; in CertPathBuilder() 86 return provider; in getProvider() 107 return new CertPathBuilder((CertPathBuilderSpi) sap.spi, sap.provider, algorithm); in getInstance() 127 public static CertPathBuilder getInstance(String algorithm, String provider) in getInstance() argument 129 if (provider == null || provider.isEmpty()) { in getInstance() 132 Provider impProvider = Security.getProvider(provider); in getInstance() 134 throw new NoSuchProviderException(provider); in getInstance() 156 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument [all …]
|
D | CertificateFactory.java | 47 private final Provider provider; field in CertificateFactory 66 Provider provider, String type) { in CertificateFactory() argument 67 this.provider = provider; in CertificateFactory() 91 return new CertificateFactory((CertificateFactorySpi) sap.spi, sap.provider, type); in getInstance() 117 String provider) throws CertificateException, in getInstance() argument 119 if (provider == null || provider.isEmpty()) { in getInstance() 122 Provider impProvider = Security.getProvider(provider); in getInstance() 124 throw new NoSuchProviderException(provider); in getInstance() 149 Provider provider) throws CertificateException { in getInstance() argument 150 if (provider == null) { in getInstance() [all …]
|
D | CertStore.java | 49 private final Provider provider; field in CertStore 72 protected CertStore(CertStoreSpi storeSpi, Provider provider, String type, in CertStore() argument 74 this.provider = provider; in CertStore() 104 return new CertStore((CertStoreSpi) sap.spi, sap.provider, type, params); in getInstance() 139 CertStoreParameters params, String provider) in getInstance() argument 142 if (provider == null || provider.isEmpty()) { in getInstance() 145 Provider impProvider = Security.getProvider(provider); in getInstance() 147 throw new NoSuchProviderException(provider); in getInstance() 174 CertStoreParameters params, Provider provider) in getInstance() argument 176 if (provider == null) { in getInstance() [all …]
|
/libcore/luni/src/main/java/javax/crypto/ |
D | SecretKeyFactory.java | 48 private final Provider provider; field in SecretKeyFactory 67 Provider provider, String algorithm) { in SecretKeyFactory() argument 68 this.provider = provider; in SecretKeyFactory() 88 return provider; in getProvider() 109 return new SecretKeyFactory((SecretKeyFactorySpi) sap.spi, sap.provider, algorithm); in getInstance() 132 String provider) throws NoSuchAlgorithmException, in getInstance() argument 134 if (provider == null || provider.isEmpty()) { in getInstance() 137 Provider impProvider = Security.getProvider(provider); in getInstance() 139 throw new NoSuchProviderException(provider); in getInstance() 164 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument [all …]
|
D | KeyGenerator.java | 43 private final Provider provider; field in KeyGenerator 61 protected KeyGenerator(KeyGeneratorSpi keyGenSpi, Provider provider, in KeyGenerator() argument 63 this.provider = provider; in KeyGenerator() 83 return provider; in getProvider() 104 return new KeyGenerator((KeyGeneratorSpi) sap.spi, sap.provider, algorithm); in getInstance() 127 String provider) throws NoSuchAlgorithmException, NoSuchProviderException { in getInstance() argument 128 if (provider == null || provider.isEmpty()) { in getInstance() 131 Provider impProvider = Security.getProvider(provider); in getInstance() 133 throw new NoSuchProviderException(provider); in getInstance() 157 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument [all …]
|
D | KeyAgreement.java | 50 private Provider provider; field in KeyAgreement 76 protected KeyAgreement(KeyAgreementSpi keyAgreeSpi, Provider provider, in KeyAgreement() argument 79 this.specifiedProvider = provider; in KeyAgreement() 99 return provider; in getProvider() 136 public static final KeyAgreement getInstance(String algorithm, String provider) in getInstance() argument 138 if (provider == null || provider.isEmpty()) { in getInstance() 141 Provider impProvider = Security.getProvider(provider); in getInstance() 143 throw new NoSuchProviderException(provider); in getInstance() 167 public static final KeyAgreement getInstance(String algorithm, Provider provider) in getInstance() argument 169 if (provider == null) { in getInstance() [all …]
|
D | Mac.java | 47 private Provider provider; field in Mac 76 protected Mac(MacSpi macSpi, Provider provider, String algorithm) { in Mac() argument 77 this.specifiedProvider = provider; in Mac() 99 return provider; in getProvider() 140 public static final Mac getInstance(String algorithm, String provider) in getInstance() argument 142 if (provider == null || provider.isEmpty()) { in getInstance() 145 Provider impProvider = Security.getProvider(provider); in getInstance() 147 throw new NoSuchProviderException(provider); in getInstance() 171 public static final Mac getInstance(String algorithm, Provider provider) in getInstance() argument 173 if (provider == null) { in getInstance() [all …]
|
D | ExemptionMechanism.java | 42 private final Provider provider; field in ExemptionMechanism 70 Provider provider, String mechanism) { in ExemptionMechanism() argument 73 this.provider = provider; in ExemptionMechanism() 104 return new ExemptionMechanism((ExemptionMechanismSpi) sap.spi, sap.provider, algorithm); in getInstance() 127 String provider) throws NoSuchAlgorithmException, in getInstance() argument 129 if (provider == null) { in getInstance() 132 Provider impProvider = Security.getProvider(provider); in getInstance() 134 throw new NoSuchProviderException(provider); in getInstance() 161 Provider provider) throws NoSuchAlgorithmException { in getInstance() argument 165 if (provider == null) { in getInstance() [all …]
|
/libcore/luni/src/main/java/javax/net/ssl/ |
D | TrustManagerFactory.java | 77 return new TrustManagerFactory((TrustManagerFactorySpi) sap.spi, sap.provider, algorithm); in getInstance() 99 public static final TrustManagerFactory getInstance(String algorithm, String provider) in getInstance() argument 101 if ((provider == null) || (provider.length() == 0)) { in getInstance() 104 Provider impProvider = Security.getProvider(provider); in getInstance() 106 throw new NoSuchProviderException(provider); in getInstance() 127 public static final TrustManagerFactory getInstance(String algorithm, Provider provider) in getInstance() argument 129 if (provider == null) { in getInstance() 135 Object spi = ENGINE.getInstance(algorithm, provider, null); in getInstance() 136 return new TrustManagerFactory((TrustManagerFactorySpi) spi, provider, algorithm); in getInstance() 140 private final Provider provider; field in TrustManagerFactory [all …]
|
D | KeyManagerFactory.java | 78 return new KeyManagerFactory((KeyManagerFactorySpi) sap.spi, sap.provider, algorithm); in getInstance() 100 public static final KeyManagerFactory getInstance(String algorithm, String provider) in getInstance() argument 102 if ((provider == null) || (provider.length() == 0)) { in getInstance() 105 Provider impProvider = Security.getProvider(provider); in getInstance() 107 throw new NoSuchProviderException(provider); in getInstance() 128 public static final KeyManagerFactory getInstance(String algorithm, Provider provider) in getInstance() argument 130 if (provider == null) { in getInstance() 136 Object spi = ENGINE.getInstance(algorithm, provider, null); in getInstance() 137 return new KeyManagerFactory((KeyManagerFactorySpi) spi, provider, algorithm); in getInstance() 141 private final Provider provider; field in KeyManagerFactory [all …]
|
D | SSLContext.java | 139 return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol); in getInstance() 233 public static SSLContext getInstance(String protocol, String provider) in getInstance() argument 235 if (provider == null) { in getInstance() 238 if (provider.length() == 0) { in getInstance() 241 Provider impProvider = Security.getProvider(provider); in getInstance() 243 throw new NoSuchProviderException(provider); in getInstance() 264 public static SSLContext getInstance(String protocol, Provider provider) in getInstance() argument 266 if (provider == null) { in getInstance() 272 Object spi = ENGINE.getInstance(protocol, provider, null); in getInstance() 273 return new SSLContext((SSLContextSpi) spi, provider, protocol); in getInstance() [all …]
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | ECDHKeyAgreementTest.java | 134 void testGetAlgorithm(Provider provider) throws Exception { in testGetAlgorithm() argument 135 assertEquals("ECDH", getKeyAgreement(provider).getAlgorithm()); in testGetAlgorithm() 142 void testGetProvider(Provider provider) throws Exception { in testGetProvider() argument 143 assertSame(provider, getKeyAgreement(provider).getProvider()); in testGetProvider() 150 void testInit_withNullPrivateKey(Provider provider) throws Exception { in testInit_withNullPrivateKey() argument 151 KeyAgreement keyAgreement = getKeyAgreement(provider); in testInit_withNullPrivateKey() 162 void testInit_withUnsupportedPrivateKeyType(Provider provider) throws Exception { in testInit_withUnsupportedPrivateKeyType() argument 163 KeyAgreement keyAgreement = getKeyAgreement(provider); in testInit_withUnsupportedPrivateKeyType() 174 void testInit_withUnsupportedAlgorithmParameterSpec(Provider provider) throws Exception { in testInit_withUnsupportedAlgorithmParameterSpec() argument 176 getKeyAgreement(provider).init(KAT_PRIVATE_KEY1, new ECGenParameterSpec("prime256v1")); in testInit_withUnsupportedAlgorithmParameterSpec() [all …]
|
D | CipherTest.java | 77 private static boolean isSupported(String algorithm, String provider) { in isSupported() argument 102 if (!provider.equals("AndroidOpenSSL") && in isSupported() 383 private static String modeProviderKey(String algorithm, int mode, String provider) { in modeProviderKey() argument 384 return algorithm + ":" + mode + ":" + provider; in modeProviderKey() 399 String algorithm, int mode, String provider, int value) { in setExpectedSize() argument 400 setExpectedSize(map, modeProviderKey(algorithm, mode, provider), value); in setExpectedSize() 403 …static int getExpectedSize(Map<String, Integer> map, String algorithm, int mode, String provider) { in getExpectedSize() argument 405 provider = provider.toUpperCase(Locale.US); in getExpectedSize() 406 Integer expected = map.get(modeProviderKey(algorithm, mode, provider)); in getExpectedSize() 415 assertNotNull("Algorithm " + algorithm + " with mode " + mode + " and provider " + provider in getExpectedSize() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/spi/ |
D | SelectorProviderTest.java | 34 assertNotNull(SelectorProvider.provider()); in test_open_methods() 37 SelectorProvider.provider().inheritedChannel(); in test_open_methods() 39 assertNotNull(SelectorProvider.provider().openDatagramChannel()); in test_open_methods() 40 assertNotNull(SelectorProvider.provider().openPipe()); in test_open_methods() 41 assertNotNull(SelectorProvider.provider().openServerSocketChannel()); in test_open_methods() 42 assertNotNull(SelectorProvider.provider().openSocketChannel()); in test_open_methods() 43 assertNotNull(SelectorProvider.provider().openSelector()); in test_open_methods()
|
/libcore/luni/src/main/java/java/nio/channels/ |
D | Pipe.java | 41 protected SinkChannel(SelectorProvider provider) { in SinkChannel() argument 42 super(provider); in SinkChannel() 67 protected SourceChannel(SelectorProvider provider) { in SourceChannel() argument 68 super(provider); in SourceChannel() 89 return SelectorProvider.provider().openPipe(); in open()
|