Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/fluent-mapp…
Browse files Browse the repository at this point in the history
…ing-of-sslfactory

# Conflicts:
#	sslcontext-kickstart/src/main/java/nl/altindag/ssl/SSLFactory.java
  • Loading branch information
Hakky54 committed Dec 9, 2024
2 parents e97dc55 + 804448b commit 2f7d53f
Show file tree
Hide file tree
Showing 35 changed files with 232 additions and 876 deletions.
65 changes: 65 additions & 0 deletions KEYS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
**********************************************************************************************
** **
** Command used to export public key information: gpg --list-sigs && gpg --armor --export **
** **
**********************************************************************************************

pub rsa4096 2019-06-20 [SC]
E5138A8E9F2E7E42D38B14D99AEE152CDCCEBFCB
uid [ unknown] Hakan Altindag <hakangoudberg@hotmail.com>
sig 3 9AEE152CDCCEBFCB 2019-06-20 [self-signature]
sub rsa4096 2019-06-20 [E]
sig 9AEE152CDCCEBFCB 2019-06-20 [self-signature]

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF0LJ4UBEADDviIvloIaEtjAac3EHGGQtHtqKlp4uXXIgEWh1vNulzVSRpBE
LDqDcrTowNU+CYQ3elTKa8cDrZviR7bMBju7esbVWxZu3ueMTG3IrvbDZUPYQ9Zt
DQQr4/kDaSn/JpNiOyC815QHC5eQD9CjIRntZnxiigpIerb2PStd2v7DcziA9oK9
8ByIVvEAWjxawI/E/Nkt1kuasoQCvdcZrhoGhPvLzI4OdCpgow8IB8kpRlO7vZGF
ncQXuyluA2FXO0t1FHOGaPN5F+PZ0JuBH/84VWacepSO0lztopMpUtzS3eNzxUDq
t01Q35RPgzp/DAh4lAB03XA6vo2BDzMG61CxieH8Qd+7lqXglO6y376gtuQ3H0Hk
HoXLRn/0mExcYRxAR5li+Loib65da9nRGclIhYz5Ksy9waqzkSIU16UX/xmxo0S7
T7OFhKexoRPsJkNPSFRgdj/Kro03WL7qqPMemJ5tjAcfbIDcI1HJH3uTmK6tlDfG
L62Rz8LskiVjHXhLSh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HWidInpzkRdc/NFVsXaWZen8/+BxEGumLdX
Ga3gZRPFCciaRTM+Z8nl7sxT0yJamipypoE36u7SAZ4DRsLWJ9sRAzy5ISWX9WmS
niXhcBrigevhWhWtyfRMaMK1CgtmR33tR/sGxRFNdDDwWMbMHFGCNrsHwUG6Apqh
ZlBPDJ84hLzjNvg0Js6TyFvC1m5GNJp0WwQ55HBdmdf7qI2OIkzOdFu+azzSYF64
UPg3igy0xKsT10QKlEkgxUsoZ7BZ2mNe/yQWMNWSVqSarg7ZgI5n+6T3C+vapIAf
TiGdFCjuQetpG9jepE/YiKKfpwDdylj97FPCW0tRh7C/l12XGy8Cs+TLEqm0vZME
DoHgJ7xQ
=KOH6
-----END PGP PUBLIC KEY BLOCK-----
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ See the [javadoc](https://sslcontext-kickstart.com/apidocs/index.html) for all t

### Acknowledgement
I would like to thank [Cody A. Ray](https://github.com/codyaray) for his contribution to the community regarding loading multiple Keystores into the SSLContext. The limitation of the JDK is to only support one keystore for the KeyManagerFactory and only one keystore for the TrustManagerFactory.
The code snippets which Cody has shared are now available within this library and can be found here: [CompositeX509KeyManager](sslcontext-kickstart/src/main/java/nl/altindag/ssl/keymanager/CompositeX509ExtendedKeyManager.java) and [CompositeX509TrustManager](sslcontext-kickstart/src/main/java/nl/altindag/ssl/trustmanager/CompositeX509ExtendedTrustManager.java)
The code snippets which Cody has shared are now available within this library and can be found here: [AggregatedX509ExtendedKeyManager](sslcontext-kickstart/src/main/java/nl/altindag/ssl/keymanager/AggregatedX509ExtendedKeyManager.java) and [AggregatedX509ExtendedTrustManager](sslcontext-kickstart/src/main/java/nl/altindag/ssl/trustmanager/AggregatedX509ExtendedTrustManager.java)

The original content can be found here:
- [Codyaray - Java SSL with Multiple KeyStores](http://codyaray.com/2013/04/java-ssl-with-multiple-keystores)
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@

<properties>
<version.slf4j>2.0.16</version.slf4j>
<version.junit>5.11.2</version.junit>
<version.junit>5.11.3</version.junit>
<version.assertj-core>3.26.3</version.assertj-core>
<version.logcaptor>2.9.3</version.logcaptor>
<version.logcaptor>2.10.0</version.logcaptor>
<version.mockito>5.11.0</version.mockito>
<version.ssl-server>1.0.6</version.ssl-server>
<version.byte-buddy>1.15.5</version.byte-buddy>
<version.byte-buddy>1.15.10</version.byte-buddy>
<version.jacoco-maven-plugin>0.8.12</version.jacoco-maven-plugin>
<version.maven-surefire-plugin>3.5.1</version.maven-surefire-plugin>
<version.maven-fail-safe>3.5.1</version.maven-fail-safe>
<version.maven-surefire-plugin>3.5.2</version.maven-surefire-plugin>
<version.maven-fail-safe>3.5.2</version.maven-fail-safe>
<version.maven-enforcer-plugin>3.5.0</version.maven-enforcer-plugin>
<version.maven-javadoc-plugin>3.10.1</version.maven-javadoc-plugin>
<version.maven-javadoc-plugin>3.11.1</version.maven-javadoc-plugin>
<version.maven-source-plugin>3.3.1</version.maven-source-plugin>
<version.license-maven-plugin>4.6</version.license-maven-plugin>
<version.maven-surefire-junit5-tree-reporter>1.3.0</version.maven-surefire-junit5-tree-reporter>
<version.maven-surefire-junit5-tree-reporter>1.4.0</version.maven-surefire-junit5-tree-reporter>
<license.git.copyrightYears>2019</license.git.copyrightYears>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion sslcontext-kickstart-for-apache5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</developers>

<properties>
<version.httpcomponents.httpclient5>5.4</version.httpcomponents.httpclient5>
<version.httpcomponents.httpclient5>5.4.1</version.httpcomponents.httpclient5>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
package nl.altindag.ssl.apache5.util;

import nl.altindag.ssl.SSLFactory;
import org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.TlsSocketStrategy;
import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
import org.apache.hc.core5.reactor.ssl.SSLBufferMode;
Expand All @@ -30,16 +28,6 @@ public final class Apache5SslUtils {

private Apache5SslUtils() {}

@Deprecated
public static LayeredConnectionSocketFactory toSocketFactory(SSLFactory sslFactory) {
return new SSLConnectionSocketFactory(
sslFactory.getSslContext(),
sslFactory.getSslParameters().getProtocols(),
sslFactory.getSslParameters().getCipherSuites(),
sslFactory.getHostnameVerifier()
);
}

public static TlsStrategy toTlsStrategy(SSLFactory sslFactory) {
return createClientTlsStrategy(sslFactory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager;
import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
import org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.TlsSocketStrategy;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.Method;
import org.apache.hc.core5.http.nio.support.BasicRequestProducer;
Expand Down Expand Up @@ -76,9 +76,9 @@ void executeHttpsRequestWithMutualAuthentication() throws IOException {
.withTrustMaterial("keystore/client-server/client-one/truststore.jks", "secret".toCharArray())
.build();

LayeredConnectionSocketFactory socketFactory = Apache5SslUtils.toSocketFactory(sslFactoryForClient);
TlsSocketStrategy tlsSocketStrategy = Apache5SslUtils.toTlsSocketStrategy(sslFactoryForClient);
PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
.setSSLSocketFactory(socketFactory)
.setTlsSocketStrategy(tlsSocketStrategy)
.build();

HttpClient httpClient = HttpClients.custom()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import nl.altindag.ssl.SSLFactory;
import nl.altindag.ssl.util.KeyStoreUtils;
import org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.TlsSocketStrategy;
import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
import org.junit.jupiter.api.Test;
Expand All @@ -38,49 +37,6 @@ class Apache5SslUtilsShould {
private static final char[] TRUSTSTORE_PASSWORD = "secret".toCharArray();
private static final String KEYSTORE_LOCATION = "keystore/";

@Test
void createLayeredConnectionSocketFactoryWithTrustMaterial() {
KeyStore trustStore = KeyStoreUtils.loadKeyStore(KEYSTORE_LOCATION + TRUSTSTORE_FILE_NAME, TRUSTSTORE_PASSWORD);

SSLFactory sslFactory = SSLFactory.builder()
.withTrustMaterial(trustStore)
.build();

assertThat(sslFactory.getSslContext()).isNotNull();

assertThat(sslFactory.getKeyManager()).isNotPresent();

assertThat(sslFactory.getTrustManager()).isNotNull();
assertThat(sslFactory.getTrustedCertificates()).isNotEmpty();
assertThat(sslFactory.getTrustManager()).isNotNull();
assertThat(sslFactory.getHostnameVerifier()).isNotNull();

LayeredConnectionSocketFactory socketFactory = Apache5SslUtils.toSocketFactory(sslFactory);
assertThat(socketFactory).isNotNull();
}

@Test
void createLayeredConnectionSocketFactoryWithIdentityMaterialAndTrustMaterial() {
KeyStore identity = KeyStoreUtils.loadKeyStore(KEYSTORE_LOCATION + IDENTITY_FILE_NAME, IDENTITY_PASSWORD);
KeyStore trustStore = KeyStoreUtils.loadKeyStore(KEYSTORE_LOCATION + TRUSTSTORE_FILE_NAME, TRUSTSTORE_PASSWORD);

SSLFactory sslFactory = SSLFactory.builder()
.withIdentityMaterial(identity, IDENTITY_PASSWORD)
.withTrustMaterial(trustStore)
.build();

assertThat(sslFactory.getSslContext()).isNotNull();
assertThat(sslFactory.getKeyManager()).isPresent();

assertThat(sslFactory.getTrustManager()).isNotNull();
assertThat(sslFactory.getTrustedCertificates()).isNotEmpty();
assertThat(sslFactory.getTrustManager()).isNotNull();
assertThat(sslFactory.getHostnameVerifier()).isNotNull();

LayeredConnectionSocketFactory socketFactory = Apache5SslUtils.toSocketFactory(sslFactory);
assertThat(socketFactory).isNotNull();
}

@Test
void createTlsStrategy() {
KeyStore identity = KeyStoreUtils.loadKeyStore(KEYSTORE_LOCATION + IDENTITY_FILE_NAME, IDENTITY_PASSWORD);
Expand Down
4 changes: 2 additions & 2 deletions sslcontext-kickstart-for-netty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
</developers>

<properties>
<version.netty-handler>4.1.114.Final</version.netty-handler>
<version.reactor-netty>1.1.23</version.reactor-netty>
<version.netty-handler>4.1.115.Final</version.netty-handler>
<version.reactor-netty>1.2.0</version.reactor-netty>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion sslcontext-kickstart-for-pem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</developers>

<properties>
<version.bouncy-castle>1.78.1</version.bouncy-castle>
<version.bouncy-castle>1.79</version.bouncy-castle>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ final class PemFormatter {

private static final Pattern PEM_PATTERN = Pattern.compile("(-----BEGIN.*?-----)(.*?)(-----END.*?-----)");
private static final String INNER_ENCRYPTED_HEADER = "Proc-Type: 4,ENCRYPTED";
private static final Map<String, Integer> ENCRYPTION_ALGORITHMS_AND_SALT_TO_FIELD_LENGTH = new HashMap<>();
private static final Map<String, Integer> ENCRYPTION_ALGORITHMS_AND_SALT_TO_FIELD_LENGTH;
private static final String MAX_64_CHARACTER_LINE_SPLITTER = "(?<=\\G.{64})";
private static final String EMPTY = "";

static {
ENCRYPTION_ALGORITHMS_AND_SALT_TO_FIELD_LENGTH.put("AES-256-CBC", 54);
ENCRYPTION_ALGORITHMS_AND_SALT_TO_FIELD_LENGTH.put("DES-EDE3-CBC", 39);
Map<String, Integer> encryptionAlgorithmsAndSaltToFieldLength = new HashMap<>();
encryptionAlgorithmsAndSaltToFieldLength.put("AES-256-CBC", 54);
encryptionAlgorithmsAndSaltToFieldLength.put("DES-EDE3-CBC", 39);
ENCRYPTION_ALGORITHMS_AND_SALT_TO_FIELD_LENGTH = Collections.unmodifiableMap(encryptionAlgorithmsAndSaltToFieldLength);
}

private PemFormatter() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
import org.bouncycastle.openssl.X509TrustedCertificateBlock;
import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo;

import java.util.Arrays;
import java.util.List;

import static nl.altindag.ssl.util.internal.CollectionUtils.toUnmodifiableList;

enum PemType {

CERTIFICATE(X509CertificateHolder.class, X509TrustedCertificateBlock.class),
Expand All @@ -34,7 +35,7 @@ enum PemType {
private final List<Class<?>> supportedTypes;

PemType(Class<?>... classes) {
this.supportedTypes = Arrays.asList(classes);
this.supportedTypes = toUnmodifiableList(classes);
}

static PemType from(Object object) {
Expand Down
8 changes: 4 additions & 4 deletions sslcontext-kickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
</developers>

<properties>
<version.maven-site-plugin>3.20.0</version.maven-site-plugin>
<version.maven-project-info-reports-plugin>3.7.0</version.maven-project-info-reports-plugin>
<version.maven-surefire-report-plugin>3.5.1</version.maven-surefire-report-plugin>
<version.maven-jxr-plugin>3.5.0</version.maven-jxr-plugin>
<version.maven-site-plugin>3.21.0</version.maven-site-plugin>
<version.maven-project-info-reports-plugin>3.8.0</version.maven-project-info-reports-plugin>
<version.maven-surefire-report-plugin>3.5.2</version.maven-surefire-report-plugin>
<version.maven-jxr-plugin>3.6.0</version.maven-jxr-plugin>
</properties>

<dependencies>
Expand Down
1 change: 0 additions & 1 deletion sslcontext-kickstart/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
exports nl.altindag.ssl;
exports nl.altindag.ssl.exception;
exports nl.altindag.ssl.model;
exports nl.altindag.ssl.trustmanager.validator;
exports nl.altindag.ssl.trustmanager.trustoptions;
exports nl.altindag.ssl.util;
exports nl.altindag.ssl.sslcontext to java.base;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@
import nl.altindag.ssl.sslcontext.FenixSSLContext;
import nl.altindag.ssl.trustmanager.trustoptions.TrustAnchorTrustOptions;
import nl.altindag.ssl.trustmanager.trustoptions.TrustStoreTrustOptions;
import nl.altindag.ssl.trustmanager.validator.ChainAndAuthTypeValidator;
import nl.altindag.ssl.trustmanager.validator.ChainAndAuthTypeWithSSLEngineValidator;
import nl.altindag.ssl.trustmanager.validator.ChainAndAuthTypeWithSocketValidator;
import nl.altindag.ssl.util.Function;
import nl.altindag.ssl.util.HostnameVerifierUtils;
import nl.altindag.ssl.util.Function;
import nl.altindag.ssl.util.KeyManagerUtils;
import nl.altindag.ssl.util.KeyStoreUtils;
import nl.altindag.ssl.util.Box;
Expand Down Expand Up @@ -74,7 +71,6 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.BiPredicate;
import java.util.function.Predicate;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -210,9 +206,6 @@ public static class Builder {
private int sessionTimeoutInSeconds = -1;
private int sessionCacheSizeInBytes = -1;

private ChainAndAuthTypeValidator chainAndAuthTypeValidator = null;
private ChainAndAuthTypeWithSocketValidator chainAndAuthTypeWithSocketValidator = null;
private ChainAndAuthTypeWithSSLEngineValidator chainAndAuthTypeWithSSLEngineValidator = null;
private Predicate<TrustManagerParameters> trustManagerParametersValidator = null;
private boolean shouldTrustedCertificatesBeConcealed = false;

Expand Down Expand Up @@ -581,15 +574,6 @@ public Builder withInflatableTrustMaterial() {
return this;
}

@Deprecated
public Builder withInflatableTrustMaterial(Path trustStorePath,
char[] trustStorePassword,
String trustStoreType,
BiPredicate<X509Certificate[], String> certificateAndAuthTypeTrustPredicate) {
trustManagers.add(TrustManagerUtils.createInflatableTrustManager(trustStorePath, trustStorePassword, trustStoreType, certificateAndAuthTypeTrustPredicate));
return this;
}

public Builder withInflatableTrustMaterial(Path trustStorePath,
char[] trustStorePassword,
String trustStoreType,
Expand Down Expand Up @@ -758,24 +742,6 @@ public Builder withTrustingAllCertificatesWithoutValidation() {
return this;
}

@Deprecated
public Builder withTrustEnhancer(ChainAndAuthTypeValidator validator) {
this.chainAndAuthTypeValidator = validator;
return this;
}

@Deprecated
public Builder withTrustEnhancer(ChainAndAuthTypeWithSocketValidator validator) {
this.chainAndAuthTypeWithSocketValidator = validator;
return this;
}

@Deprecated
public Builder withTrustEnhancer(ChainAndAuthTypeWithSSLEngineValidator validator) {
this.chainAndAuthTypeWithSSLEngineValidator = validator;
return this;
}

public Builder withTrustEnhancer(Predicate<TrustManagerParameters> validator) {
this.trustManagerParametersValidator = validator;
return this;
Expand Down Expand Up @@ -856,9 +822,6 @@ private X509ExtendedTrustManager createTrustManager() {
.withLoggingTrustManager(loggingTrustManagerEnabled)
.withTrustEnhancer(trustManagerParametersValidator)
.withTrustEnhancer(shouldTrustedCertificatesBeConcealed)
.withTrustEnhancer(chainAndAuthTypeValidator)
.withTrustEnhancer(chainAndAuthTypeWithSocketValidator)
.withTrustEnhancer(chainAndAuthTypeWithSSLEngineValidator)
.build();
}

Expand Down
Loading

0 comments on commit 2f7d53f

Please sign in to comment.