added OID based test
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
+import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.X509ObjectIdentifiers;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.util.Arrays;
@@ -273,6 +274,18 @@ public void performTest() throws Exception
fail("SHA512 signature verification failed");
}
+
+ s = Signature.getInstance(PKCSObjectIdentifiers.id_RSASSA_PSS.getId(), "BC");
+
+ s.setParameter(pss.getParameterSpec(PSSParameterSpec.class));
+
+ s.initVerify(pubKey);
+ s.update(msg1a);
+ if (!s.verify(sig1c))
+ {
+ fail("SHA512 signature verification failed");
+ }
+
SecureRandom random = new SecureRandom();
// Note: PSS minimum key size determined by hash/salt lengths
