mirror of https://github.com/apache/lucene.git
SOLR-9606: Change hard-coded keysize from 512 to 1024
(cherry picked from commit e402a30
)
This commit is contained in:
parent
2e821eac27
commit
8bd4ad36c5
|
@ -132,6 +132,8 @@ Other Changes
|
|||
|
||||
* SOLR-9597: Add setReadOnly(String ...) to ConnectionImpl (Kevin Risden)
|
||||
|
||||
* SOLR-9609: Change hard-coded keysize from 512 to 1024 (Jeremy Martini via Erick Erickson)
|
||||
|
||||
================== 6.3.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -285,6 +285,10 @@ public final class CryptoKeys {
|
|||
private final PrivateKey privateKey;
|
||||
private final SecureRandom random = new SecureRandom();
|
||||
|
||||
// If this ever comes back to haunt us see the discussion at
|
||||
// SOLR-9609 for background and code allowing this to go
|
||||
// into security.json
|
||||
private static final int DEFAULT_KEYPAIR_LENGTH = 1024;
|
||||
|
||||
public RSAKeyPair() {
|
||||
KeyPairGenerator keyGen = null;
|
||||
|
@ -293,7 +297,7 @@ public final class CryptoKeys {
|
|||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
|
||||
}
|
||||
keyGen.initialize(512);
|
||||
keyGen.initialize(DEFAULT_KEYPAIR_LENGTH);
|
||||
java.security.KeyPair keyPair = keyGen.genKeyPair();
|
||||
privateKey = keyPair.getPrivate();
|
||||
publicKey = keyPair.getPublic();
|
||||
|
|
Loading…
Reference in New Issue