directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1749575 - /directory/apacheds/branches/apacheds-value/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
Date Tue, 21 Jun 2016 16:57:15 GMT
Author: elecharny
Date: Tue Jun 21 16:57:15 2016
New Revision: 1749575

URL: http://svn.apache.org/viewvc?rev=1749575&view=rev
Log:
Applied Stefan's patch for Key length

Modified:
    directory/apacheds/branches/apacheds-value/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java

Modified: directory/apacheds/branches/apacheds-value/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java?rev=1749575&r1=1749574&r2=1749575&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
(original)
+++ directory/apacheds/branches/apacheds-value/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
Tue Jun 21 16:57:15 2016
@@ -301,13 +301,19 @@ public final class TlsKeyGenerator
     }
 
 
+    public static void addKeyPair( Entry entry, String issuerDN, String subjectDN, String
keyAlgo ) throws LdapException
+    {
+        addKeyPair( entry, issuerDN, subjectDN, keyAlgo, KEY_SIZE );
+    }
+
+
     /**
      * @see #addKeyPair(org.apache.directory.api.ldap.model.entry.Entry)
      * 
      * TODO the code is duplicate atm, will eliminate this redundancy after finding
      * a better thought (an instant one is to call this method from the aboveaddKeyPair(entry)
and remove the impl there)
      */
-    public static void addKeyPair( Entry entry, String issuerDN, String subjectDN, String
keyAlgo )
+    public static void addKeyPair( Entry entry, String issuerDN, String subjectDN, String
keyAlgo, int keySize )
         throws LdapException
     {
         Attribute objectClass = entry.get( SchemaConstants.OBJECT_CLASS_AT );
@@ -333,7 +339,7 @@ public final class TlsKeyGenerator
             throw ne;
         }
 
-        generator.initialize( KEY_SIZE );
+        generator.initialize( keySize );
         KeyPair keypair = generator.genKeyPair();
         entry.put( KEY_ALGORITHM_AT, keyAlgo );
 



Mime
View raw message