File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed
common/src/main/java/com/genexus/common/interfaces
java/src/main/java/com/genexus/ws/security
wrapperjakarta/src/main/java/com/genexus/ws
wrapperjavax/src/main/java/com/genexus/ws Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -8,5 +8,11 @@ public interface IGXWSSignature
88 void setKeystore (IGXWSSecurityKeyStore keystore );
99 int getKeyIdentifierType ();
1010 void setKeyIdentifierType (int keyIdentifierType );
11+ String getCanonicalizationalgorithm ();
12+ void setCanonicalizationalgorithm (String algorithm );
13+ String getDigest ();
14+ void setDigest (String digest );
15+ String getSignaturealgorithm ();
16+ void setSignaturealgorithm (String algorithm );
1117}
1218
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ public class GXWSSignature implements IGXWSSignature
88 private IGXWSSecurityKeyStore keystore ;
99 private String alias ;
1010 private int keyIdentifierType ;
11+ private String canonicalizationAlgorithm ;
12+ private String digest ;
13+ private String signatureAlgorithm ;
1114
1215 public GXWSSignature ()
1316 {
@@ -44,5 +47,17 @@ public void setKeyIdentifierType(int keyIdentifierType)
4447 {
4548 this .keyIdentifierType = keyIdentifierType ;
4649 }
50+
51+ public String getCanonicalizationalgorithm () {return canonicalizationAlgorithm ;}
52+
53+ public void setCanonicalizationalgorithm (String algorithm ) {this .canonicalizationAlgorithm = algorithm ;}
54+
55+ public String getDigest () {return digest ;}
56+
57+ public void setDigest (String digest ) {this .digest = digest ;}
58+
59+ public String getSignaturealgorithm () { return signatureAlgorithm ;}
60+
61+ public void setSignaturealgorithm (String algorithm ) {this .signatureAlgorithm = algorithm ;}
4762}
4863
Original file line number Diff line number Diff line change @@ -151,6 +151,12 @@ public boolean handleMessage(SOAPMessageContext messageContext)
151151 WSSecSignature sign = new WSSecSignature ();
152152 sign .setKeyIdentifierType (wsSignature .getKeyIdentifierType ());
153153 sign .setUserInfo (wsSignature .getAlias (), wsSignature .getKeystore ().getPassword ());
154+ if (wsSignature .getCanonicalizationalgorithm () != null )
155+ sign .setSigCanonicalization (wsSignature .getCanonicalizationalgorithm ());
156+ if (wsSignature .getDigest () != null )
157+ sign .setDigestAlgo (wsSignature .getDigest ());
158+ if (wsSignature .getSignaturealgorithm () != null )
159+ sign .setSignatureAlgorithm (wsSignature .getSignaturealgorithm ());
154160 signedDoc = sign .build (doc , signatureCrypto , secHeader );
155161
156162 if (expirationTimeout > 0 )
Original file line number Diff line number Diff line change @@ -151,6 +151,12 @@ public boolean handleMessage(SOAPMessageContext messageContext)
151151 WSSecSignature sign = new WSSecSignature ();
152152 sign .setKeyIdentifierType (wsSignature .getKeyIdentifierType ());
153153 sign .setUserInfo (wsSignature .getAlias (), wsSignature .getKeystore ().getPassword ());
154+ if (wsSignature .getCanonicalizationalgorithm () != null )
155+ sign .setSigCanonicalization (wsSignature .getCanonicalizationalgorithm ());
156+ if (wsSignature .getDigest () != null )
157+ sign .setDigestAlgo (wsSignature .getDigest ());
158+ if (wsSignature .getSignaturealgorithm () != null )
159+ sign .setSignatureAlgorithm (wsSignature .getSignaturealgorithm ());
154160 signedDoc = sign .build (doc , signatureCrypto , secHeader );
155161
156162 if (expirationTimeout > 0 )
You can’t perform that action at this time.
0 commit comments