A DESCRIPTION OF THE PROBLEM :
The constructor of the class sun.security.pkcs11.wrapper.CK_RSA_PKCS_PSS_PARAMS takes the hashAlg to get the MGF function. This should, however, be extracted from the mgfHash parameter.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Read the source code block:
public CK_RSA_PKCS_PSS_PARAMS(String hashAlg, String mgfAlg,
String mgfHash, int sLen) {
this.hashAlg = Functions.getHashMechId(hashAlg);
if (!mgfAlg.equals("MGF1")) {
throw new ProviderException("Only MGF1 is supported");
}
// no dash in PKCS#11 mechanism names
this.mgf = Functions.getMGFId("CKG_MGF1_" + hashAlg.replaceFirst("-", ""));
this.sLen = sLen;
}
FREQUENCY : always