You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2021/11/05 16:52:39 UTC

[lucene-solr] branch branch_8x updated: SOLR-14438: Add simple attribution to methods and in LICENSE.txt (#2603)

This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new a69598d  SOLR-14438: Add simple attribution to methods and in LICENSE.txt (#2603)
a69598d is described below

commit a69598dcb82fe168b8082f435e190e3c813e9db1
Author: Jan Høydahl <ja...@users.noreply.github.com>
AuthorDate: Thu Nov 4 19:20:42 2021 +0100

    SOLR-14438: Add simple attribution to methods and in LICENSE.txt (#2603)
---
 solr/LICENSE.txt                                        |  7 +++++++
 solr/core/src/java/org/apache/solr/util/CryptoKeys.java | 10 ++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/solr/LICENSE.txt b/solr/LICENSE.txt
index 534e44e..a87929c 100644
--- a/solr/LICENSE.txt
+++ b/solr/LICENSE.txt
@@ -224,3 +224,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+
+=========================================================================
+==     decodeAES attribution                                           ==
+=========================================================================
+In class org.apache.solr.util.CryptoKeys, the method evpBytesTokey() is
+a copy of Ola Bini's work which he released into the Public Domain on his
+blog in 2006: https://olabini.se/blog/2006/10/openssl-in-jruby/
\ No newline at end of file
diff --git a/solr/core/src/java/org/apache/solr/util/CryptoKeys.java b/solr/core/src/java/org/apache/solr/util/CryptoKeys.java
index f48c0b4..ba17678 100644
--- a/solr/core/src/java/org/apache/solr/util/CryptoKeys.java
+++ b/solr/core/src/java/org/apache/solr/util/CryptoKeys.java
@@ -162,7 +162,10 @@ public final class CryptoKeys {
 
   }
 
-
+  /**
+   * Method copied from blog post https://olabini.se/blog/2006/10/openssl-in-jruby/
+   * where it is released into the Public Domain, also see LICENSE.txt
+   */
   private static byte[][] evpBytesTokey(int key_len, int iv_len, MessageDigest md,
                                         byte[] salt, byte[] data, int count) {
     byte[][] both = new byte[2][];
@@ -241,7 +244,10 @@ public final class CryptoKeys {
     throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Error decoding ", e);
   }
 
-
+  /**
+   * Code copied from a 2019 Stack Overflow post by Maarten Bodewes
+   * https://stackoverflow.com/questions/11783062/how-to-decrypt-file-in-java-encrypted-with-openssl-command-using-aes
+   */
   public static String decodeAES(String base64CipherTxt, String pwd, final int keySizeBits) {
     final Charset ASCII = Charset.forName("ASCII");
     final int INDEX_KEY = 0;