Register the services the receiver provides.
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
// Digest engine
put("MessageDigest.SHA",
"made.up.provider.name.MessageDigestSHA");
put("MessageDigest.MD2",
"made.up.provider.name.MessageDigestMD2");
// aliases
put("Alg.Alias.MessageDigest.SHA1", "SHA");
put("Alg.Alias.MessageDigest.SHA-1", "SHA");
put("Alg.Alias.MessageDigest.OID.1.3.14.3.2.26", "SHA");
put("Alg.Alias.MessageDigest.1.3.14.3.2.26", "SHA");
// Algorithm parameter generator
put("AlgorithmParameterGenerator.DSA",
"made.up.provider.name.AlgorithmParameterGeneratorDSA");
// Algorithm parameters
put("AlgorithmParameters.DSA",
"made.up.provider.name.AlgorithmParametersDSA");
// aliases
put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1", "DSA");
put("Alg.Alias.AlgorithmParameters.1.3.14.3.2.12", "DSA");
// Key pair generator
put("KeyPairGenerator.DSA",
"made.up.provider.name.KeyPairGeneratorDSA");
// aliases
put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");
// Key factory
put("KeyFactory.DSA", "made.up.provider.name.KeyFactoryDSA");
put("KeyFactory.RSA", "made.up.provider.name.KeyFactoryRSA");
// aliases
put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
// Signature algorithm
put("Signature.SHA1withDSA",
"made.up.provider.name.SignatureDSA");
// aliases
put("Alg.Alias.Signature.DSA", "SHA1withDSA");
put("Alg.Alias.Signature.DSS", "SHA1withDSA");
put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA");
put("Alg.Alias.Signature.DSAWithSHA1", "SHA1withDSA");
put("Alg.Alias.Signature.SHA-1withDSA", "SHA1withDSA");
put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA");
put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
put("Alg.Alias.Signature.OID.1.3.14.3.2.13", "SHA1withDSA");
put("Alg.Alias.Signature.OID.1.3.14.3.2.27", "SHA1withDSA");
put("KeyStore.PKCS#12/Netscape",
"tests.support.Support_DummyPKCS12Keystore");
// Certificate
put("CertificateFactory.X509",
"made.up.provider.name.CertificateFactoryX509");
// aliases
put("Alg.Alias.CertificateFactory.X.509", "X509");
return null;
}
});