ffang commented on code in PR #1645: URL: https://github.com/apache/cxf/pull/1645#discussion_r1459696629
########## rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/PublicKeyJwsSignatureVerifier.java: ########## @@ -59,6 +85,30 @@ public PublicKeyJwsSignatureVerifier(X509Certificate cert, this.key = null; } this.cert = cert; + String javaAlgoName = supportedAlgo.getJavaName(); + if (javaAlgoName.equals(AlgorithmUtils.PS_SHA_JAVA) + && spec == null) { + //must have spec in this case + String size = supportedAlgo.getJwaName().substring(2); + switch (size) { + case "256" : + spec = new PSSParameterSpec(MGF1ParameterSpec.SHA256.getDigestAlgorithm(), + "MGF1", MGF1ParameterSpec.SHA256, Integer.valueOf(size) / 8, 1); + break; + case "384" : + spec = new PSSParameterSpec(MGF1ParameterSpec.SHA384.getDigestAlgorithm(), + "MGF1", MGF1ParameterSpec.SHA384, Integer.valueOf(size) / 8, 1); + break; + case "512" : + spec = new PSSParameterSpec(MGF1ParameterSpec.SHA512.getDigestAlgorithm(), + "MGF1", MGF1ParameterSpec.SHA512, Integer.valueOf(size) / 8, 1); + break; + default : Review Comment: addressed by this commit https://github.com/apache/cxf/pull/1645/commits/9f572761f167d24fbf2a6863571f543ab05559a6 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cxf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org