seanjmullan commented on code in PR #206:
URL: 
https://github.com/apache/santuario-xml-security-java/pull/206#discussion_r1318672140


##########
src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:
##########
@@ -660,7 +712,12 @@ Type getAlgorithmType() {
         }
     }
 
-    static final class SHA1withRSAandMGF1 extends AbstractRSASignatureMethod {
+    static final class SHA1withRSAandMGF1 extends 
AbstractRSAPSSSignatureMethod {
+
+        private static PSSParameterSpec spec

Review Comment:
   Fixed.



##########
src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java:
##########
@@ -362,6 +380,40 @@ byte[] preVerifyFormat(Key key, byte[] sig) {
         }
     }
 
+    abstract static class AbstractRSAPSSSignatureMethod
+            extends AbstractRSASignatureMethod {
+    
+        AbstractRSAPSSSignatureMethod(AlgorithmParameterSpec params)
+                throws InvalidAlgorithmParameterException {
+            super(params);
+        }
+
+        AbstractRSAPSSSignatureMethod(Element dmElem) throws MarshalException {
+            super(dmElem);
+        }
+
+        public abstract PSSParameterSpec getPSSParameterSpec();
+
+        @Override
+        Signature getSignature(Provider p)
+                throws NoSuchAlgorithmException {
+            try {
+                Signature s = (p == null)
+                        ? Signature.getInstance("RSASSA-PSS")
+                        : Signature.getInstance("RSASSA-PSS", p);
+                try {
+                    s.setParameter(getPSSParameterSpec());
+                } catch (InvalidAlgorithmParameterException e) {
+                    throw new NoSuchAlgorithmException("Should not happen", e);
+                }
+                return s;
+            } catch (NoSuchAlgorithmException nsae) {

Review Comment:
   Fixed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to