Search in sources :

Example 21 with SpiEngUtils

use of org.apache.harmony.security.tests.support.SpiEngUtils in project robovm by robovm.

the class AlgorithmParameterGenerator2Test method setUp.

protected void setUp() throws Exception {
    super.setUp();
    mProv = (new SpiEngUtils()).new MyProvider("MyAPGProvider", "Testing provider", AlgorithmParameterGenerator1Test.srvAlgorithmParameterGenerator.concat(".").concat(defaultAlg), AlgorithmParameterGeneratorProviderClass);
    Security.insertProviderAt(mProv, 1);
}
Also used : SpiEngUtils(org.apache.harmony.security.tests.support.SpiEngUtils)

Example 22 with SpiEngUtils

use of org.apache.harmony.security.tests.support.SpiEngUtils in project robovm by robovm.

the class KeyStoreTest method setUp.

protected void setUp() throws Exception {
    super.setUp();
    mProv = (new SpiEngUtils()).new MyProvider("MyKSProvider", "Testing provider", KeyStoreTestSupport.srvKeyStore.concat(".").concat(defaultType), KeyStoreProviderClass);
    Security.insertProviderAt(mProv, 2);
    defaultProvider = SpiEngUtils.isSupport(defaultType, KeyStoreTestSupport.srvKeyStore);
    KSSupported = (defaultProvider != null);
    defaultProviderName = (KSSupported ? defaultProvider.getName() : null);
}
Also used : SpiEngUtils(org.apache.harmony.security.tests.support.SpiEngUtils)

Example 23 with SpiEngUtils

use of org.apache.harmony.security.tests.support.SpiEngUtils in project robovm by robovm.

the class CertificateFactory2Test method setUp.

protected void setUp() throws Exception {
    super.setUp();
    mProv = (new SpiEngUtils()).new MyProvider("MyCFProvider", "Provider for testing", CertificateFactory1Test.srvCertificateFactory.concat(".").concat(defaultAlg), CertificateFactoryProviderClass);
    Security.insertProviderAt(mProv, 1);
}
Also used : SpiEngUtils(org.apache.harmony.security.tests.support.SpiEngUtils)

Aggregations

SpiEngUtils (org.apache.harmony.security.tests.support.SpiEngUtils)23 Provider (java.security.Provider)14 ExemptionMechanism (javax.crypto.ExemptionMechanism)14 Key (java.security.Key)11 MyExemptionMechanismSpi.tmpKey (org.apache.harmony.crypto.tests.support.MyExemptionMechanismSpi.tmpKey)11 MyExemptionMechanismSpi (org.apache.harmony.crypto.tests.support.MyExemptionMechanismSpi)10 ExemptionMechanismException (javax.crypto.ExemptionMechanismException)6 InvalidKeyException (java.security.InvalidKeyException)4 SecureRandom (java.security.SecureRandom)3 KeyGenerator (javax.crypto.KeyGenerator)3 InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)2 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)2 ShortBufferException (javax.crypto.ShortBufferException)2 BigInteger (java.math.BigInteger)1 RSAKeyGenParameterSpec (java.security.spec.RSAKeyGenParameterSpec)1 ExemptionMechanismSpi (javax.crypto.ExemptionMechanismSpi)1 MyProvider (tests.security.cert.myCertPathBuilder.MyProvider)1