Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
java:
- 11
vault:
- 1.11.12
- 1.12.0
- 1.12.1
- 1.12.2
Expand All @@ -33,6 +32,7 @@ jobs:
- 1.13.3
- 1.13.4
- 1.14.0
- 1.14.1
- latest
os:
- ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ artifacts {
archives javadocJar, sourcesJar
}

java {
withSourcesJar()
withJavadocJar()
}

if (hasProperty("publish")) {

publishing {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/jopenlibs/vault/SslConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ private SSLContext buildSslContextFromJks() throws VaultException {
}

try {
final SSLContext sslContext = SSLContext.getInstance("TLS");
final SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(keyManagers, trustManagers, null);
return sslContext;
} catch (NoSuchAlgorithmException | KeyManagementException e) {
Expand Down Expand Up @@ -643,7 +643,7 @@ private SSLContext buildSslContextFromPem() throws VaultException {
keyManagers = keyManagerFactory.getKeyManagers();
}

final SSLContext sslContext = SSLContext.getInstance("TLS");
final SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(keyManagers, trustManagers, null);
return sslContext;
} catch (CertificateException | IOException | NoSuchAlgorithmException | KeyStoreException |
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/github/jopenlibs/vault/rest/Rest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class Rest {

static {
try {
DISABLED_SSL_CONTEXT = SSLContext.getInstance("TLS");
DISABLED_SSL_CONTEXT = SSLContext.getInstance("TLSv1.2");
DISABLED_SSL_CONTEXT.init(null, new TrustManager[]{new X509TrustManager() {
@Override
public void checkClientTrusted(final X509Certificate[] x509Certificates,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public void readShouldReuseConnectionAfterSuccessfulRequestByHttp() throws Excep
int readNum = 10;

HttpClient httpClient = HttpClient.newBuilder()
.connectTimeout(Duration.of(5, ChronoUnit.SECONDS))
.connectTimeout(Duration.of(10, ChronoUnit.SECONDS))
.build();

Logical vault = Vault.create(new VaultConfig()
.httpClient(httpClient)
.address("http://localhost:8999")
.token(TOKEN)
.readTimeout(1)
.readTimeout(10)
.engineVersion(1)
.build()).logical();

Expand Down