Skip to content

Commit b4ccdda

Browse files
committed
CYBS-737: Readme and code comments update
1 parent 04eb83d commit b4ccdda

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Retry Pattern allows to retry sending a failed request and it will only work wit
252252
_______________________________
253253
Version Cybersource-sdk-java 6.2.12 (JUNE,2022)
254254
_______________________________
255-
1) Apache WSS4j Security Vulnerability fix.
255+
1) Mitigation of Apache WSS4j Security Vulnerability fix.
256256
_______________________________
257257
_______________________________
258258
Version Cybersource-sdk-java 6.2.11 (MAY,2020)

java/src/main/java/com/cybersource/ws/client/SecurityUtil.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.apache.wss4j.dom.message.WSSecEncrypt;
88
import org.apache.wss4j.dom.message.WSSecHeader;
99
import org.apache.wss4j.dom.message.WSSecSignature;
10+
import org.apache.xml.security.Init;
1011
import org.bouncycastle.jce.provider.BouncyCastleProvider;
1112
import org.w3c.dom.Document;
1213

@@ -196,14 +197,17 @@ public static Document handleMessageCreation(Document signedDoc, String merchant
196197

197198
logger.log(Logger.LT_INFO, "Encrypting Signed doc ...");
198199

199-
org.apache.xml.security.Init.init();
200200
WSSecHeader secHeader = new WSSecHeader(signedDoc);
201201
try {
202202
secHeader.insertSecurityHeader();
203203
} catch (WSSecurityException e) {
204204
logger.log(Logger.LT_EXCEPTION, "Exception while adding document in soap securiy header for MLE");
205205
throw new SignException(e);
206206
}
207+
208+
//Must initialize xml-security library correctly before use it
209+
Init.init();
210+
207211
WSSecEncrypt encrBuilder = new WSSecEncrypt(secHeader);
208212
//Set the user name to get the encryption certificate.
209213
//The public key of this certificate is used, thus no password necessary. The user name is a keystore alias usually.

zip/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Provides low level HTTP transport components that can be used to build custom cl
279279

280280
Version Cybersource-sdk-java 6.2.12 (JUNE,2022)
281281
_______________________________
282-
1) Apache WSS4j Security Vulnerability fix.
282+
1) Mitigation of Apache WSS4j Security Vulnerability.
283283

284284
Version Cybersource-sdk-java 6.2.11 (MAY,2020)
285285
_______________________________

0 commit comments

Comments
 (0)