Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ed25519-java for openSUSE:Factory 
checked in at 2022-03-22 19:39:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ed25519-java (Old)
 and      /work/SRC/openSUSE:Factory/.ed25519-java.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ed25519-java"

Tue Mar 22 19:39:58 2022 rev:2 rq:963846 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ed25519-java/ed25519-java.changes        
2020-06-29 21:18:34.673823460 +0200
+++ /work/SRC/openSUSE:Factory/.ed25519-java.new.25692/ed25519-java.changes     
2022-03-22 19:40:01.723079116 +0100
@@ -1,0 +2,9 @@
+Tue Mar 22 08:08:13 UTC 2022 - Fridrich Strba <[email protected]>
+
+- Build with source and target levels 8
+- Added patches:
+  * 0001-EdDSAEngine.initVerify-Handle-any-non-EdDSAPublicKey.patch
+  * 0002-Disable-test-that-relies-on-internal-sun-JDK-classes.patch
+    + Remove use of internal sun JDK classes
+
+-------------------------------------------------------------------

New:
----
  0001-EdDSAEngine.initVerify-Handle-any-non-EdDSAPublicKey.patch
  0002-Disable-test-that-relies-on-internal-sun-JDK-classes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ed25519-java.spec ++++++
--- /var/tmp/diff_new_pack.evf2OC/_old  2022-03-22 19:40:02.275079696 +0100
+++ /var/tmp/diff_new_pack.evf2OC/_new  2022-03-22 19:40:02.279079699 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ed25519-java
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,10 @@
 License:        CC0-1.0
 URL:            https://github.com/str4d/ed25519-java
 Source0:        
https://github.com/str4d/ed25519-java/archive/v%{version}/%{name}-%{version}.tar.gz
+Patch0:         0001-EdDSAEngine.initVerify-Handle-any-non-EdDSAPublicKey.patch
+Patch1:         0002-Disable-test-that-relies-on-internal-sun-JDK-classes.patch
 BuildRequires:  fdupes
+BuildRequires:  java-devel >= 1.8
 BuildRequires:  maven-local
 BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
 BuildArch:      noarch
@@ -49,6 +52,8 @@
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 # Unwanted tasks
 %pom_remove_plugin :maven-gpg-plugin
@@ -63,7 +68,11 @@
 %{mvn_file} net.i2p.crypto:eddsa %{name} eddsa
 
 %build
-%{mvn_build} -f -- -Dsource=8
+%{mvn_build} -f -- \
+%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
+       -Dmaven.compiler.release=8 \
+%endif
+    -Dsource=8
 
 %install
 %mvn_install

++++++ 0001-EdDSAEngine.initVerify-Handle-any-non-EdDSAPublicKey.patch ++++++
>From c5629faa3e1880cc71da506263f224bc818fe827 Mon Sep 17 00:00:00 2001
From: Jack Grigg <[email protected]>
Date: Sun, 27 Jan 2019 23:27:00 +0000
Subject: [PATCH 1/2] EdDSAEngine.initVerify(): Handle any non-EdDSAPublicKey
 X.509-encoded pubkey

sun.security.x509.X509Key is a JDK-internal API, and should not be used
directly. Instead of looking for an instance of that class, we check the
primary encoding format of the PublicKey, and proceed if it is "X.509".
---
 src/net/i2p/crypto/eddsa/EdDSAEngine.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/net/i2p/crypto/eddsa/EdDSAEngine.java 
b/src/net/i2p/crypto/eddsa/EdDSAEngine.java
index 1f0ba6d..6b25410 100644
--- a/src/net/i2p/crypto/eddsa/EdDSAEngine.java
+++ b/src/net/i2p/crypto/eddsa/EdDSAEngine.java
@@ -29,7 +29,6 @@ import java.util.Arrays;
 import net.i2p.crypto.eddsa.math.Curve;
 import net.i2p.crypto.eddsa.math.GroupElement;
 import net.i2p.crypto.eddsa.math.ScalarOps;
-import sun.security.x509.X509Key;
 
 /**
  * Signing and verification for EdDSA.
@@ -157,7 +156,7 @@ public final class EdDSAEngine extends Signature {
                 }
             } else if 
(!key.getParams().getHashAlgorithm().equals(digest.getAlgorithm()))
                 throw new InvalidKeyException("Key hash algorithm does not 
match chosen digest");
-        } else if (publicKey instanceof X509Key) {
+        } else if (publicKey.getFormat().equals("X.509")) {
             // X509Certificate will sometimes contain an X509Key rather than 
the EdDSAPublicKey itself; the contained
             // key is valid but needs to be instanced as an EdDSAPublicKey 
before it can be used.
             EdDSAPublicKey parsedPublicKey;
-- 
2.33.1


++++++ 0002-Disable-test-that-relies-on-internal-sun-JDK-classes.patch ++++++
>From 1ea7fb5ed949d8a458fda40b186868b7cffbb271 Mon Sep 17 00:00:00 2001
From: Mat Booth <[email protected]>
Date: Wed, 1 Dec 2021 09:35:10 +0000
Subject: [PATCH 2/2] Disable test that relies on internal sun JDK classes

---
 test/net/i2p/crypto/eddsa/EdDSAEngineTest.java | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/test/net/i2p/crypto/eddsa/EdDSAEngineTest.java 
b/test/net/i2p/crypto/eddsa/EdDSAEngineTest.java
index 2ed793b..adc46fd 100644
--- a/test/net/i2p/crypto/eddsa/EdDSAEngineTest.java
+++ b/test/net/i2p/crypto/eddsa/EdDSAEngineTest.java
@@ -31,8 +31,6 @@ import net.i2p.crypto.eddsa.spec.EdDSAPublicKeySpec;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
-import sun.security.util.DerValue;
-import sun.security.x509.X509Key;
 
 /**
  * @author str4d
@@ -217,20 +215,4 @@ public class EdDSAEngineTest {
         assertThat("verifyOneShot() failed", sgr.verifyOneShot(TEST_MSG, 
TEST_MSG_SIG), is(true));
     }
 
-    @Test
-    public void testVerifyX509PublicKeyInfo() throws Exception {
-        EdDSAParameterSpec spec = EdDSANamedCurveTable.getByName("Ed25519");
-        Signature sgr = new 
EdDSAEngine(MessageDigest.getInstance(spec.getHashAlgorithm()));
-        for (Ed25519TestVectors.TestTuple testCase : 
Ed25519TestVectors.testCases) {
-            EdDSAPublicKeySpec pubKey = new EdDSAPublicKeySpec(testCase.pk, 
spec);
-            PublicKey vKey = new EdDSAPublicKey(pubKey);
-            PublicKey x509Key = X509Key.parse(new DerValue(vKey.getEncoded()));
-            sgr.initVerify(x509Key);
-
-            sgr.update(testCase.message);
-
-            assertThat("Test case " + testCase.caseNum + " failed",
-                    sgr.verify(testCase.sig), is(true));
-        }
-    }
 }
-- 
2.33.1

Reply via email to