Skip to content

Commit 2a3641f

Browse files
committed
Upgrade dependencies
Also migrate code to not use deprecated API of Apache HttpClient.
1 parent 1234a2b commit 2a3641f

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ This software includes third party software subject to the following licenses:
2323
Posten signering - Java API Client BOM under The Apache Software License, Version 2.0
2424
Posten signering - Java API Client Library under The Apache Software License, Version 2.0
2525
Posten signering - Java API Client Parent under The Apache Software License, Version 2.0
26+
SLF4J API Module under MIT License
2627

2728

lib/NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ This software includes third party software subject to the following licenses:
2121
Posten signering - API JAXB Classes under The Apache Software License, Version 2.0
2222
Posten signering - API Schema under The Apache Software License, Version 2.0
2323
Posten signering - Java API Client Library under The Apache Software License, Version 2.0
24+
SLF4J API Module under MIT License
2425

2526

lib/pom.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>org.junit</groupId>
3030
<artifactId>junit-bom</artifactId>
31-
<version>5.10.0</version>
31+
<version>5.11.3</version>
3232
<type>pom</type>
3333
<scope>import</scope>
3434
</dependency>
@@ -39,6 +39,13 @@
3939
<type>pom</type>
4040
<scope>import</scope>
4141
</dependency>
42+
<dependency>
43+
<groupId>org.slf4j</groupId>
44+
<artifactId>slf4j-bom</artifactId>
45+
<version>2.0.16</version>
46+
<type>pom</type>
47+
<scope>import</scope>
48+
</dependency>
4249
</dependencies>
4350
</dependencyManagement>
4451

@@ -55,7 +62,7 @@
5562
<dependency>
5663
<groupId>no.digipost</groupId>
5764
<artifactId>certificate-validator</artifactId>
58-
<version>3.0.3</version>
65+
<version>3.0.5</version>
5966
<exclusions>
6067
<exclusion>
6168
<groupId>org.bouncycastle</groupId>
@@ -67,31 +74,24 @@
6774
<dependency>
6875
<groupId>org.apache.httpcomponents.client5</groupId>
6976
<artifactId>httpclient5</artifactId>
70-
<version>5.2.1</version>
77+
<version>5.4.1</version>
7178
</dependency>
7279
<dependency>
7380
<groupId>org.apache.httpcomponents.core5</groupId>
7481
<artifactId>httpcore5</artifactId>
75-
<version>5.2.3</version>
82+
<version>5.3.1</version>
7683
</dependency>
7784

7885
<dependency>
7986
<groupId>commons-io</groupId>
8087
<artifactId>commons-io</artifactId>
81-
<version>2.14.0</version>
88+
<version>2.17.0</version>
8289
<scope>test</scope>
8390
</dependency>
8491

85-
<dependency>
86-
<groupId>org.slf4j</groupId>
87-
<artifactId>slf4j-api</artifactId>
88-
<version>2.0.9</version>
89-
<scope>test</scope>
90-
</dependency>
9192
<dependency>
9293
<groupId>org.slf4j</groupId>
9394
<artifactId>slf4j-simple</artifactId>
94-
<version>2.0.9</version>
9595
<scope>test</scope>
9696
</dependency>
9797

@@ -108,7 +108,7 @@
108108
<dependency>
109109
<groupId>org.hamcrest</groupId>
110110
<artifactId>hamcrest</artifactId>
111-
<version>2.2</version>
111+
<version>3.0</version>
112112
<scope>test</scope>
113113
</dependency>
114114
<dependency>
@@ -124,7 +124,7 @@
124124
<dependency>
125125
<groupId>nl.jqno.equalsverifier</groupId>
126126
<artifactId>equalsverifier</artifactId>
127-
<version>3.15.2</version>
127+
<version>3.17.1</version>
128128
<scope>test</scope>
129129
</dependency>
130130
<dependency>
@@ -148,14 +148,14 @@
148148
<dependency>
149149
<groupId>no.digipost</groupId>
150150
<artifactId>digg</artifactId>
151-
<version>0.33</version>
151+
<version>0.36</version>
152152
<scope>test</scope>
153153
</dependency>
154154

155155
<dependency>
156156
<groupId>com.github.tomakehurst</groupId>
157157
<artifactId>wiremock-jre8</artifactId>
158-
<version>2.35.1</version>
158+
<version>2.35.2</version>
159159
<scope>test</scope>
160160
<exclusions>
161161
<exclusion>
@@ -167,7 +167,7 @@
167167
<dependency>
168168
<groupId>no.digipost</groupId>
169169
<artifactId>jul-to-slf4j-junit-extension</artifactId>
170-
<version>1.0</version>
170+
<version>1.0.1</version>
171171
<scope>test</scope>
172172
</dependency>
173173
</dependencies>

lib/src/main/java/no/digipost/signature/client/core/internal/configuration/ApacheHttpClientSslConfigurer.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import no.digipost.signature.client.security.KeyStoreConfig;
99
import no.digipost.signature.client.security.OrganizationNumberValidation;
1010
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
11+
import org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy;
1112
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
12-
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
1313
import org.apache.hc.core5.ssl.SSLContexts;
1414

1515
import javax.net.ssl.SSLContext;
@@ -40,10 +40,7 @@ public ApacheHttpClientSslConfigurer certificatChainValidation(CertificateChainV
4040

4141
@Override
4242
public void applyTo(PoolingHttpClientConnectionManagerBuilder connectionManager) {
43-
connectionManager.setSSLSocketFactory(SSLConnectionSocketFactoryBuilder.create()
44-
.setSslContext(sslContext())
45-
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE)
46-
.build());
43+
connectionManager.setTlsSocketStrategy(new DefaultClientTlsStrategy(sslContext(), NoopHostnameVerifier.INSTANCE));
4744
}
4845

4946

0 commit comments

Comments
 (0)