Skip to content

Commit af8d08d

Browse files
committed
CYBS-737: Dependent Library changes
1 parent 273378f commit af8d08d

6 files changed

Lines changed: 59 additions & 33 deletions

File tree

java/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,23 @@
251251
<groupId>org.apache.wss4j</groupId>
252252
<artifactId>wss4j-ws-security-common</artifactId>
253253
<version>${wss4j.version}</version>
254+
<exclusions>
255+
<exclusion>
256+
<groupId>com.google.guava</groupId>
257+
<artifactId>guava</artifactId>
258+
</exclusion>
259+
</exclusions>
254260
</dependency>
255261
<dependency>
256262
<groupId>org.apache.wss4j</groupId>
257263
<artifactId>wss4j-ws-security-dom</artifactId>
258264
<version>${wss4j.version}</version>
265+
<exclusions>
266+
<exclusion>
267+
<groupId>org.ehcache</groupId>
268+
<artifactId>ehcache</artifactId>
269+
</exclusion>
270+
</exclusions>
259271
</dependency>
260272
<dependency>
261273
<groupId>org.apache.commons</groupId>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private void setupJdkServerCerts() throws SignException {
7272
}
7373
else if (subjectDNrray.length == 2 && subjectDNrray[1].contains(SERVER_ALIAS)) {
7474
name = SERVER_ALIAS;
75-
serialNumber = subjectDNrray[1];
75+
serialNumber = subjectDNrray[1].split(",")[0];
7676
keyAlias = "serialNumber=" + serialNumber + ",CN=" + name;
7777
}else{
7878
throw new SignException("Exception while obtaining private key from KeyStore with alias, '" + merchantConfig.getKeyAlias() + "'");

java/src/test/java/com/cybersource/ws/client/IdentityTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.util.*;
1515

1616
public class IdentityTest{
17-
Properties merchantProperties;
17+
1818
private MerchantConfig config;
1919

2020
@Before
@@ -52,8 +52,14 @@ public void testSetUpMerchant() throws SignException, ConfigException{
5252
}
5353

5454
@Test
55-
public void testsetUpServer() throws InstantiationException, IllegalAccessException, SignException{
56-
String keyAlias = "CN=CyberSource_SJC_US,SERIALNUMBER=400000009910179089277";
55+
public void testsetUpServer() throws SignException {
56+
String keyAlias;
57+
if(config.isJdkCertEnabled() || config.isCacertEnabled()) {
58+
keyAlias = "SERIALNUMBER=400000009910179089277,CN=CyberSource_SJC_US";
59+
} else {
60+
keyAlias = "CN=CyberSource_SJC_US,SERIALNUMBER=400000009910179089277";
61+
}
62+
5763
X509Certificate x509Cert = Mockito.mock(X509Certificate.class);
5864
Principal principal = Mockito.mock(Principal.class);
5965
Logger logger = Mockito.mock(Logger.class);

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<xalan.version>2.7.2</xalan.version>
2929
<xmlsec.version>2.3.0</xmlsec.version>
3030
<httpclient.version>4.5.13</httpclient.version>
31-
<bouncycastle.version>1.61</bouncycastle.version>
31+
<bouncycastle.version>1.67</bouncycastle.version>
3232
<wss4j.version>2.4.1</wss4j.version>
3333
<commonlang3.version>3.4</commonlang3.version>
3434
<mockito.version>1.10.19</mockito.version>

samples/nvp/pom.xml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
<name>RunSample</name>
99
<url>http://maven.apache.org</url>
1010
<properties>
11-
<javasdk.version>[6.2.0, 6.2.12-SNAPSHOT]</javasdk.version>
11+
<javasdk.version>[6.2.0, 6.2.12-SNAPSHOT]</javasdk.version>
12+
<httpclient.version>4.5.13</httpclient.version>
13+
<bouncycastle.version>1.67</bouncycastle.version>
14+
<wss4j.version>2.4.1</wss4j.version>
15+
<commonlang3.version>3.4</commonlang3.version>
16+
<slf4j.version>1.7.32</slf4j.version>
1217
</properties>
1318
<dependencies>
1419
<dependency>
@@ -19,7 +24,7 @@
1924
<dependency>
2025
<groupId>org.apache.httpcomponents</groupId>
2126
<artifactId>httpclient</artifactId>
22-
<version>4.5.13</version>
27+
<version>${httpclient.version}</version>
2328
<exclusions>
2429
<exclusion>
2530
<groupId>commons-logging</groupId>
@@ -30,28 +35,27 @@
3035
<dependency>
3136
<groupId>org.bouncycastle</groupId>
3237
<artifactId>bcprov-jdk15on</artifactId>
33-
<version>1.61</version>
38+
<version>${bouncycastle.version}</version>
3439
</dependency>
3540
<dependency>
36-
<groupId>org.apache.ws.security</groupId>
37-
<artifactId>wss4j</artifactId>
38-
<version>1.6.19</version>
39-
<exclusions>
40-
<exclusion>
41-
<groupId>org.opensaml</groupId>
42-
<artifactId>opensaml</artifactId>
43-
</exclusion>
44-
</exclusions>
41+
<groupId>org.apache.wss4j</groupId>
42+
<artifactId>wss4j-ws-security-common</artifactId>
43+
<version>${wss4j.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.wss4j</groupId>
47+
<artifactId>wss4j-ws-security-dom</artifactId>
48+
<version>${wss4j.version}</version>
4549
</dependency>
4650
<dependency>
4751
<groupId>org.apache.commons</groupId>
4852
<artifactId>commons-lang3</artifactId>
49-
<version>3.4</version>
53+
<version>${commonlang3.version}</version>
5054
</dependency>
5155
<dependency>
5256
<groupId>org.slf4j</groupId>
5357
<artifactId>slf4j-jcl</artifactId>
54-
<version>1.7.21</version>
58+
<version>${slf4j.version}</version>
5559
</dependency>
5660
</dependencies>
5761
<build>

samples/xml/pom.xml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
<name>RunSample</name>
99
<url>http://maven.apache.org</url>
1010
<properties>
11-
<javasdk.version>[6.2.0, 6.2.12-SNAPSHOT]</javasdk.version>
11+
<javasdk.version>[6.2.0, 6.2.12-SNAPSHOT]</javasdk.version>
12+
<httpclient.version>4.5.13</httpclient.version>
13+
<bouncycastle.version>1.67</bouncycastle.version>
14+
<wss4j.version>2.4.1</wss4j.version>
15+
<commonlang3.version>3.4</commonlang3.version>
16+
<slf4j.version>1.7.32</slf4j.version>
1217
</properties>
1318
<dependencies>
1419
<dependency>
@@ -19,7 +24,7 @@
1924
<dependency>
2025
<groupId>org.apache.httpcomponents</groupId>
2126
<artifactId>httpclient</artifactId>
22-
<version>4.5.13</version>
27+
<version>${httpclient.version}</version>
2328
<exclusions>
2429
<exclusion>
2530
<groupId>commons-logging</groupId>
@@ -30,28 +35,27 @@
3035
<dependency>
3136
<groupId>org.bouncycastle</groupId>
3237
<artifactId>bcprov-jdk15on</artifactId>
33-
<version>1.61</version>
38+
<version>${bouncycastle.version}</version>
3439
</dependency>
3540
<dependency>
36-
<groupId>org.apache.ws.security</groupId>
37-
<artifactId>wss4j</artifactId>
38-
<version>1.6.19</version>
39-
<exclusions>
40-
<exclusion>
41-
<groupId>org.opensaml</groupId>
42-
<artifactId>opensaml</artifactId>
43-
</exclusion>
44-
</exclusions>
41+
<groupId>org.apache.wss4j</groupId>
42+
<artifactId>wss4j-ws-security-common</artifactId>
43+
<version>${wss4j.version}</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.wss4j</groupId>
47+
<artifactId>wss4j-ws-security-dom</artifactId>
48+
<version>${wss4j.version}</version>
4549
</dependency>
4650
<dependency>
4751
<groupId>org.apache.commons</groupId>
4852
<artifactId>commons-lang3</artifactId>
49-
<version>3.4</version>
53+
<version>${commonlang3.version}</version>
5054
</dependency>
5155
<dependency>
5256
<groupId>org.slf4j</groupId>
5357
<artifactId>slf4j-jcl</artifactId>
54-
<version>1.7.21</version>
58+
<version>${slf4j.version}</version>
5559
</dependency>
5660
</dependencies>
5761
<build>

0 commit comments

Comments
 (0)