"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java" between
solr-8.4.0-src.tgz and solr-8.4.1-src.tgz

About: Solr is the search platform from the Apache Lucene project. Its major features include full-text search, hit highlighting, faceted search, caching, replication, and a web admin interface.

SSLTestConfig.java  (solr-8.4.0-src.tgz):SSLTestConfig.java  (solr-8.4.1-src.tgz)
skipping to change at line 187 skipping to change at line 187
return builder.build(); return builder.build();
} }
public SSLConfig buildClientSSLConfig() { public SSLConfig buildClientSSLConfig() {
if (!isSSLMode()) { if (!isSSLMode()) {
return null; return null;
} }
return new SSLConfig(isSSLMode(), isClientAuthMode(), null, null, null, null ) { return new SSLConfig(isSSLMode(), isClientAuthMode(), null, null, null, null ) {
@Override @Override
public SslContextFactory createContextFactory() { public SslContextFactory.Client createClientContextFactory() {
SslContextFactory.Client factory = new SslContextFactory.Client(!checkPe erName); SslContextFactory.Client factory = new SslContextFactory.Client(!checkPe erName);
try { try {
factory.setSslContext(buildClientSSLContext()); factory.setSslContext(buildClientSSLContext());
} catch (KeyManagementException | UnrecoverableKeyException | NoSuchAlgo rithmException | KeyStoreException e) { } catch (KeyManagementException | UnrecoverableKeyException | NoSuchAlgo rithmException | KeyStoreException e) {
throw new IllegalStateException("Unable to setup https scheme for HTTP Client to test SSL.", e); throw new IllegalStateException("Unable to setup https scheme for HTTP Client to test SSL.", e);
} }
return factory; return factory;
} }
}; };
} }
skipping to change at line 215 skipping to change at line 215
* certificates (since that's what is almost always used during testing). * certificates (since that's what is almost always used during testing).
* almost always used during testing). * almost always used during testing).
*/ */
public SSLConfig buildServerSSLConfig() { public SSLConfig buildServerSSLConfig() {
if (!isSSLMode()) { if (!isSSLMode()) {
return null; return null;
} }
return new SSLConfig(isSSLMode(), isClientAuthMode(), null, null, null, null ) { return new SSLConfig(isSSLMode(), isClientAuthMode(), null, null, null, null ) {
@Override @Override
public SslContextFactory createContextFactory() { public SslContextFactory.Server createContextFactory() {
SslContextFactory.Server factory = new SslContextFactory.Server(); SslContextFactory.Server factory = new SslContextFactory.Server();
try { try {
SSLContextBuilder builder = SSLContexts.custom(); SSLContextBuilder builder = SSLContexts.custom();
builder.setSecureRandom(NotSecurePsuedoRandom.INSTANCE); builder.setSecureRandom(NotSecurePsuedoRandom.INSTANCE);
builder.loadKeyMaterial(buildKeyStore(keyStore, TEST_PASSWORD), TEST_P ASSWORD.toCharArray()); builder.loadKeyMaterial(buildKeyStore(keyStore, TEST_PASSWORD), TEST_P ASSWORD.toCharArray());
if (isClientAuthMode()) { if (isClientAuthMode()) {
builder.loadTrustMaterial(buildKeyStore(trustStore, TEST_PASSWORD), new TrustSelfSignedStrategy()).build(); builder.loadTrustMaterial(buildKeyStore(trustStore, TEST_PASSWORD), new TrustSelfSignedStrategy()).build();
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)