mirror of https://github.com/apache/lucene.git
SOLR-5776: Set the server side to SHA1PRNG as in Steve's original patch.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1588402 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1736bb4418
commit
389a4b93dc
|
@ -41,7 +41,7 @@ import org.eclipse.jetty.util.security.CertificateUtils;
|
|||
public class SSLTestConfig extends SSLConfig {
|
||||
public static File TEST_KEYSTORE = ExternalPaths.EXAMPLE_HOME == null ? null
|
||||
: new File(ExternalPaths.EXAMPLE_HOME, "../etc/solrtest.keystore");
|
||||
|
||||
private static String SECURE_RANDOM_ALGORITHM = "SHA1PRNG";
|
||||
private static String TEST_KEYSTORE_PATH = TEST_KEYSTORE != null
|
||||
&& TEST_KEYSTORE.exists() ? TEST_KEYSTORE.getAbsolutePath() : null;
|
||||
private static String TEST_KEYSTORE_PASSWORD = "secret";
|
||||
|
@ -57,6 +57,7 @@ public class SSLTestConfig extends SSLConfig {
|
|||
|
||||
public SSLTestConfig(boolean useSSL, boolean clientAuth, String keyStore, String keyStorePassword, String trustStore, String trustStorePassword) {
|
||||
super(useSSL, clientAuth, keyStore, keyStorePassword, trustStore, trustStorePassword);
|
||||
setSecureRandomAlgorithm(SECURE_RANDOM_ALGORITHM);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,7 +127,7 @@ public class SSLTestConfig extends SSLConfig {
|
|||
*/
|
||||
private static class NullSecureRandom extends SecureRandom {
|
||||
public byte[] generateSeed(int numBytes) {
|
||||
return new byte[0];
|
||||
return new byte[numBytes];
|
||||
}
|
||||
|
||||
synchronized public void nextBytes(byte[] bytes) {
|
||||
|
|
Loading…
Reference in New Issue