From 657efa4d11e81ab7ac8e2b5c2435240faec3c8ed Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 5 Apr 2018 22:35:09 +0200 Subject: [PATCH 01/89] Rebased to JSS 4.4.3 https://bugzilla.redhat.com/show_bug.cgi?id=1548548 --- .gitignore | 1 + jss-HMAC-test-for-AES-encrypt-unwrap.patch | 196 ----- jss-HMAC-unwrap-keywrap-FIPSMODE.patch | 22 - jss-ObjectNotFoundException-message.patch | 680 ------------------ ...PBE-padded-block-cipher-enhancements.patch | 620 ---------------- jss-SignatureAlgorithm.patch | 34 - ...-getEncryptedPrivateKeyInfo-segfault.patch | 35 - jss-fix-SignerInfo-version.patch | 44 -- jss-signature-correction.patch | 306 -------- jss-standardize-ECC-algorithm-names.patch | 41 -- jss.spec | 394 +--------- sources | 2 +- 12 files changed, 21 insertions(+), 2354 deletions(-) delete mode 100644 jss-HMAC-test-for-AES-encrypt-unwrap.patch delete mode 100644 jss-HMAC-unwrap-keywrap-FIPSMODE.patch delete mode 100644 jss-ObjectNotFoundException-message.patch delete mode 100644 jss-PBE-padded-block-cipher-enhancements.patch delete mode 100644 jss-SignatureAlgorithm.patch delete mode 100644 jss-fix-PK11Store-getEncryptedPrivateKeyInfo-segfault.patch delete mode 100644 jss-fix-SignerInfo-version.patch delete mode 100644 jss-signature-correction.patch delete mode 100644 jss-standardize-ECC-algorithm-names.patch diff --git a/.gitignore b/.gitignore index dead9a9..54046f6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ jss-4.2.6.tar.gz /jss-4.4.0.tar.gz /jss-4.4.1.tar.gz /jss-4.4.2.tar.gz +/jss-4.4.3.tar.gz diff --git a/jss-HMAC-test-for-AES-encrypt-unwrap.patch b/jss-HMAC-test-for-AES-encrypt-unwrap.patch deleted file mode 100644 index 435dfd0..0000000 --- a/jss-HMAC-test-for-AES-encrypt-unwrap.patch +++ /dev/null @@ -1,196 +0,0 @@ -# HG changeset patch -# User Jack Magne -# Date 1504307754 25200 -# Fri Sep 01 16:15:54 2017 -0700 -# Node ID eec15518fd61f1d988c25b4de589555796f9e65f -# Parent 17d1d7b740ca5777fbcf8ee817a2f26b9c93593a -unwrapping of HMAC-SHA1 secret keys using AES wrapping and unwrapping -cfu on behalf of jmagne - -diff -r 17d1d7b740ca -r eec15518fd61 org/mozilla/jss/pkcs11/PK11KeyWrapper.java ---- a/org/mozilla/jss/pkcs11/PK11KeyWrapper.java Mon May 01 10:39:50 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11KeyWrapper.java Fri Sep 01 16:15:54 2017 -0700 -@@ -588,6 +588,8 @@ - return EncryptionAlgorithm.RC4; - } else if( type == SymmetricKey.AES ) { - return EncryptionAlgorithm.AES_128_ECB; -+ } else if( type == SymmetricKey.SHA1_HMAC) { -+ return HMACAlgorithm.SHA1; - } else { - Assert._assert( type == SymmetricKey.RC2 ); - return EncryptionAlgorithm.RC2_CBC; -diff -r 17d1d7b740ca -r eec15518fd61 org/mozilla/jss/pkcs11/PK11MessageDigest.c ---- a/org/mozilla/jss/pkcs11/PK11MessageDigest.c Mon May 01 10:39:50 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11MessageDigest.c Fri Sep 01 16:15:54 2017 -0700 -@@ -67,19 +67,19 @@ - } - - /* copy the key, setting the CKA_SIGN attribute */ -- /* -+ - newKey = PK11_CopySymKeyForSigning(origKey, mech); -+ -+ /* For some key on the hsm, this call could fail, but the key may work anyway */ -+ - if( newKey == NULL ) { -- JSS_throwMsg(env, DIGEST_EXCEPTION, -- "Unable to set CKA_SIGN attribute on symmetric key"); -- goto finish; -+ newKey = origKey; - } -- */ - - param.data = NULL; - param.len = 0; - -- context = PK11_CreateContextBySymKey(mech, CKA_SIGN, origKey, ¶m); -+ context = PK11_CreateContextBySymKey(mech, CKA_SIGN, newKey, ¶m); - if( context == NULL ) { - JSS_throwMsg(env, DIGEST_EXCEPTION, - "Unable to initialize digest context"); -@@ -88,7 +88,7 @@ - - contextObj = JSS_PK11_wrapCipherContextProxy(env, &context); - finish: -- if(newKey) { -+ if(newKey && (newKey != origKey)) { - /* SymKeys are ref counted, and the context will free it's ref - * when it is destroyed */ - PK11_FreeSymKey(newKey); -diff -r 17d1d7b740ca -r eec15518fd61 org/mozilla/jss/tests/HmacTest.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/org/mozilla/jss/tests/HmacTest.java Fri Sep 01 16:15:54 2017 -0700 -@@ -0,0 +1,119 @@ -+ -+package org.mozilla.jss.tests; -+ -+ -+import java.security.Key; -+import javax.crypto.Cipher; -+import javax.crypto.KeyGenerator; -+import javax.crypto.Mac; -+import javax.crypto.SecretKey; -+import javax.crypto.spec.IvParameterSpec; -+ -+import org.mozilla.jss.CryptoManager; -+import org.mozilla.jss.crypto.CryptoToken; -+import org.mozilla.jss.crypto.SymmetricKey; -+ -+ -+public class HmacTest { -+ -+ private static final String INTERNAL_KEY_STORAGE_TOKEN = -+ new CryptoManager.InitializationValues("").getInternalKeyStorageTokenDescription().trim(); -+ -+ private static final String NSS_DATABASE_DIR = "sql:data"; -+ private static final String PROVIDER = "Mozilla-JSS"; -+ -+ -+ public static void main(String[] args) -+ { -+ -+ String algorithm = "hmac-sha1"; -+ -+ try { -+ configureCrypto(args); -+ -+ Mac mac = Mac.getInstance(algorithm, PROVIDER); -+ -+ byte[] keyData = new byte[16]; -+ Key key = importHmacSha1Key(keyData); -+ -+ mac.init(key); -+ -+ doHMAC(mac,"Dogtag rules!"); -+ -+ System.out.println("Done"); -+ -+ System.exit(0); -+ } catch (Exception e) { -+ System.exit(1); -+ } -+ } -+ -+ private static void configureCrypto(String[] args) -+ throws Exception { -+ -+ CryptoManager.InitializationValues initializationValues = -+ new CryptoManager.InitializationValues(args[0]); -+ -+ CryptoManager.initialize(initializationValues); -+ -+ CryptoManager cryptoManager = CryptoManager.getInstance(); -+ -+ CryptoToken cryptoToken = -+ cryptoManager.getTokenByName(INTERNAL_KEY_STORAGE_TOKEN); -+ -+ cryptoManager.setThreadToken(cryptoToken); -+ } -+ -+ private static Key importHmacSha1Key(byte[] key) -+ throws Exception { -+ -+ final String WRAPPING_ALGORITHM = "AES/CBC/PKCS5Padding"; -+ -+ Key wrappingKey = getWrappingKey(); -+ -+ byte[] iv = new byte[16]; -+ IvParameterSpec ivParameterSpec = new IvParameterSpec(iv); -+ -+ Cipher wrappingCipher = Cipher.getInstance(WRAPPING_ALGORITHM, PROVIDER); -+ wrappingCipher.init(Cipher.ENCRYPT_MODE, wrappingKey, ivParameterSpec); -+ -+ byte[] wrappedKeyData = wrappingCipher.doFinal(key); -+ -+ Cipher unwrappingCipher = Cipher.getInstance(WRAPPING_ALGORITHM, PROVIDER); -+ unwrappingCipher.init(Cipher.UNWRAP_MODE, wrappingKey, ivParameterSpec); -+ -+ return (SecretKey) unwrappingCipher.unwrap(wrappedKeyData, -+ SymmetricKey.SHA1_HMAC.toString(), -+ Cipher.SECRET_KEY); -+ } -+ -+ private static synchronized Key getWrappingKey() -+ throws Exception { -+ -+ final String keyGenAlgorithm = "AES"; -+ final int wrappingKeyLength = 256; -+ -+ KeyGenerator keyGen = KeyGenerator.getInstance(keyGenAlgorithm, PROVIDER); -+ keyGen.init(wrappingKeyLength); -+ return keyGen.generateKey(); -+ } -+ -+ public static void doHMAC(Mac mozillaHmac, String clearText) -+ throws Exception { -+ byte[] mozillaHmacOut; -+ -+ //Get the Mozilla HMAC -+ mozillaHmacOut = mozillaHmac.doFinal(clearText.getBytes()); -+ -+ if (mozillaHmacOut.length == mozillaHmac.getMacLength()) { -+ System.out.println(PROVIDER + " supports " + -+ mozillaHmac.getAlgorithm() + " and the output size is " + mozillaHmac.getMacLength()); -+ } else { -+ throw new Exception("ERROR: hmac output size is " + -+ mozillaHmacOut.length + ", should be " + -+ mozillaHmac.getMacLength()); -+ } -+ } -+ -+ -+} -diff -r 17d1d7b740ca -r eec15518fd61 org/mozilla/jss/tests/all.pl ---- a/org/mozilla/jss/tests/all.pl Mon May 01 10:39:50 2017 -0700 -+++ b/org/mozilla/jss/tests/all.pl Fri Sep 01 16:15:54 2017 -0700 -@@ -492,6 +492,10 @@ - $command = "$java -cp $jss_classpath org.mozilla.jss.tests.HMACTest $testdir $pwfile"; - run_test($testname, $command); - -+$testname = "HMAC Unwrap"; -+$command = "$java -cp $jss_classpath org.mozilla.jss.tests.HmacTest $testdir $pwfile"; -+run_test($testname, $command); -+ - $testname = "KeyWrapping "; - $command = "$java -cp $jss_classpath org.mozilla.jss.tests.JCAKeyWrap $testdir $pwfile"; - run_test($testname, $command); diff --git a/jss-HMAC-unwrap-keywrap-FIPSMODE.patch b/jss-HMAC-unwrap-keywrap-FIPSMODE.patch deleted file mode 100644 index 529d33a..0000000 --- a/jss-HMAC-unwrap-keywrap-FIPSMODE.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Jack Magne -# Date 1506640850 25200 -# Thu Sep 28 16:20:50 2017 -0700 -# Node ID 252c10f448971b7ae087bde259505abd5dc5a03a -# Parent 3e9a5ae2149d04877dc19b117a8917c22854f8eb -Fix: Bug 1400884 - new JSS failures: HMAC Unwrap and KeyWrapping FIPSMODE. - -diff --git a/org/mozilla/jss/pkcs11/KeyType.java b/org/mozilla/jss/pkcs11/KeyType.java ---- a/org/mozilla/jss/pkcs11/KeyType.java -+++ b/org/mozilla/jss/pkcs11/KeyType.java -@@ -204,9 +204,7 @@ - EncryptionAlgorithm.AES_192_CBC, - EncryptionAlgorithm.AES_256_ECB, - EncryptionAlgorithm.AES_256_CBC, -- /* AES CBC PAD is the same as AES_256_CBC_PAD */ -- /* shouldn't break backward compatibility 313798*/ -- //EncryptionAlgorithm.AES_CBC_PAD, -+ EncryptionAlgorithm.AES_CBC_PAD, - EncryptionAlgorithm.AES_128_CBC_PAD, - EncryptionAlgorithm.AES_192_CBC_PAD, - EncryptionAlgorithm.AES_256_CBC_PAD diff --git a/jss-ObjectNotFoundException-message.patch b/jss-ObjectNotFoundException-message.patch deleted file mode 100644 index 0d61e26..0000000 --- a/jss-ObjectNotFoundException-message.patch +++ /dev/null @@ -1,680 +0,0 @@ -# HG changeset patch -# User "Endi S. Dewata" -# Date 1509154719 -7200 -# Sat Oct 28 03:38:39 2017 +0200 -# Node ID 19a0e2146a929173757e6ccbb61a035ec9426f43 -# Parent b1a3c3cc6b3584948d251d3bfcfe6630d8970db5 -Added certificate nickname into ObjectNotFoundException message. -The code that generates ObjectNotFoundException has been modified -to include the certificate nickname to help troubleshooting. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1408057 - -diff --git a/org/mozilla/jss/PK11Finder.c b/org/mozilla/jss/PK11Finder.c ---- a/org/mozilla/jss/PK11Finder.c -+++ b/org/mozilla/jss/PK11Finder.c -@@ -54,7 +54,9 @@ - cert = JSS_PK11_findCertAndSlotFromNickname(nick, NULL, &slot); - - if(cert == NULL) { -- JSS_nativeThrow(env, OBJECT_NOT_FOUND_EXCEPTION); -+ char *message = PR_smprintf("Certificate not found: %s", nick); -+ JSS_throwMsg(env, OBJECT_NOT_FOUND_EXCEPTION, message); -+ PR_smprintf_free(message); - goto finish; - } - -@@ -1577,7 +1579,9 @@ - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); - - if (cert == NULL) { -- JSS_throw(env, OBJECT_NOT_FOUND_EXCEPTION); -+ char *message = PR_smprintf("Certificate not found: %s", nickname); -+ JSS_throwMsg(env, OBJECT_NOT_FOUND_EXCEPTION, message); -+ PR_smprintf_free(message); - goto finish; - } else { - /* 0 for certificateUsage in call to CERT_VerifyCertificateNow will -@@ -1640,7 +1644,9 @@ - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); - - if (cert == NULL) { -- JSS_throw(env, OBJECT_NOT_FOUND_EXCEPTION); -+ char *message = PR_smprintf("Certificate not found: %s", nickname); -+ JSS_throwMsg(env, OBJECT_NOT_FOUND_EXCEPTION, message); -+ PR_smprintf_free(message); - goto finish; - } else { - /* 0 for certificateUsage in call to CERT_VerifyCertificateNow to -@@ -1801,7 +1807,9 @@ - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); - - if (cert == NULL) { -- JSS_throw(env, OBJECT_NOT_FOUND_EXCEPTION); -+ char *message = PR_smprintf("Certificate not found: %s", nickname); -+ JSS_throwMsg(env, OBJECT_NOT_FOUND_EXCEPTION, message); -+ PR_smprintf_free(message); - goto finish; - } else { - rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), cert, -# HG changeset patch -# User "Endi S. Dewata" -# Date 1509154819 -7200 -# Sat Oct 28 03:40:19 2017 +0200 -# Node ID 837c79476110ecd4bf6b507faad50edb9eed7e7e -# Parent 19a0e2146a929173757e6ccbb61a035ec9426f43 -Reformatted SocketBase.java. -The SocketBase.java has been auto-formatted using Eclipse to -simplify further changes on the file. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1408057 - -diff --git a/org/mozilla/jss/ssl/SocketBase.java b/org/mozilla/jss/ssl/SocketBase.java ---- a/org/mozilla/jss/ssl/SocketBase.java -+++ b/org/mozilla/jss/ssl/SocketBase.java -@@ -27,6 +27,7 @@ - int getTimeout() { - return timeout; - } -+ - void setTimeout(int timeout) { - this.timeout = timeout; - } -@@ -36,18 +37,17 @@ - } - - native byte[] socketCreate(Object socketObject, -- SSLCertificateApprovalCallback certApprovalCallback, -- SSLClientCertificateSelectionCallback clientCertSelectionCallback, -- java.net.Socket javaSock, String host,int family) -+ SSLCertificateApprovalCallback certApprovalCallback, -+ SSLClientCertificateSelectionCallback clientCertSelectionCallback, -+ java.net.Socket javaSock, String host, int family) - throws SocketException; - - byte[] socketCreate(Object socketObject, -- SSLCertificateApprovalCallback certApprovalCallback, -- SSLClientCertificateSelectionCallback clientCertSelectionCallback, int family) -- throws SocketException -- { -+ SSLCertificateApprovalCallback certApprovalCallback, -+ SSLClientCertificateSelectionCallback clientCertSelectionCallback, int family) -+ throws SocketException { - return socketCreate(socketObject, certApprovalCallback, -- clientCertSelectionCallback, null, null, family); -+ clientCertSelectionCallback, null, null, family); - } - - native void socketBind(byte[] addrBA, int port) throws SocketException; -@@ -57,7 +57,7 @@ - * safer than copying the values of the C constants, which are subject - * to change, into Java code. - * Note to developer these constants are not all related! i.e. you cannot -- * pass in PR_SHUTDOWN_RCV to setSSLOption etc! Check their usage -+ * pass in PR_SHUTDOWN_RCV to setSSLOption etc! Check their usage - * in NSS and NSPR before using. - */ - static final int SSL_ENABLE_SSL2 = 0; -@@ -73,7 +73,7 @@ - static final int SSL_POLICY_DOMESTIC = 10; - static final int SSL_POLICY_EXPORT = 11; - static final int SSL_POLICY_FRANCE = 12; -- static final int SSL_ROLLBACK_DETECTION = 13; -+ static final int SSL_ROLLBACK_DETECTION = 13; - static final int SSL_NO_STEP_DOWN = 14; - static final int SSL_ENABLE_FDX = 15; - static final int SSL_V2_COMPATIBLE_HELLO = 16; -@@ -98,7 +98,7 @@ - static final int SSL_Variant_Stream = 33; - static final int SSL_Variant_Datagram = 34; - -- static final int SSL_AF_INET = 50; -+ static final int SSL_AF_INET = 50; - static final int SSL_AF_INET6 = 51; - - void close() throws IOException { -@@ -106,7 +106,7 @@ - } - - // SSLServerSocket and SSLSocket close methods -- // have their own synchronization control that -+ // have their own synchronization control that - // protects SocketBase.socketClose. - native void socketClose() throws IOException; - -@@ -118,14 +118,13 @@ - } - - public void requestClientAuthNoExpiryCheck(boolean b) -- throws SocketException -- { -+ throws SocketException { - requestingClientAuth = b; - requestClientAuthNoExpiryCheckNative(b); - } - - private native void requestClientAuthNoExpiryCheckNative(boolean b) -- throws SocketException; -+ throws SocketException; - - void enableSSL2(boolean enable) throws SocketException { - setSSLOption(SSL_ENABLE_SSL2, enable); -@@ -144,8 +143,7 @@ - } - - void enableRenegotiation(int mode) -- throws SocketException -- { -+ throws SocketException { - setSSLOptionMode(SocketBase.SSL_ENABLE_RENEGOTIATION, mode); - } - -@@ -168,23 +166,21 @@ - void enableV2CompatibleHello(boolean enable) throws SocketException { - setSSLOption(SSL_V2_COMPATIBLE_HELLO, enable); - } -- -+ - void setSSLOption(int option, boolean on) -- throws SocketException -- { -+ throws SocketException { - setSSLOption(option, on ? 1 : 0); - } - -- /** -- * Sets SSL options for this socket that have simple -+ /** -+ * Sets SSL options for this socket that have simple - * enable/disable values. - */ - native void setSSLOption(int option, int on) -- throws SocketException; -+ throws SocketException; - - void setSSLVersionRange(org.mozilla.jss.ssl.SSLSocket.SSLVersionRange range) -- throws SocketException -- { -+ throws SocketException { - setSSLVersionRange(range.getMinEnum(), range.getMaxEnum()); - } - -@@ -192,93 +188,101 @@ - * Sets SSL Version Range for this socket to support TLS v1.1 and v1.2 - */ - native void setSSLVersionRange(int min, int max) -- throws SocketException; -+ throws SocketException; - -- /** -+ /** - * Sets the SSL option setting mode value use for options - * that have more values than just enable/disable. - */ - native void setSSLOptionMode(int option, int option2) -- throws SocketException; -+ throws SocketException; - -- - /* return 0 for option disabled 1 for option enabled. */ - native int getSSLOption(int option) -- throws SocketException; -- -+ throws SocketException; -+ - public String getSSLOptions() { - StringBuffer buf = new StringBuffer(); - try { - buf.append("SSL Options configured for this SSLSocket:"); -- buf.append("\nSSL_ENABLE_SSL2" + -- ((getSSLOption(SocketBase.SSL_ENABLE_SSL2) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_ENABLE_SSL3" + -- ((getSSLOption(SocketBase.SSL_ENABLE_SSL3) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_ENABLE_TLS" + -- ((getSSLOption(SocketBase.SSL_ENABLE_TLS) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_REQUIRE_CERTIFICATE"); -+ buf.append("\nSSL_ENABLE_SSL2" + -+ ((getSSLOption(SocketBase.SSL_ENABLE_SSL2) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_ENABLE_SSL3" + -+ ((getSSLOption(SocketBase.SSL_ENABLE_SSL3) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_ENABLE_TLS" + -+ ((getSSLOption(SocketBase.SSL_ENABLE_TLS) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_REQUIRE_CERTIFICATE"); - switch (getSSLOption(SocketBase.SSL_REQUIRE_CERTIFICATE)) { -- case 0: -- buf.append("=Never"); -- break; -- case 1: -- buf.append("=Always"); -- break; -- case 2: -- buf.append("=First Handshake"); -- break; -- case 3: -- buf.append("=No Error"); -- break; -- default: -- buf.append("=Report JSS Bug this option has a status."); -- break; -+ case 0: -+ buf.append("=Never"); -+ break; -+ case 1: -+ buf.append("=Always"); -+ break; -+ case 2: -+ buf.append("=First Handshake"); -+ break; -+ case 3: -+ buf.append("=No Error"); -+ break; -+ default: -+ buf.append("=Report JSS Bug this option has a status."); -+ break; - } //end switch -- buf.append("\nSSL_REQUEST_CERTIFICATE" + -- ((getSSLOption(SocketBase.SSL_REQUEST_CERTIFICATE) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_NO_CACHE" + -- ((getSSLOption(SocketBase.SSL_NO_CACHE) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_ROLLBACK_DETECTION" + -- ((getSSLOption(SocketBase.SSL_ROLLBACK_DETECTION) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_NO_STEP_DOWN" + -- ((getSSLOption(SocketBase.SSL_NO_STEP_DOWN) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_ENABLE_FDX" + -- ((getSSLOption(SocketBase.SSL_ENABLE_FDX) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_V2_COMPATIBLE_HELLO" + -- ((getSSLOption(SocketBase.SSL_V2_COMPATIBLE_HELLO) != 0) -- ? "=on" : "=off")); -- buf.append("\nSSL_ENABLE_SESSION_TICKETS" + -- ((getSSLOption(SocketBase.SSL_ENABLE_SESSION_TICKETS) -- != 0) ? "=on" : "=off")); -+ buf.append("\nSSL_REQUEST_CERTIFICATE" + -+ ((getSSLOption(SocketBase.SSL_REQUEST_CERTIFICATE) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_NO_CACHE" + -+ ((getSSLOption(SocketBase.SSL_NO_CACHE) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_ROLLBACK_DETECTION" + -+ ((getSSLOption(SocketBase.SSL_ROLLBACK_DETECTION) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_NO_STEP_DOWN" + -+ ((getSSLOption(SocketBase.SSL_NO_STEP_DOWN) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_ENABLE_FDX" + -+ ((getSSLOption(SocketBase.SSL_ENABLE_FDX) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_V2_COMPATIBLE_HELLO" + -+ ((getSSLOption(SocketBase.SSL_V2_COMPATIBLE_HELLO) != 0) -+ ? "=on" -+ : "=off")); -+ buf.append("\nSSL_ENABLE_SESSION_TICKETS" + -+ ((getSSLOption(SocketBase.SSL_ENABLE_SESSION_TICKETS) != 0) ? "=on" : "=off")); - buf.append("\nSSL_ENABLE_RENEGOTIATION"); - switch (getSSLOption(SocketBase.SSL_ENABLE_RENEGOTIATION)) { -- case 0: -- buf.append("=SSL_RENEGOTIATE_NEVER"); -- break; -- case 1: -- buf.append("=SSL_RENEGOTIATE_UNRESTRICTED"); -- break; -- case 2: -- buf.append("=SSL_RENEGOTIATE_REQUIRES_XTN"); -- break; -- case 3: -- buf.append("=SSL_RENEGOTIATE_TRANSITIONAL"); -- break; -- default: -- buf.append("=Report JSS Bug this option has a status."); -- break; -+ case 0: -+ buf.append("=SSL_RENEGOTIATE_NEVER"); -+ break; -+ case 1: -+ buf.append("=SSL_RENEGOTIATE_UNRESTRICTED"); -+ break; -+ case 2: -+ buf.append("=SSL_RENEGOTIATE_REQUIRES_XTN"); -+ break; -+ case 3: -+ buf.append("=SSL_RENEGOTIATE_TRANSITIONAL"); -+ break; -+ default: -+ buf.append("=Report JSS Bug this option has a status."); -+ break; - } //end switch -- buf.append("\nSSL_REQUIRE_SAFE_NEGOTIATION" + -- ((getSSLOption(SocketBase.SSL_REQUIRE_SAFE_NEGOTIATION) != 0) -- ? "=on" : "=off")); -+ buf.append("\nSSL_REQUIRE_SAFE_NEGOTIATION" + -+ ((getSSLOption(SocketBase.SSL_REQUIRE_SAFE_NEGOTIATION) != 0) -+ ? "=on" -+ : "=off")); - - } catch (SocketException e) { - buf.append("\ngetSSLOptions exception " + e.getMessage()); -@@ -292,19 +296,18 @@ - * of construction than getByName(), and it is final. - * - * @return The InetAddress corresponding to the given integer, -- * or null if the InetAddress could not be constructed. -+ * or null if the InetAddress could not be constructed. - */ -- private static InetAddress -- convertIntToInetAddress(int intAddr) { -+ private static InetAddress convertIntToInetAddress(int intAddr) { - InetAddress in; - int[] addr = new int[4]; - addr[0] = ((intAddr >>> 24) & 0xff); - addr[1] = ((intAddr >>> 16) & 0xff); -- addr[2] = ((intAddr >>> 8) & 0xff); -- addr[3] = ((intAddr ) & 0xff); -+ addr[2] = ((intAddr >>> 8) & 0xff); -+ addr[3] = ((intAddr) & 0xff); - try { - in = InetAddress.getByName( -- addr[0] + "." + addr[1] + "." + addr[2] + "." + addr[3] ); -+ addr[0] + "." + addr[1] + "." + addr[2] + "." + addr[3]); - } catch (java.net.UnknownHostException e) { - in = null; - } -@@ -312,12 +315,13 @@ - } - - private native byte[] getLocalAddressByteArrayNative() throws SocketException; -+ - private native byte[] getPeerAddressByteArrayNative() throws SocketException; -+ - /** - * @return the InetAddress of the peer end of the socket. - */ -- InetAddress getInetAddress() -- { -+ InetAddress getInetAddress() { - try { - byte[] address = getPeerAddressByteArrayNative(); - -@@ -326,14 +330,15 @@ - try { - - iAddr = InetAddress.getByAddress(address); -- } catch(UnknownHostException e) { -+ } catch (UnknownHostException e) { - } - - return iAddr; -- } catch(SocketException e) { -+ } catch (SocketException e) { - return null; - } - } -+ - private native int getPeerAddressNative() throws SocketException; - - /** -@@ -348,20 +353,21 @@ - try { - - lAddr = InetAddress.getByAddress(address); -- } catch(UnknownHostException e) { -+ } catch (UnknownHostException e) { - } - - return lAddr; -- } catch(SocketException e) { -+ } catch (SocketException e) { - return null; - } - } -+ - private native int getLocalAddressNative() throws SocketException; - - public int getLocalPort() { - try { - return getLocalPortNative(); -- } catch(SocketException e) { -+ } catch (SocketException e) { - return 0; - } - } -@@ -369,18 +375,16 @@ - private native int getLocalPortNative() throws SocketException; - - void requireClientAuth(boolean require, boolean onRedo) -- throws SocketException -- { -- if( require && !requestingClientAuth ) { -+ throws SocketException { -+ if (require && !requestingClientAuth) { - requestClientAuth(true); - } - setSSLOption(SSL_REQUIRE_CERTIFICATE, require ? (onRedo ? 1 : 2) : 0); - } - - void requireClientAuth(int mode) -- throws SocketException -- { -- if(mode > 0 && !requestingClientAuth ) { -+ throws SocketException { -+ if (mode > 0 && !requestingClientAuth) { - requestClientAuth(true); - } - setSSLOptionMode(SocketBase.SSL_REQUIRE_CERTIFICATE, mode); -@@ -390,52 +394,52 @@ - * Sets the nickname of the certificate to use for client authentication. - */ - public void setClientCertNickname(String nick) throws SocketException { -- try { -- setClientCert( CryptoManager.getInstance().findCertByNickname(nick) ); -- } catch(CryptoManager.NotInitializedException nie) { -- throw new SocketException("CryptoManager not initialized"); -- } catch(ObjectNotFoundException onfe) { -- throw new SocketException("Object not found: " + onfe); -- } catch(TokenException te) { -- throw new SocketException("Token Exception: " + te); -- } -+ try { -+ setClientCert(CryptoManager.getInstance().findCertByNickname(nick)); -+ } catch (CryptoManager.NotInitializedException nie) { -+ throw new SocketException("CryptoManager not initialized"); -+ } catch (ObjectNotFoundException onfe) { -+ throw new SocketException("Object not found: " + onfe); -+ } catch (TokenException te) { -+ throw new SocketException("Token Exception: " + te); -+ } - } - - native void setClientCert(org.mozilla.jss.crypto.X509Certificate cert) -- throws SocketException; -+ throws SocketException; - - void useCache(boolean b) throws SocketException { - setSSLOption(SSL_NO_CACHE, !b); - } - - static Throwable processExceptions(Throwable topException, -- Throwable bottomException) -- { -- try { -- StringBuffer strBuf; -- strBuf = new StringBuffer( topException.toString() ); -+ Throwable bottomException) { -+ try { -+ StringBuffer strBuf; -+ strBuf = new StringBuffer(topException.toString()); - -- if( bottomException != null ) { -- strBuf.append(" --> "); -- strBuf.append( bottomException.toString() ); -+ if (bottomException != null) { -+ strBuf.append(" --> "); -+ strBuf.append(bottomException.toString()); -+ } -+ -+ Class excepClass = topException.getClass(); -+ Class stringClass = java.lang.String.class; -+ Constructor cons = excepClass.getConstructor(new Class[] { stringClass }); -+ -+ return (Throwable) cons.newInstance(new Object[] { strBuf.toString() }); -+ } catch (Exception e) { -+ Assert.notReached("Problem constructing exception container"); -+ return topException; - } -- -- Class excepClass = topException.getClass(); -- Class stringClass = java.lang.String.class; -- Constructor cons = excepClass.getConstructor(new Class[] {stringClass}); -- -- return (Throwable) cons.newInstance(new Object[] { strBuf.toString() }); -- } catch(Exception e ) { -- Assert.notReached("Problem constructing exception container"); -- return topException; -- } - } - - static private int supportsIPV6 = -1; -+ - static boolean supportsIPV6() { - -- if(supportsIPV6 >= 0) { -- if(supportsIPV6 > 0) { -+ if (supportsIPV6 >= 0) { -+ if (supportsIPV6 > 0) { - return true; - } else { - return false; -@@ -444,28 +448,25 @@ - - Enumeration netInter; - try { -- netInter = NetworkInterface.getNetworkInterfaces(); -- } catch (SocketException e) { -+ netInter = NetworkInterface.getNetworkInterfaces(); -+ } catch (SocketException e) { - -- return false; -+ return false; - } -- while ( netInter.hasMoreElements() ) -- { -- NetworkInterface ni = (NetworkInterface)netInter.nextElement(); -+ while (netInter.hasMoreElements()) { -+ NetworkInterface ni = (NetworkInterface) netInter.nextElement(); - Enumeration addrs = ni.getInetAddresses(); -- while ( addrs.hasMoreElements() ) -- { -- Object o = addrs.nextElement(); -- if ( o.getClass() == InetAddress.class || -- o.getClass() == Inet4Address.class || -- o.getClass() == Inet6Address.class ) -- { -- InetAddress iaddr = (InetAddress) o; -- if(o.getClass() == Inet6Address.class) { -- supportsIPV6 = 1; -- return true; -- } -- } -+ while (addrs.hasMoreElements()) { -+ Object o = addrs.nextElement(); -+ if (o.getClass() == InetAddress.class || -+ o.getClass() == Inet4Address.class || -+ o.getClass() == Inet6Address.class) { -+ InetAddress iaddr = (InetAddress) o; -+ if (o.getClass() == Inet6Address.class) { -+ supportsIPV6 = 1; -+ return true; -+ } -+ } - } - } - supportsIPV6 = 0; -# HG changeset patch -# User "Endi S. Dewata" -# Date 1509154824 -7200 -# Sat Oct 28 03:40:24 2017 +0200 -# Node ID ca2c2fcfaf207f87c3c69e493f2b30fd0a088e95 -# Parent 837c79476110ecd4bf6b507faad50edb9eed7e7e -Fixed SocketBase.setClientCertNickname() exception handling. -Previously the SocketBase.setClientCertNickname() would catch -the original exception and throw a SocketException instead. -The original stack trace was lost since SocketException does not -support chaining. - -The code has been modified to throw a RuntimeException instead -and chain the original exception. This way the original stack -trace can be preserved to help troubleshooting. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1408057 - -diff --git a/org/mozilla/jss/ssl/SocketBase.java b/org/mozilla/jss/ssl/SocketBase.java ---- a/org/mozilla/jss/ssl/SocketBase.java -+++ b/org/mozilla/jss/ssl/SocketBase.java -@@ -4,17 +4,21 @@ - - package org.mozilla.jss.ssl; - --import java.net.*; -+import java.io.IOException; -+import java.lang.reflect.Constructor; -+import java.net.Inet4Address; -+import java.net.Inet6Address; -+import java.net.InetAddress; -+import java.net.NetworkInterface; - import java.net.SocketException; --import java.io.*; --import java.io.IOException; --import java.util.Vector; -+import java.net.UnknownHostException; - import java.util.Enumeration; --import java.lang.reflect.Constructor; --import org.mozilla.jss.util.Assert; -+ - import org.mozilla.jss.CryptoManager; - import org.mozilla.jss.crypto.ObjectNotFoundException; - import org.mozilla.jss.crypto.TokenException; -+import org.mozilla.jss.crypto.X509Certificate; -+import org.mozilla.jss.util.Assert; - - class SocketBase { - -@@ -395,13 +399,18 @@ - */ - public void setClientCertNickname(String nick) throws SocketException { - try { -- setClientCert(CryptoManager.getInstance().findCertByNickname(nick)); -+ CryptoManager cm = CryptoManager.getInstance(); -+ X509Certificate cert = cm.findCertByNickname(nick); -+ setClientCert(cert); -+ - } catch (CryptoManager.NotInitializedException nie) { -- throw new SocketException("CryptoManager not initialized"); -+ throw new RuntimeException(nie); -+ - } catch (ObjectNotFoundException onfe) { -- throw new SocketException("Object not found: " + onfe); -+ throw new RuntimeException(onfe); -+ - } catch (TokenException te) { -- throw new SocketException("Token Exception: " + te); -+ throw new RuntimeException(te); - } - } - diff --git a/jss-PBE-padded-block-cipher-enhancements.patch b/jss-PBE-padded-block-cipher-enhancements.patch deleted file mode 100644 index 8f43ec5..0000000 --- a/jss-PBE-padded-block-cipher-enhancements.patch +++ /dev/null @@ -1,620 +0,0 @@ -# HG changeset patch -# User Fraser Tweedale -# Date 1504894163 25200 -# Fri Sep 08 11:09:23 2017 -0700 -# Node ID 3629b598a9ce73e83c7896407e3ca820f6383750 -# Parent eec15518fd61f1d988c25b4de589555796f9e65f -Bug 1370778 PBE and padded block cipher enhancements and fixes - - patch jss-ftweedal-0006-PBEKeyGenParams-allow-specifying-encryption-algorith.patch - -Allow specifying an target encryption algorithm in PBEKeyGenParams; - if the PBE algorithm does not imply a particular cipher, this is needed - to determine the size of the key to generate - -cfu for ftweedale - -diff -r eec15518fd61 -r 3629b598a9ce org/mozilla/jss/crypto/PBEKeyGenParams.java ---- a/org/mozilla/jss/crypto/PBEKeyGenParams.java Fri Sep 01 16:15:54 2017 -0700 -+++ b/org/mozilla/jss/crypto/PBEKeyGenParams.java Fri Sep 08 11:09:23 2017 -0700 -@@ -13,6 +13,7 @@ - private Password pass; - private byte[] salt; - private int iterations; -+ private EncryptionAlgorithm encryptionAlgorithm = EncryptionAlgorithm.DES3_CBC; - - private PBEKeyGenParams() { } - -@@ -40,7 +41,8 @@ - } - - /** -- * Creates PBE parameters. -+ * Creates PBE parameters using default encryption algorithm -+ * (DES3_EDE3_CBC). - * - * @param pass The password. It will be cloned, so the - * caller is still responsible for clearing it. It must not be null. -@@ -60,6 +62,33 @@ - } - - /** -+ * Creates PBE parameters using default encryption algorithm -+ * (DES3_EDE3_CBC). -+ * -+ * @param pass The password. It will be cloned, so the -+ * caller is still responsible for clearing it. It must not be null. -+ * @param salt The salt for the PBE algorithm. Will not be cloned. -+ * Must not be null. It is the responsibility of the caller to -+ * use the right salt length for the algorithm. Most algorithms -+ * use 8 bytes of salt. -+ * @param iterations The iteration count for the PBE algorithm. -+ * @param encAlg The encryption algorithm. This is used with SOME -+ * PBE algorithms for determining the KDF output length. -+ */ -+ public PBEKeyGenParams( -+ char[] pass, byte[] salt, int iterations, -+ EncryptionAlgorithm encAlg) { -+ if (pass == null || salt == null) { -+ throw new NullPointerException(); -+ } -+ this.pass = new Password((char[]) pass.clone()); -+ this.salt = salt; -+ this.iterations = iterations; -+ if (encAlg != null) -+ this.encryptionAlgorithm = encAlg; -+ } -+ -+ /** - * Returns a reference to the password, not a copy. - */ - public Password getPassword() { -@@ -81,6 +110,14 @@ - } - - /** -+ * The encryption algorithm is used with SOME PBE algorithms for -+ * determining the KDF output length. -+ */ -+ public EncryptionAlgorithm getEncryptionAlgorithm() { -+ return encryptionAlgorithm; -+ } -+ -+ /** - * Clears the password. This should be called when this object is no - * longer needed so the password is not left around in memory. - */ -diff -r eec15518fd61 -r 3629b598a9ce org/mozilla/jss/pkcs11/PK11KeyGenerator.c ---- a/org/mozilla/jss/pkcs11/PK11KeyGenerator.c Fri Sep 01 16:15:54 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11KeyGenerator.c Fri Sep 08 11:09:23 2017 -0700 -@@ -246,9 +246,9 @@ - * - */ - JNIEXPORT jobject JNICALL --Java_org_mozilla_jss_pkcs11_PK11KeyGenerator_generatePBE -- (JNIEnv *env, jclass clazz, jobject token, jobject alg, jbyteArray passBA, -- jbyteArray saltBA, jint iterationCount) -+Java_org_mozilla_jss_pkcs11_PK11KeyGenerator_generatePBE( -+ JNIEnv *env, jclass clazz, jobject token, jobject alg, jobject encAlg, -+ jbyteArray passBA, jbyteArray saltBA, jint iterationCount) - { - PK11SlotInfo *slot=NULL; - PK11SymKey *skey=NULL; -@@ -299,12 +299,15 @@ - oidTag = JSS_getOidTagFromAlg(env, alg); - PR_ASSERT(oidTag != SEC_OID_UNKNOWN); - -+ SECOidTag encAlgOidTag = JSS_getOidTagFromAlg(env, encAlg); -+ PR_ASSERT(encAlgOidTag != SEC_OID_UNKNOWN); -+ - /* create algid */ - algid = PK11_CreatePBEV2AlgorithmID( - oidTag, -- SEC_OID_DES_EDE3_CBC, -+ encAlgOidTag, - SEC_OID_HMAC_SHA1, -- 168/8, -+ 0, - iterationCount, - salt); - -diff -r eec15518fd61 -r 3629b598a9ce org/mozilla/jss/pkcs11/PK11KeyGenerator.java ---- a/org/mozilla/jss/pkcs11/PK11KeyGenerator.java Fri Sep 01 16:15:54 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11KeyGenerator.java Fri Sep 08 11:09:23 2017 -0700 -@@ -178,8 +178,9 @@ - byte[] pwbytes=null; - try { - pwbytes = charToByte.convert( kgp.getPassword().getChars() ); -- return generatePBE(token, algorithm, pwbytes, -- kgp.getSalt(), kgp.getIterations()); -+ return generatePBE( -+ token, algorithm, kgp.getEncryptionAlgorithm(), -+ pwbytes, kgp.getSalt(), kgp.getIterations()); - } finally { - if( pwbytes!=null ) { - Password.wipeBytes(pwbytes); -@@ -296,7 +297,9 @@ - * be null. - */ - private static native SymmetricKey -- generatePBE(PK11Token token, KeyGenAlgorithm algorithm, byte[] pass, -- byte[] salt, int iterationCount) throws TokenException; -+ generatePBE( -+ PK11Token token, KeyGenAlgorithm algorithm, EncryptionAlgorithm encAlg, -+ byte[] pass, byte[] salt, int iterationCount) -+ throws TokenException; - - } -# HG changeset patch -# User Fraser Tweedale -# Date 1504894529 25200 -# Fri Sep 08 11:15:29 2017 -0700 -# Node ID bada1409d2bb67cd92c3b7c292b8bb4ae6388513 -# Parent 3629b598a9ce73e83c7896407e3ca820f6383750 -Bug 1370778 PBE and padded block cipher enhancements and fixes - -patch jss-ftweedal-0007-Support-the-CKK_GENERIC_SECRET-symmetric-key-type.patch -Subject: Support the CKK_GENERIC_SECRET symmetric key type -From: Fraser Tweedale -Content-Type: text/plain -found patch at byte 873 -message: -Support the CKK_GENERIC_SECRET symmetric key type -The NSS PBKDF2 generation produces a key with the CKK_GENERIC_SECRET -key type. The underlying PKCS #11 object *does* record the intended -encryption algorithm that was specified when generating the key via -PK11_PBEKeyGen, but this information is not exposed via the PKCS #11 -interface. When initialising a cipher, JSS checks the key type -against the encryption algorithm and fails if they do not match, -which is always the case with PBKDF2-derived keys. - -To work around this problem, properly record the key type for -CKK_GENERIC_SECRET keys, and update the cipher initialisation key -type check to always accept such keys. - -cfu for ftweedal - -diff -r 3629b598a9ce -r bada1409d2bb org/mozilla/jss/pkcs11/KeyType.java ---- a/org/mozilla/jss/pkcs11/KeyType.java Fri Sep 08 11:09:23 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/KeyType.java Fri Sep 08 11:15:29 2017 -0700 -@@ -242,4 +242,7 @@ - "SHA1_HMAC" - ); - -+ static public final KeyType GENERIC_SECRET = -+ new KeyType(new Algorithm[] { }, "GENERIC_SECRET"); -+ - } -diff -r 3629b598a9ce -r bada1409d2bb org/mozilla/jss/pkcs11/PK11Cipher.java ---- a/org/mozilla/jss/pkcs11/PK11Cipher.java Fri Sep 08 11:09:23 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11Cipher.java Fri Sep 08 11:15:29 2017 -0700 -@@ -243,8 +243,11 @@ - } - - try { -- if( ((PK11SymKey)key).getKeyType() != -- KeyType.getKeyTypeFromAlgorithm(algorithm) ) { -+ KeyType keyType = ((PK11SymKey) key).getKeyType(); -+ if ( -+ keyType != KeyType.GENERIC_SECRET -+ && keyType != KeyType.getKeyTypeFromAlgorithm(algorithm) -+ ) { - throw new InvalidKeyException("Key is not the right type for"+ - " this algorithm: " + ((PK11SymKey)key).getKeyType() + ":" + KeyType.getKeyTypeFromAlgorithm(algorithm) +";"); - } -diff -r 3629b598a9ce -r bada1409d2bb org/mozilla/jss/pkcs11/PK11SymKey.c ---- a/org/mozilla/jss/pkcs11/PK11SymKey.c Fri Sep 08 11:09:23 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11SymKey.c Fri Sep 08 11:15:29 2017 -0700 -@@ -305,6 +305,9 @@ - case CKK_DES2: - typeFieldName = DES3_KEYTYPE_FIELD; - break; -+ case CKK_GENERIC_SECRET: -+ typeFieldName = GENERIC_SECRET_KEYTYPE_FIELD; -+ break; - default: - PR_ASSERT(PR_FALSE); - typeFieldName = DES_KEYTYPE_FIELD; -diff -r 3629b598a9ce -r bada1409d2bb org/mozilla/jss/util/java_ids.h ---- a/org/mozilla/jss/util/java_ids.h Fri Sep 08 11:09:23 2017 -0700 -+++ b/org/mozilla/jss/util/java_ids.h Fri Sep 08 11:15:29 2017 -0700 -@@ -87,6 +87,7 @@ - #define RC2_KEYTYPE_FIELD "RC2" - #define SHA1_HMAC_KEYTYPE_FIELD "SHA1_HMAC" - #define AES_KEYTYPE_FIELD "AES" -+#define GENERIC_SECRET_KEYTYPE_FIELD "GENERIC_SECRET" - - /* - * NativeProxy -# HG changeset patch -# User Fraser Tweedale -# Date 1504894882 25200 -# Fri Sep 08 11:21:22 2017 -0700 -# Node ID 890216599f21df4c6d07815604aaac526823a892 -# Parent bada1409d2bb67cd92c3b7c292b8bb4ae6388513 -Bug 1370778 PBE and padded block cipher enhancements and fixes - -patch jss-ftweedal-0008-PK11Cipher-improve-error-reporting.patch -Subject: PK11Cipher: improve error reporting -From: Fraser Tweedale -message: -PK11Cipher: improve error reporting - -cfu for ftweedal - -diff -r bada1409d2bb -r 890216599f21 org/mozilla/jss/pkcs11/PK11Cipher.c ---- a/org/mozilla/jss/pkcs11/PK11Cipher.c Fri Sep 08 11:15:29 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11Cipher.c Fri Sep 08 11:21:22 2017 -0700 -@@ -152,7 +152,9 @@ - /* do the operation */ - if( PK11_CipherOp(context, outbuf, (int*)&outlen, outlen, - (unsigned char*)inbuf, inlen) != SECSuccess) { -- JSS_throwMsg(env, TOKEN_EXCEPTION, "Cipher Operation failed"); -+ JSS_throwMsgPrErrArg( -+ env, TOKEN_EXCEPTION, "Cipher context update failed", -+ PR_GetError()); - goto finish; - } - PR_ASSERT(outlen >= 0); -@@ -209,7 +211,9 @@ - /* perform the finalization */ - status = PK11_DigestFinal(context, outBuf, &newOutLen, outLen); - if( (status != SECSuccess) ) { -- JSS_throwMsg(env, TOKEN_EXCEPTION, "Cipher operation failed on token"); -+ JSS_throwMsgPrErrArg( -+ env, TOKEN_EXCEPTION, "Cipher context finalization failed", -+ PR_GetError()); - goto finish; - } - -# HG changeset patch -# User Fraser Tweedale -# Date 1504895552 25200 -# Fri Sep 08 11:32:32 2017 -0700 -# Node ID d39e9b373798ea9d6ae7f35089b07143845b210e -# Parent 890216599f21df4c6d07815604aaac526823a892 -Bug 1370778 PBE and padded block cipher enhancements and fixes - -patch jss-ftweedal-0009-Update-AES-CBC-PAD-cipher-definitions.patch -Subject: Update AES-CBC-PAD cipher definitions -From: Fraser Tweedale -message: -Update AES-CBC-PAD cipher definitions -The AES_{128,192,256}_CBC_PAD EncryptionAlgorithm definitions declare -the correct PKCS #11 cipher mechanism and padding, but do not declare -the relevant OIDs. They are also unusable as target algorithms in -PBE key generation because they declare a PK11_MECH instead of a -SEC_OID_TAG. - -Update these algorithms definitions to declare a SEC_OID_TAG instead -of a PK11_MECH (JSS_getOidTagFromAlg() will still return the correct -mechanism) and declare the associated OIDs. - -cfu for ftweedal - -diff -r 890216599f21 -r d39e9b373798 org/mozilla/jss/crypto/EncryptionAlgorithm.java ---- a/org/mozilla/jss/crypto/EncryptionAlgorithm.java Fri Sep 08 11:21:22 2017 -0700 -+++ b/org/mozilla/jss/crypto/EncryptionAlgorithm.java Fri Sep 08 11:32:32 2017 -0700 -@@ -359,8 +359,10 @@ - AES_ROOT_OID.subBranch(2), 128); - - public static final EncryptionAlgorithm -- AES_128_CBC_PAD = new EncryptionAlgorithm(CKM_AES_CBC_PAD, Alg.AES, Mode.CBC, -- Padding.PKCS5, IVParameterSpecClasses, 16, null, 128); // no oid -+ AES_128_CBC_PAD = new EncryptionAlgorithm(SEC_OID_AES_128_CBC, -+ Alg.AES, Mode.CBC, -+ Padding.PKCS5, IVParameterSpecClasses, 16, -+ AES_ROOT_OID.subBranch(2), 128); - - public static final EncryptionAlgorithm - AES_192_ECB = new EncryptionAlgorithm(SEC_OID_AES_192_ECB, -@@ -374,8 +376,10 @@ - AES_ROOT_OID.subBranch(22), 192); - - public static final EncryptionAlgorithm -- AES_192_CBC_PAD = new EncryptionAlgorithm(CKM_AES_CBC_PAD, Alg.AES, Mode.CBC, -- Padding.PKCS5, IVParameterSpecClasses, 16, null, 192); // no oid -+ AES_192_CBC_PAD = new EncryptionAlgorithm(SEC_OID_AES_192_CBC, -+ Alg.AES, Mode.CBC, -+ Padding.PKCS5, IVParameterSpecClasses, 16, -+ AES_ROOT_OID.subBranch(22), 192); - - public static final EncryptionAlgorithm - AES_256_ECB = new EncryptionAlgorithm(SEC_OID_AES_256_ECB, -@@ -393,6 +397,9 @@ - Padding.PKCS5, IVParameterSpecClasses, 16, null, 256); // no oid - - public static final EncryptionAlgorithm -- AES_256_CBC_PAD = AES_CBC_PAD; -+ AES_256_CBC_PAD = new EncryptionAlgorithm(SEC_OID_AES_256_CBC, -+ Alg.AES, Mode.CBC, -+ Padding.PKCS5, IVParameterSpecClasses, 16, -+ AES_ROOT_OID.subBranch(42), 256); - - } -# HG changeset patch -# User Fraser Tweedale -# Date 1504896621 25200 -# Fri Sep 08 11:50:21 2017 -0700 -# Node ID 0b8a6e84b6c736743f2184b2b858fda6be740544 -# Parent d39e9b373798ea9d6ae7f35089b07143845b210e -Bug 1370778 PBE and padded block cipher enhancements and fixes - -patch jss-ftweedal-0010-PK11Cipher-use-pad-mechanism-for-algorithms-that-use.patch -Subject: PK11Cipher: use pad mechanism for algorithms that use padding -From: Fraser Tweedale -message: -PK11Cipher: use pad mechanism for algorithms that use padding -The PK11Cipher implementation, when initialising a cipher context, -uses JSS_getPK11MechFromAlg() to retrieve the PKCS #11 mechanism to -use. When a JSS EncryptionAlgorithm uses a SEC_OID_TAG, this will -return the non-padded mechanism. Then, if the size of the data is -not a multiple of the cipher block size, a padding error occurs. - -When the EncryptionAlgorithm indicates that padding is to be used, -call PK11_GetPadMechanism() on the result of JSS_getPK11MechFromAlg() -to get the padding variant of the mechanism. - -cfu for ftweedal - -diff -r d39e9b373798 -r 0b8a6e84b6c7 org/mozilla/jss/pkcs11/PK11Cipher.c ---- a/org/mozilla/jss/pkcs11/PK11Cipher.c Fri Sep 08 11:32:32 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11Cipher.c Fri Sep 08 11:50:21 2017 -0700 -@@ -24,16 +24,16 @@ - JNIEXPORT jobject JNICALL - Java_org_mozilla_jss_pkcs11_PK11Cipher_initContext - (JNIEnv *env, jclass clazz, jboolean encrypt, jobject keyObj, -- jobject algObj, jbyteArray ivBA) -+ jobject algObj, jbyteArray ivBA, jboolean padded) - { - return Java_org_mozilla_jss_pkcs11_PK11Cipher_initContextWithKeyBits -- ( env, clazz, encrypt, keyObj, algObj, ivBA, 0); -+ ( env, clazz, encrypt, keyObj, algObj, ivBA, 0, padded); - } - - JNIEXPORT jobject JNICALL - Java_org_mozilla_jss_pkcs11_PK11Cipher_initContextWithKeyBits - (JNIEnv *env, jclass clazz, jboolean encrypt, jobject keyObj, -- jobject algObj, jbyteArray ivBA, jint keyBits) -+ jobject algObj, jbyteArray ivBA, jint keyBits, jboolean padded) - { - CK_MECHANISM_TYPE mech; - PK11SymKey *key=NULL; -@@ -53,6 +53,9 @@ - goto finish; - } - -+ if (padded) -+ mech = PK11_GetPadMechanism(mech); -+ - /* get operation type */ - if( encrypt ) { - op = CKA_ENCRYPT; -diff -r d39e9b373798 -r 0b8a6e84b6c7 org/mozilla/jss/pkcs11/PK11Cipher.java ---- a/org/mozilla/jss/pkcs11/PK11Cipher.java Fri Sep 08 11:32:32 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11Cipher.java Fri Sep 08 11:50:21 2017 -0700 -@@ -90,10 +90,13 @@ - state = ENCRYPT; - - if( parameters instanceof RC2ParameterSpec ) { -- contextProxy = initContextWithKeyBits( true, key, algorithm, IV, -- ((RC2ParameterSpec)parameters).getEffectiveKeyBits() ); -+ contextProxy = initContextWithKeyBits( -+ true, key, algorithm, IV, -+ ((RC2ParameterSpec)parameters).getEffectiveKeyBits(), -+ algorithm.isPadded()); - } else { -- contextProxy = initContext( true, key, algorithm, IV ); -+ contextProxy = initContext( -+ true, key, algorithm, IV, algorithm.isPadded()); - } - } - -@@ -112,10 +115,13 @@ - state = DECRYPT; - - if( parameters instanceof RC2ParameterSpec ) { -- contextProxy = initContextWithKeyBits(false, key, algorithm, IV, -- ((RC2ParameterSpec)parameters).getEffectiveKeyBits() ); -+ contextProxy = initContextWithKeyBits( -+ false, key, algorithm, IV, -+ ((RC2ParameterSpec)parameters).getEffectiveKeyBits(), -+ algorithm.isPadded()); - } else { -- contextProxy = initContext(false, key, algorithm, IV); -+ contextProxy = initContext( -+ false, key, algorithm, IV, algorithm.isPadded()); - } - } - -@@ -182,13 +188,13 @@ - - private static native CipherContextProxy - initContext(boolean encrypt, SymmetricKey key, EncryptionAlgorithm alg, -- byte[] IV) -+ byte[] IV, boolean padded) - throws TokenException; - - // This version accepts the number of effective key bits for RC2 CBC. - private static native CipherContextProxy - initContextWithKeyBits(boolean encrypt, SymmetricKey key, -- EncryptionAlgorithm alg, byte[] IV, int keyBits) -+ EncryptionAlgorithm alg, byte[] IV, int keyBits, boolean padded) - throws TokenException; - - private static native byte[] -# HG changeset patch -# User Fraser Tweedale -# Date 1504896816 25200 -# Fri Sep 08 11:53:36 2017 -0700 -# Node ID b3b653faef8475ae03c670766429fd4dfab37a5e -# Parent 0b8a6e84b6c736743f2184b2b858fda6be740544 -bug 1370778 PBE and padded block cipher enhancements and fixes - -patch jss-ftweedal-0012-2-Add-method-EncryptedPrivateKeyInfo.createPBES2.patch -Subject: Add method EncryptedPrivateKeyInfo.createPBES2 -From: Fraser Tweedale -Content-Type: text/plain -found patch at byte 404 -message: -Add method EncryptedPrivateKeyInfo.createPBES2 -The createPBE method does not support PBES2 (it is necessary to know -the desired encrypted algorithm to derive the key and build the -parameters data). Add the createPBES2 method, which uses PBKDF2 to -derive the symmetric key and allows the caller to specify the -encryption algorithm. - -cfu for ftweedal - -diff -r 0b8a6e84b6c7 -r b3b653faef84 org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java ---- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java Fri Sep 08 11:50:21 2017 -0700 -+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java Fri Sep 08 11:53:36 2017 -0700 -@@ -155,6 +155,100 @@ - - - /** -+ * Export a private key in PBES2 format, using a random PBKDF2 salt. -+ * -+ * Token must support the CKM_PKCS5_PBKD2 mechanism. -+ * -+ * @param saltLen Length of salt in bytes (default: 16) -+ * @param kdfIterations PBKDF2 iterations (default: 2000) -+ * @param encAlg The symmetric encryption algorithm for enciphering the -+ * private key. Determines the size of derived key. -+ * @param pwd Password -+ * @param charToByteConverter The mechanism for converting the characters -+ * in the password into bytes. If null, the default mechanism -+ * will be used, which is UTF8. -+ * @param privateKeyInfo The encoded PrivateKeyInfo to be encrypted and -+ * stored in the EncryptedContentInfo. -+ */ -+ public static EncryptedPrivateKeyInfo createPBES2( -+ int saltLen, -+ int kdfIterations, -+ EncryptionAlgorithm encAlg, -+ Password pwd, -+ KeyGenerator.CharToByteConverter charToByteConverter, -+ PrivateKeyInfo privateKeyInfo) -+ throws CryptoManager.NotInitializedException, NoSuchAlgorithmException, -+ InvalidKeyException, InvalidAlgorithmParameterException, TokenException, -+ CharConversionException -+ { -+ if (encAlg == null) -+ throw new IllegalArgumentException("encAlg cannot be null"); -+ if (pwd == null) -+ throw new IllegalArgumentException("pwd cannot be null"); -+ if (privateKeyInfo == null) -+ throw new IllegalArgumentException("privateKeyInfo cannot be null"); -+ -+ if (kdfIterations < 1) -+ kdfIterations = 2000; -+ if (saltLen < 1) -+ saltLen = 16; -+ -+ try { -+ // generate random PBKDF2 salt -+ SecureRandom random = new SecureRandom(); -+ byte salt[] = new byte[saltLen]; -+ random.nextBytes(salt); -+ -+ // derive symmetric key from passphrase using PBKDF2 -+ CryptoManager cm = CryptoManager.getInstance(); -+ CryptoToken token = cm.getInternalCryptoToken(); -+ KeyGenerator kg = token.getKeyGenerator( -+ PBEAlgorithm.PBE_PKCS5_PBKDF2); -+ PBEKeyGenParams pbekgParams = new PBEKeyGenParams( -+ pwd.getChars(), salt, kdfIterations, encAlg); -+ if (charToByteConverter != null) -+ kg.setCharToByteConverter(charToByteConverter); -+ kg.initialize(pbekgParams); -+ SymmetricKey sk = kg.generate(); -+ -+ // encrypt PrivateKeyInfo -+ byte iv[] = new byte[encAlg.getBlockSize()]; -+ random.nextBytes(iv); -+ Cipher cipher = token.getCipherContext(encAlg); -+ cipher.initEncrypt(sk, new IVParameterSpec(iv)); -+ byte[] encData = cipher.doFinal(ASN1Util.encode(privateKeyInfo)); -+ -+ // construct KDF AlgorithmIdentifier -+ SEQUENCE paramsKdf = new SEQUENCE(); -+ paramsKdf.addElement(new OCTET_STRING(salt)); -+ paramsKdf.addElement(new INTEGER((long) kdfIterations)); -+ paramsKdf.addElement(new INTEGER((long) sk.getLength())); -+ AlgorithmIdentifier algIdKdf = new AlgorithmIdentifier( -+ PBEAlgorithm.PBE_PKCS5_PBKDF2.toOID(), paramsKdf); -+ -+ // construct encryption AlgorithmIdentifier -+ AlgorithmIdentifier algIdEnc = new AlgorithmIdentifier( -+ encAlg.toOID(), new OCTET_STRING(iv)); -+ -+ // construct "composite" PBES2 AlgorithmIdentifier -+ SEQUENCE paramsPBES2 = new SEQUENCE(); -+ paramsPBES2.addElement(algIdKdf); -+ paramsPBES2.addElement(algIdEnc); -+ AlgorithmIdentifier algIdPBES2 = new AlgorithmIdentifier( -+ PBEAlgorithm.PBE_PKCS5_PBES2.toOID(), paramsPBES2); -+ -+ // construct EncryptedPrivateKeyInfo -+ return new EncryptedPrivateKeyInfo(algIdPBES2, new OCTET_STRING(encData)); -+ } catch (IllegalBlockSizeException e) { -+ Assert.notReached("IllegalBlockSizeException in EncryptedContentInfo.createPBES2"); -+ } catch (BadPaddingException e) { -+ Assert.notReached("BadPaddingException in EncryptedContentInfo.createPBES2"); -+ } -+ return null; // unreachable -+ } -+ -+ -+ /** - * Creates a new EncryptedPrivateKeyInfo, where the data is encrypted - * with a password-based key- - * with wrapping/unwrapping happening on token. -# HG changeset patch -# User Fraser Tweedale -# Date 1504896964 25200 -# Fri Sep 08 11:56:04 2017 -0700 -# Node ID 87dca07f7529463398734d1279bcfd7023a43d4c -# Parent b3b653faef8475ae03c670766429fd4dfab37a5e -Bug 1370778 PBE and padded block cipher enhancements and fixes - -patch jss-ftweedal-0013-Improve-error-reporting.patch -Subject: Improve error reporting -From: Fraser Tweedale -Content-Type: text/plain -found patch at byte 157 -message: -Improve error reporting - -cfu for ftweedal - -diff -r b3b653faef84 -r 87dca07f7529 org/mozilla/jss/pkcs11/PK11KeyWrapper.c ---- a/org/mozilla/jss/pkcs11/PK11KeyWrapper.c Fri Sep 08 11:53:36 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11KeyWrapper.c Fri Sep 08 11:56:04 2017 -0700 -@@ -251,9 +251,7 @@ - status = PK11_WrapPrivKey(slot, wrapping, toBeWrapped, mech, param, - &wrapped, NULL /* wincx */ ); - if(status != SECSuccess) { -- char err[256] = {0}; -- PR_snprintf(err, 256, "Wrapping operation failed on token:%d", PR_GetError()); -- JSS_throwMsg(env, TOKEN_EXCEPTION, err); -+ JSS_throwMsgPrErr(env, TOKEN_EXCEPTION, "Wrapping operation failed on token"); - goto finish; - } - PR_ASSERT(wrapped.len>0 && wrapped.data!=NULL); -@@ -450,8 +448,8 @@ - attribs, numAttribs, NULL /*wincx*/); - if( privk == NULL ) { - char err[256] = {0}; -- PR_snprintf(err, 256, "Key Unwrap failed on token:error=%d, keyType=%d", PR_GetError(), keyType); -- JSS_throwMsg(env, TOKEN_EXCEPTION, err); -+ PR_snprintf(err, 256, "Key Unwrap failed on token; keyType=%d", keyType); -+ JSS_throwMsgPrErr(env, TOKEN_EXCEPTION, err); - goto finish; - } - -diff -r b3b653faef84 -r 87dca07f7529 org/mozilla/jss/pkcs11/PK11Store.c ---- a/org/mozilla/jss/pkcs11/PK11Store.c Fri Sep 08 11:53:36 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11Store.c Fri Sep 08 11:56:04 2017 -0700 -@@ -734,7 +734,7 @@ - PR_TRUE /* isperm */, PR_TRUE /* isprivate */, - pubKey->keyType, keyUsage, NULL /* wincx */); - if (result != SECSuccess) { -- JSS_throwMsg( -+ JSS_throwMsgPrErr( - env, TOKEN_EXCEPTION, - "Failed to import EncryptedPrivateKeyInfo to token"); - goto finish; diff --git a/jss-SignatureAlgorithm.patch b/jss-SignatureAlgorithm.patch deleted file mode 100644 index e87db1b..0000000 --- a/jss-SignatureAlgorithm.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User David Stutzman david.konrad.stutzman@us.army.mil -# Date 1509062346 25200 -# Thu Oct 26 16:59:06 2017 -0700 -# Node ID b1a3c3cc6b3584948d251d3bfcfe6630d8970db5 -# Parent 252c10f448971b7ae087bde259505abd5dc5a03a -Bugzilla.mozilla 1409867 org.mozilla.jss.pkix.cms.SignerInfo incorrectly producing signatures (especially for EC) - -The patch fixes the OID that goes into the signatureAlgorithm field as well as passing the full signature algorithm to the Signature context to generate the signature using the proper algorithm. -With this patch, if one passes SignatureAlgorithm.RSASignatureWithSHA256Digest in the constructor one will now get sha256WithRSAEncryption (1 2 840 113549 1 1 11) in the signatureAlgorithm field. - -cfu checking in for dstutzman - -diff --git a/org/mozilla/jss/pkix/cms/SignerInfo.java b/org/mozilla/jss/pkix/cms/SignerInfo.java ---- a/org/mozilla/jss/pkix/cms/SignerInfo.java -+++ b/org/mozilla/jss/pkix/cms/SignerInfo.java -@@ -289,7 +289,7 @@ - } - - digestEncryptionAlgorithm = new AlgorithmIdentifier( -- signingAlg.getRawAlg().toOID(),null ); -+ signingAlg.toOID(),null ); - - - if( signedAttributes != null ) -@@ -332,7 +332,7 @@ - // encrypt the DER-encoded DigestInfo with the private key - CryptoToken token = signingKey.getOwningToken(); - Signature sig; -- sig = token.getSignatureContext( signingAlg.getRawAlg() ); -+ sig = token.getSignatureContext( signingAlg ); - sig.initSign(signingKey); - sig.update(toBeSigned); - encryptedDigest = new OCTET_STRING(sig.sign()); diff --git a/jss-fix-PK11Store-getEncryptedPrivateKeyInfo-segfault.patch b/jss-fix-PK11Store-getEncryptedPrivateKeyInfo-segfault.patch deleted file mode 100644 index fb93dc0..0000000 --- a/jss-fix-PK11Store-getEncryptedPrivateKeyInfo-segfault.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Fraser Tweedale -# Date 1505175862 25200 -# Mon Sep 11 17:24:22 2017 -0700 -# Node ID 3e9a5ae2149d04877dc19b117a8917c22854f8eb -# Parent 87dca07f7529463398734d1279bcfd7023a43d4c -Bug 1371147 PK11Store.getEncryptedPrivateKeyInfo() segfault if export fails - -patch jss-ftweedal-0011-Don-t-crash-if-PK11_ExportEncryptedPrivKeyInfo-retur.patch -Subject: Don't crash if PK11_ExportEncryptedPrivKeyInfo returns NULL -From: Fraser Tweedale -Content-Type: text/plain -found patch at byte 239 -message: -Don't crash if PK11_ExportEncryptedPrivKeyInfo returns NULL -PK11_ExportEncryptedPrivKeyInfo returning NULL is not being handled -properly, causing segfault. Detect this condition and raise a -TokenException instead. - -cfu for ftweedal - -diff -r 87dca07f7529 -r 3e9a5ae2149d org/mozilla/jss/pkcs11/PK11Store.c ---- a/org/mozilla/jss/pkcs11/PK11Store.c Fri Sep 08 11:56:04 2017 -0700 -+++ b/org/mozilla/jss/pkcs11/PK11Store.c Mon Sep 11 17:24:22 2017 -0700 -@@ -581,6 +581,11 @@ - // export the epki - epki = PK11_ExportEncryptedPrivKeyInfo( - slot, algTag, pwItem, privk, iterations, NULL /*wincx*/); -+ if (epki == NULL) { -+ JSS_throwMsgPrErr( -+ env, TOKEN_EXCEPTION, "Failed to export EncryptedPrivateKeyInfo"); -+ goto finish; -+ } - - // DER-encode the epki - if (SEC_ASN1EncodeItem(NULL, &epkiItem, epki, diff --git a/jss-fix-SignerInfo-version.patch b/jss-fix-SignerInfo-version.patch deleted file mode 100644 index e76e393..0000000 --- a/jss-fix-SignerInfo-version.patch +++ /dev/null @@ -1,44 +0,0 @@ -# HG changeset patch -# User David Stutzman -# Date 1516144092 28800 -# Tue Jan 16 15:08:12 2018 -0800 -# Node ID 1d858c6d4626b625bb671426e6899d98c2f5bb2e -# Parent 8746a3fc74785e2fd12f86d08a6886ed9160620e -Bug# 386351 SignerInfo version, r=cfu - -This patch fixes versioning of SignerInfo to match CMS spec. - -cfu for dstutzman - -diff --git a/org/mozilla/jss/pkix/cms/SignerInfo.java b/org/mozilla/jss/pkix/cms/SignerInfo.java ---- a/org/mozilla/jss/pkix/cms/SignerInfo.java -+++ b/org/mozilla/jss/pkix/cms/SignerInfo.java -@@ -52,9 +52,6 @@ - private OCTET_STRING encryptedDigest; - private SET unsignedAttributes; // [1] OPTIONAL - -- // we only do CMS in RFC 2630 -- private static final INTEGER VERSION = new INTEGER(3); -- - /////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////// - // Accessor methods -@@ -198,8 +195,17 @@ - CryptoManager.NotInitializedException, SignatureException, - TokenException - { -- version = VERSION; -+ if (signerIdentifier == null) { -+ throw new IllegalArgumentException("SignerIdentifier may not be null"); -+ } - this.signerIdentifier = signerIdentifier; -+ if (SignerIdentifier.ISSUER_AND_SERIALNUMBER.equals(this.signerIdentifier.getType())) { -+ this.version = new INTEGER(1); -+ } else if (SignerIdentifier.SUBJECT_KEY_IDENTIFIER.equals(this.signerIdentifier.getType())) { -+ this.version = new INTEGER(3); -+ } else { -+ throw new IllegalArgumentException("Unexpected SignerIdentifier type"); -+ } - this.digestAlgorithm = - new AlgorithmIdentifier(signingAlg.getDigestAlg().toOID(),null); - diff --git a/jss-signature-correction.patch b/jss-signature-correction.patch deleted file mode 100644 index 1746083..0000000 --- a/jss-signature-correction.patch +++ /dev/null @@ -1,306 +0,0 @@ -# HG changeset patch -# User David Stutzman -# Date 1515711524 28800 -# Thu Jan 11 14:58:44 2018 -0800 -# Node ID 9e2db7eee6652330723d935c2b900b9b09b1ab9d -# Parent ca2c2fcfaf207f87c3c69e493f2b30fd0a088e95 -Bug 1409867 - additional fix from dstutzman: allow signatures to be created correctly. - -cfu for dstutzman - -diff --git a/org/mozilla/jss/pkix/cms/SignerInfo.java b/org/mozilla/jss/pkix/cms/SignerInfo.java ---- a/org/mozilla/jss/pkix/cms/SignerInfo.java -+++ b/org/mozilla/jss/pkix/cms/SignerInfo.java -@@ -9,14 +9,10 @@ - import org.mozilla.jss.util.Assert; - import org.mozilla.jss.pkix.primitive.*; - import org.mozilla.jss.crypto.*; --import java.util.Vector; --import java.math.BigInteger; --import java.io.ByteArrayInputStream; - import java.security.InvalidKeyException; - import java.security.SignatureException; - import java.security.NoSuchAlgorithmException; - import java.security.MessageDigest; --import org.mozilla.jss.crypto.*; - import org.mozilla.jss.crypto.X509Certificate; - import org.mozilla.jss.pkix.cert.*; - import org.mozilla.jss.*; -@@ -73,14 +69,6 @@ - } - - /** -- * Low-level method to set the version. -- * It is not normally necessary to call this. Use it at your own risk. -- public void setVersion(INTEGER version) { -- this.version = version; -- } -- */ -- -- /** - * Retrieves the SignerIdentifier. - */ - public SignerIdentifier getSignerIdentifier() { -@@ -88,14 +76,6 @@ - } - - /** -- * Low-level method to set the signerIdentifier. -- * It is not normally necessary to call this. Use it at your own risk. -- public void setSignerIdentifier( SignerIdentifier iasn ) { -- this.signerIdentifier = iasn; -- } -- */ -- -- /** - * Retrieves the DigestAlgorithm used in this SignerInfo. - * - * @exception NoSuchAlgorithmException If the algorithm is not -@@ -116,14 +96,6 @@ - } - - /** -- * Low-level method to set the digest AlgorithmIdentifier. -- * It is not normally necessary to call this. Use it at your own risk. -- public void setDigestAlgorithmIdentifier(AlgorithmIdentifier algid) { -- this.digestAlgorithm = algid; -- } -- */ -- -- /** - * Retrieves the signed attributes, if they exist. - * - */ -@@ -139,14 +111,6 @@ - } - - /** -- * Low-level method to set the signedAttributes field. -- * It is not normally necessary to call this. Use it at your own risk. -- public void setSignedAttributes(SET authAttrib) { -- this.signedAttributes = authAttrib; -- } -- */ -- -- /** - * Returns the raw signature (digest encryption) algorithm used in this - * SignerInfo. - * -@@ -168,15 +132,6 @@ - } - - /** -- * Low-level method to set the digestEncryptionAlgorithm field. -- * It is not normally necessary to call this. Use it at your own risk. -- public void -- setDigestEncryptionAlgorithmIdentifier(AlgorithmIdentifier algid) { -- this.digestEncryptionAlgorithm= algid; -- } -- */ -- -- /** - * Retrieves the encrypted digest. - */ - public byte[] getEncryptedDigest() { -@@ -184,14 +139,6 @@ - } - - /** -- * Low-level method to set the encryptedDigest field. -- * It is not normally necessary to call this. Use it at your own risk. -- public void setEncryptedDigest(byte[] ed) { -- this.encryptedDigest = new OCTET_STRING(ed); -- } -- */ -- -- /** - * Retrieves the unsigned attributes, if they exist. - * - */ -@@ -206,14 +153,6 @@ - return (unsignedAttributes!=null); - } - -- /** -- * Low-level method to set the unsignedAttributes field. -- * It is not normally necessary to call this. Use it at your own risk. -- public void setUnsignedAttributes(SET unauthAttrib) { -- this.unsignedAttributes = unauthAttrib; -- } -- */ -- - /////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////// - // Constructors -@@ -221,17 +160,6 @@ - /////////////////////////////////////////////////////////////////////// - - /** -- * Low-level default constructor. All fields are initialized to null. -- * Before this SignerInfo can be processed or used in any way, all of -- * the fields except signedAttributes and -- * unsignedAttributes must be non-null. -- *

It is not normally necessary to call this constructor.Use it at -- * your own risk. -- public SignerInfo() { -- } -- */ -- -- /** - * A constructor for creating a new SignerInfo from scratch. - * - * @param signerIdentifier The signerIdentifier of the -@@ -303,36 +231,32 @@ - ////////////////////////////////////////////////// - - // compute the digest -- byte[] digest=null; -- DigestAlgorithm digestAlg = signingAlg.getDigestAlg(); -- if( signedAttributes == null ) { -+ CryptoToken token = signingKey.getOwningToken(); -+ Signature sig; -+ byte[] toBeSigned = null; -+ if (signedAttributes == null) { - // just use the message digest of the content -- digest = messageDigest; -+ if (signingAlg.getRawAlg() == SignatureAlgorithm.RSASignature) { -+ SEQUENCE digestInfo = createDigestInfo(messageDigest, false); -+ toBeSigned = ASN1Util.encode(digestInfo); -+ } else { -+ toBeSigned = messageDigest; -+ } -+ sig = token.getSignatureContext(signingAlg.getRawAlg()); //data is already digested - } else { -- // digest the contents octets of the signed attributes -- byte[] enc = ASN1Util.encode(signedAttributes); -- MessageDigest md = -- MessageDigest.getInstance(digestAlg.toString()); -- digest = md.digest( enc ); -- } -- -- byte[] toBeSigned; -- if( signingAlg.getRawAlg() == SignatureAlgorithm.RSASignature ) { -- // put the digest in a DigestInfo -- SEQUENCE digestInfo = new SEQUENCE(); -- AlgorithmIdentifier digestAlgId = -- new AlgorithmIdentifier( digestAlg.toOID(),null ); -- digestInfo.addElement( digestAlgId ); -- digestInfo.addElement( new OCTET_STRING( digest ) ); -- toBeSigned = ASN1Util.encode(digestInfo); -- } else { -- toBeSigned = digest; -+ byte[] encoding = ASN1Util.encode(signedAttributes); -+ if (signingAlg.getRawAlg() == SignatureAlgorithm.RSASignature) { -+ // put the digest in a DigestInfo -+ SEQUENCE digestInfo = createDigestInfo(encoding, true); -+ toBeSigned = ASN1Util.encode(digestInfo); -+ sig = token.getSignatureContext(SignatureAlgorithm.RSASignature); -+ } else { -+ toBeSigned = encoding; -+ sig = token.getSignatureContext(signingAlg); -+ } - } - - // encrypt the DER-encoded DigestInfo with the private key -- CryptoToken token = signingKey.getOwningToken(); -- Signature sig; -- sig = token.getSignatureContext( signingAlg ); - sig.initSign(signingKey); - sig.update(toBeSigned); - encryptedDigest = new OCTET_STRING(sig.sign()); -@@ -494,21 +418,20 @@ - digestEncryptionAlgorithm.getOID() - ); - -+ CryptoToken token = CryptoManager.getInstance() -+ .getInternalCryptoToken(); -+ Signature sig; - byte[] toBeVerified; -- if( sigAlg.getRawAlg() == SignatureAlgorithm.RSASignature ) { -+ if (sigAlg.getRawAlg() == SignatureAlgorithm.RSASignature) { - // create DigestInfo structure -- SEQUENCE digestInfo = new SEQUENCE(); -- digestInfo.addElement( -- new AlgorithmIdentifier(digestAlgorithm.getOID(), null) ); -- digestInfo.addElement( new OCTET_STRING(messageDigest) ); -+ SEQUENCE digestInfo = createDigestInfo(messageDigest, false); - toBeVerified = ASN1Util.encode(digestInfo); -+ sig = token.getSignatureContext(sigAlg.getRawAlg()); - } else { - toBeVerified = messageDigest; -+ sig = token.getSignatureContext(sigAlg); - } -- -- CryptoToken token = CryptoManager.getInstance() -- .getInternalCryptoToken(); -- Signature sig = token.getSignatureContext(sigAlg); -+ - sig.initVerify(pubkey); - sig.update(toBeVerified); - if( sig.verify(encryptedDigest.toByteArray()) ) { -@@ -671,31 +594,22 @@ - // Now verify the signature. - CryptoToken token = - CryptoManager.getInstance().getInternalCryptoToken(); -- Signature sig = token.getSignatureContext( sigAlg ); -- sig.initVerify(pubkey); -+ Signature sig; - - // verify the contents octets of the DER encoded signed attribs -- byte[] toBeDigested = ASN1Util.encode(signedAttributes); -- -- MessageDigest md = MessageDigest.getInstance( -- DigestAlgorithm.fromOID(digestAlgorithm.getOID()).toString() ); -- byte[] digest = md.digest(toBeDigested); -- -+ byte[] encoding = ASN1Util.encode(signedAttributes); - byte[] toBeVerified; -- if( sigAlg.getRawAlg() == SignatureAlgorithm.RSASignature ) { -+ if (sigAlg.getRawAlg() == SignatureAlgorithm.RSASignature) { - // create DigestInfo structure -- SEQUENCE digestInfo = new SEQUENCE(); -- -- AlgorithmIdentifier digestAlgId = -- new AlgorithmIdentifier( digestAlgorithm.getOID(),null ); -- digestInfo.addElement( digestAlgId ); -- -- digestInfo.addElement( new OCTET_STRING(digest) ); -+ SEQUENCE digestInfo = createDigestInfo(encoding, true); - toBeVerified = ASN1Util.encode(digestInfo); -+ sig = token.getSignatureContext(SignatureAlgorithm.RSASignature); - } else { -- toBeVerified = digest; -+ toBeVerified = encoding; -+ sig = token.getSignatureContext(sigAlg); - } - -+ sig.initVerify(pubkey); - sig.update( toBeVerified ); - - if( ! sig.verify(encryptedDigest.toByteArray()) ) { -@@ -708,6 +622,25 @@ - // SUCCESSFULLY VERIFIED - - } -+ -+ private SEQUENCE createDigestInfo(byte[] data, boolean doDigest) throws NoSuchAlgorithmException { -+ if(data == null || data.length == 0){ -+ throw new IllegalArgumentException("Data to digest must be supplied"); -+ } -+ SEQUENCE digestInfo = new SEQUENCE(); -+ digestInfo.addElement(this.digestAlgorithm); -+ byte[] digest; -+ if (doDigest) { -+ MessageDigest md = MessageDigest.getInstance( -+ DigestAlgorithm.fromOID(this.digestAlgorithm.getOID()).toString()); -+ digest = md.digest(data); -+ } else { -+ digest = data; -+ } -+ digestInfo.addElement(new OCTET_STRING(digest)); -+ return digestInfo; -+ } -+ - - /** - * Compares two non-null byte arrays. Returns true if they are identical, diff --git a/jss-standardize-ECC-algorithm-names.patch b/jss-standardize-ECC-algorithm-names.patch deleted file mode 100644 index dc47fdb..0000000 --- a/jss-standardize-ECC-algorithm-names.patch +++ /dev/null @@ -1,41 +0,0 @@ -# HG changeset patch -# User David Stutzman -# Date 1515722400 28800 -# Thu Jan 11 18:00:00 2018 -0800 -# Node ID 8746a3fc74785e2fd12f86d08a6886ed9160620e -# Parent 9e2db7eee6652330723d935c2b900b9b09b1ab9d -Bug 589158 Add support for Java Security Standard Algorithm Names for EC Signature types - -This patch adds the aliases for Java Security Standard Algorithm Names for EC Signature types. - -cfu for dstutzman (reviewed by wtc) - -diff --git a/org/mozilla/jss/JSSProvider.java b/org/mozilla/jss/JSSProvider.java ---- a/org/mozilla/jss/JSSProvider.java -+++ b/org/mozilla/jss/JSSProvider.java -@@ -79,21 +79,25 @@ - put("Alg.Alias.Signature.SHA-1/EC", "SHA1withEC"); - put("Alg.Alias.Signature.SHA/ECDSA", "SHA1withEC"); - put("Alg.Alias.Signature.SHA1/ECDSA", "SHA1withEC"); -+ put("Alg.Alias.Signature.SHA1withECDSA", "SHA1withEC"); //JCE Standard Name - - put("Signature.SHA256withEC", - "org.mozilla.jss.provider.java.security.JSSSignatureSpi$SHA256EC"); - put("Alg.Alias.Signature.SHA256/EC", "SHA256withEC"); - put("Alg.Alias.Signature.SHA-256/EC", "SHA256withEC"); -+ put("Alg.Alias.Signature.SHA256withECDSA", "SHA256withEC"); //JCE Standard Name - - put("Signature.SHA384withEC", - "org.mozilla.jss.provider.java.security.JSSSignatureSpi$SHA384EC"); - put("Alg.Alias.Signature.SHA384/EC", "SHA384withEC"); - put("Alg.Alias.Signature.SHA-384/EC", "SHA384withEC"); -+ put("Alg.Alias.Signature.SHA384withECDSA", "SHA384withEC"); //JCE Standard Name - - put("Signature.SHA512withEC", - "org.mozilla.jss.provider.java.security.JSSSignatureSpi$SHA512EC"); - put("Alg.Alias.Signature.SHA512/EC", "SHA512withEC"); - put("Alg.Alias.Signature.SHA-512/EC", "SHA512withEC"); -+ put("Alg.Alias.Signature.SHA512withECDSA", "SHA512withEC"); //JCE Standard Name - - ///////////////////////////////////////////////////////////// - // Message Digesting diff --git a/jss.spec b/jss.spec index 760d71a..ebf90c5 100644 --- a/jss.spec +++ b/jss.spec @@ -1,17 +1,24 @@ Name: jss -Version: 4.4.2 -Release: 10%{?dist} +Version: 4.4.3 +Release: 1%{?dist} Summary: Java Security Services (JSS) Group: System Environment/Libraries License: MPLv1.1 or GPLv2+ or LGPLv2+ URL: http://www.mozilla.org/projects/security/pki/jss/ -# The source for this package was pulled from upstream's hg. Use the -# following commands to generate the tarball: +# The source for this package was pulled from upstream repository. +# +# To generate the tarball with HG: # # hg clone https://hg.mozilla.org/projects/jss # cd jss -# hg archive --prefix jss-4.4.2/jss/ ../jss-4.4.2.tar.gz +# hg archive --prefix jss-4.4.3/jss/ ../jss-4.4.3.tar.gz +# +# To generate the tarball with Git: +# +# git clone hg::https://hg.mozilla.org/projects/jss +# cd jss +# git archive --format=tar.gz --prefix jss-4.4.3/jss/ -o ../jss-4.4.3.tar.gz -v HEAD # Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{name}-%{version}.tar.gz Source1: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/MPL-1.1.txt @@ -31,16 +38,6 @@ BuildRequires: perl-interpreter Requires: java-headless Requires: nss >= 3.28.4-6 -Patch1: jss-HMAC-test-for-AES-encrypt-unwrap.patch -Patch2: jss-PBE-padded-block-cipher-enhancements.patch -Patch3: jss-fix-PK11Store-getEncryptedPrivateKeyInfo-segfault.patch -Patch4: jss-HMAC-unwrap-keywrap-FIPSMODE.patch -Patch5: jss-SignatureAlgorithm.patch -Patch6: jss-ObjectNotFoundException-message.patch -Patch7: jss-signature-correction.patch -Patch8: jss-standardize-ECC-algorithm-names.patch -Patch9: jss-fix-SignerInfo-version.patch - %description Java Security Services (JSS) is a java native interface which provides a bridge for java-based applications to use native Network Security Services (NSS). @@ -55,20 +52,12 @@ Requires: jss = %{version}-%{release} This package contains the API documentation for JSS. %prep -%setup -q -n %{name}-%{version} -pushd jss -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -popd +%autosetup -n %{name}-%{version} %build + +%set_build_flags + [ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java [ -z "$USE_INSTALLED_NSPR" ] && export USE_INSTALLED_NSPR=1 [ -z "$USE_INSTALLED_NSS" ] && export USE_INSTALLED_NSS=1 @@ -155,351 +144,6 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name}-%{version}/* %changelog -* Wed Feb 07 2018 Fedora Release Engineering - 4.4.2-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Jan 22 2018 Dogtag Team 4.4.2-9 -- Mozilla Bugzilla #1409867 - org.mozilla.jss.pkix.cms.SignerInfo incorrectly - producing signatures (especially for EC) (cfu,dstutzman) -- Mozilla Bugzilla #589158 - Add Sun's standard algorithm names for all ECC - signature types (cfu,dstutzman) -- Mozilla Bugzilla #386351 - SignerInfo class inserts wrong version # into - the resulting structure (cfu,dstutzman) - -* Mon Jan 08 2018 Karsten Hopp - 4.4.2-8 -- update build dependencies - -* Wed Nov 1 2017 Dogtag Team 4.4.2-7 -- Mozilla Bugzilla #1408057 - JSS throws ObjectNotFoundException without - message (edewata) -- Mozilla Bugzilla #1409867 - org.mozilla.jss.pkix.cms.SignerInfo incorrectly - producing signatures (especially for EC) (cfu,dstutzman) - -* Fri Oct 27 2017 Dogtag Team 4.4.2-6 -- Mozilla Bugzilla #1400884 - new JSS failures: HMAC Unwrap and KeyWrapping - FIPSMODE (jmagne) - -* Mon Sep 11 2017 Dogtag Team 4.4.2-5 -- Mozilla Bugzilla #1370778 - PBE and padded block cipher enhancements and - fixes (ftweedal) -- Mozilla Bugzilla #1371147 - PK11Store.getEncryptedPrivateKeyInfo() segfault - if export fails (ftweedal) -- Mozilla Bugzilla #1373824 - Mozilla Bug #1373824 - Bug 1308027 (change 2163) - breaks HMAC-SHA1 key imports (jmagne) - -* Thu Aug 03 2017 Fedora Release Engineering - 4.4.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 4.4.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue May 9 2017 Matthew Harmsen - 4.4.2-2 -- Bump NSS dependencies from 4.28.3 to 4.28.4-6 to pick-up fix in - Mozilla Bugzilla #1360207 - Fix incorrect if (ss->...) in SSL_ReconfigFD - -* Mon May 1 2017 Matthew Harmsen - 4.4.2-1 -- Mozilla Bugzilla #1352476 - RFE: Document on the README how to create a - release tag (mharmsen) -- Mozilla Bugzilla #1355358 - CryptoStore: add methods for importing and - exporting EncryptedPrivateKeyInfo (ftweedal) -- Mozilla Bugzilla #1359731 - CryptoStore.importPrivateKey enhancements - (ftweedal) - -* Mon Apr 17 2017 Matthew Harmsen - 4.4.1-2 -- Mozilla Bugzilla #1355268 - JSS 4.4 is incompatible with versions of - idm-console-framework < 1.1.17-4 -- Red Hat Bugzilla #1435076 - Remove unused legacy lines from JSS spec files - -* Mon Mar 27 2017 Matthew Harmsen - 4.4.1-1 -- Bugzilla Bug #1431937 - Rebase jss to 4.4.x in Fedora 25+ -- Updated build requirements for NSPR -- Updated build and runtime requirements for NSS -- ## 'jss-post-rebase.patch' resolves the following issues ported from - ## upstream: -- Mozilla Bugzilla #1337092 - CMC conformance update: Implement required ASN.1 - code for RFC5272+ (cfu) -- Mozilla Bugzilla #1347394 - Eclipse project files for JSS (edewata) -- Mozilla Bugzilla #1347429 - Deprecated SSL 3.0 cipher names in SSLSocket - class. (edewata) -- Mozilla Bugzilla #1348856 - SSL alert callback (edewata) -- Mozilla Bugzilla #1349278 - SSL cipher enumeration (edewata) -- Mozilla Bugzilla #1349349 - Problem with Password.readPasswordFromConsole(). - (edewata) -- Mozilla Bugzilla #1349831 - Revise top-level README file (mharmsen) -- Mozilla Bugzilla #1349836 - Changes to JSS Version Block (mharmsen) -- Mozilla Bugzilla #1350130 - Missing - CryptoManager.verifyCertificateNowCUNative() implementation. (emaldona) - -* Tue Mar 21 2017 Matthew Harmsen - 4.4.0-3 -- Bugzilla Bug #1434535 - JSS 4.4.x is incompatible with versions of - pki-base < 10.4.0 - -* Wed Mar 15 2017 Matthew Harmsen - 4.4.0-2 -- Bugzilla Bug #1432568 - JSS 4.4.x is incompatible with versions of - tomcatjss < 7.2.1 - -* Mon Mar 13 2017 Elio Maldonado - 4.4.0-1 -- Bugzilla Bug #1431937 - Rebase jss to 4.4.x in Fedora 25+ -- ## JSS 4.4.0 includes the following patches ported from downstream: -- Mozilla Bugzilla #507536 - Add IPv6 functionality to JSS -- Mozilla Bugzilla #1307872 - Expose NSS calls for OCSP settings -- Mozilla Bugzilla #1307882 - RFE ecc - add ecc curve name support in JSS and - CS interface -- Mozilla Bugzilla #1307993 - Expose updated certificate verification function - in JSS -- Mozilla Bugzilla #1308000 - Incorrect socket accept error message due to bad - pointer arithmetic -- Mozilla Bugzilla #1308001 - Verification should fail when a revoked - certificate is added -- Mozilla Bugzilla #1308004 - Warnings should be cleaned up in JSS build -- Mozilla Bugzilla #1308006 - DRM failed to recovery keys when in FIPS mode - (HSM + NSS) -- Mozilla Bugzilla #1308008 - Defects revealed by Coverity scan -- Mozilla Bugzilla #1308009 - Add support for PKCS5v2; support for secure PKCS12 -- Mozilla Bugzilla #1308012 - DRM: during archiving and recovering, wrapping - unwrapping keys should be done in the token -- Mozilla Bugzilla #1308013 - JSS - HSM token name was mistaken for - manufacturer identifier -- Mozilla Bugzilla #1308017 - Un-deprecate previously deprecated methods in - JSS 4.2.6 -- Mozilla Bugzilla #1308019 - Provide Tomcat support for TLS v1.1 and - TLS v1.2 via NSS through JSS -- Mozilla Bugzilla #1308026 - JSS certificate validation does not pass up exact - error from NSS -- Mozilla Bugzilla #1308027 - Merge pki-symkey into jss -- Mozilla Bugzilla #1308029 - Resolve Javadoc build issues -- Mozilla Bugzilla #1308047 - support ECC encryption key archival and recovery -- Mozilla Bugzilla #1313122 - Remove bypass tests as latest NSS has removed - PKCS#11 bypass support -- Mozilla Bugzilla #1328675 - Simple problem unwrapping AES sym keys on token -- Mozilla Bugzilla #1345174 - Cannot create system certs when using LunaSA HSM - in FIPS Mode and ECC algorithms -- Mozilla Bugzilla #1345613 - expose AES KeyWrap and add some useful OID - functions -- Mozilla Bugzilla #1346410 - Load JSS libraries appropriately -- ## JSS 4.4.0 includes the following changes for building and testing: -- Mozilla Bugzilla #1331765 - Simplify JSS Makefile build and test -- Mozilla Bugzilla #1346420 - Document steps required to use the proper - libjss4.so when running certain HMAC Algorithms tests - -* Wed Feb 22 2017 Jack Magne - 4.2.6-44 -- Bugzilla Bug #1425971 - Simple problem unwrapping AES sym keys on token - -* Fri Feb 10 2017 Fedora Release Engineering - 4.2.6-43 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Aug 9 2016 Christina Fu - 4.2.6-42 -- Sync up patches from both Fedora and RHEL; adding two patches - (cfu, edewata, mharmsen) from RHEL: -- Bugzilla Bug #1238450 - UnsatisfiedLinkError on Windows (cfu) -- make it compile on Windows platforms (cfu for nhosoi) - -* Fri Jun 24 2016 Christina Fu - 4.2.6-41 -- Bugzilla 1221295 jss fails to decode EncryptedKey >> EnvelopedData - (cfu for roysjosh@gmail.com) - -* Thu May 19 2016 Christina Fu - 4.2.6-40 -- Bugzilla 1074208 - pass up exact JSS certificate validation errors from NSS - (edewata) -- Bugzilla 1331596 - Key archival fails when KRA is configured with lunasa. - (cfu) -- PKI ticket 801 - Merge pki-symkey into jss (phase 1) - (jmagne) - -* Wed Dec 09 2015 Endi Dewata - 4.2.6-38 -- Bugzilla Bug #1289799 - JSS build failure on F23 and Rawhide (edewata) - -* Thu Apr 09 2015 Marcin Juszkiewicz - 4.2.6-37 -- Fix use of __isa_bits macro so it does not fail during srpm generation on koji - -* Thu Apr 09 2015 Marcin Juszkiewicz - 4.2.6-36 -- Use __isa_bits macro to check for 64-bit arch. Unblocks aarch64 and ppc64le. - -* Tue Sep 30 2014 Christina Fu - 4.2.6-35 -- Bugzilla Bug #1040640 - Incorrect OIDs for SHA2 algorithms - (cfu for jnimeh@gmail.com) -- Bugzilla Bug #1133718 - Key strength validation is not performed for RC4 - algorithm (nkinder) -- Bugzilla Bug #816396 - Provide Tomcat support for TLS v1.1 and - TLS v1.2 via NSS through JSS (cfu) - -* Sat Aug 16 2014 Fedora Release Engineering - 4.2.6-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 4.2.6-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri Mar 28 2014 Michael Simacek - 4.2.6-32 -- Use Requires: java-headless rebuild (#1067528) - -* Sat Aug 03 2013 Fedora Release Engineering - 4.2.6-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 17 2013 Nathan Kinder - 4.2.6-30 -- Bugzilla Bug #847120 - Unable to build JSS on F17 or newer - -* Thu Feb 14 2013 Fedora Release Engineering - 4.2.6-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Dec 19 2012 Stanislav Ochotnicky - 4.2.6-28 -- revbump after jnidir change - -* Wed Dec 12 2012 Stanislav Ochotnicky - 4.2.6-27 -- Simple rebuild - -* Mon Nov 19 2012 Christina Fu - 4.2.6-26 -- added source URLs in spec file to pass Package Wrangler - -* Thu Jul 19 2012 Fedora Release Engineering - 4.2.6-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Mar 30 2012 Matthew Harmsen - 4.2.6-24 -- Bugzilla Bug #783007 - Un-deprecate previously deprecated methods in - JSS 4.2.6 . . . BadPaddingException (mharmsen) - -* Tue Mar 20 2012 Christina Fu - 4.2.6-23 -- Bugzilla Bug #797351 - JSS - HSM token name was mistaken for manufacturer - identifier (cfu) -- Bugzilla Bug #804840 - [RFE] ECC encryption keys cannot be archived - ECC phase2 work - support for ECC encryption key archival and recovery (cfu) -- Bugzilla Bug #783007 - Un-deprecate previously deprecated methods in - JSS 4.2.6 . . . (mharmsen) -- Dogtag TRAC Task #109 (https://fedorahosted.org/pki/ticket/109) - add - benign JNI jar file symbolic link from JNI libdir to JNI jar file (mharmsen) - -* Fri Jan 13 2012 Fedora Release Engineering - 4.2.6-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Wed Oct 19 2011 Christina Fu - 4.2.6-21 -- Bugzilla Bug #737122 - DRM: during archiving and recovering, wrapping - unwrapping keys should be done in the token -- support for PKCS5v2; support for secure PKCS12 -- Bugzilla Bug #744797 - KRA key recovery (retrieve pkcs#12) fails after the - in-place upgrade( CS 8.0->8.1) - -* Mon Sep 19 2011 Matthew Harmsen - 4.2.6-20 -- Bugzilla Bug #715621 - Defects revealed by Coverity scan - -* Wed Aug 31 2011 Matthew Harmsen - 4.2.6-19.1 -- Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . - -* Mon Aug 15 2011 Christina Fu - 4.2.6-19 -- Bugzilla Bug 733550 - DRM failed to recovery keys when in FIPS mode - (HSM + NSS) - -* Fri Aug 12 2011 Matthew Harmsen - 4.2.6-18 -- Bugzilla Bug #660436 - Warnings should be cleaned up in JSS build - (jdennis, mharmsen) - -* Wed May 18 2011 Christina Fu - 4.2.6-17 -- Bug 670980 - Cannot create system certs when using LunaSA HSM in FIPS Mode - and ECC algorithms (support tokens that don't do ECDH) - -* Fri Apr 08 2011 Jack Magne - 4.2.6-15.99 -- bug 694661 - TKS instance crash during token enrollment. - Back out of previous patch for #676083. - -* Thu Feb 24 2011 Andrew Wnuk - 4.2.6-15 -- bug 676083 - JSS: slots not freed - -* Wed Feb 09 2011 Fedora Release Engineering - 4.2.6-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Jan 31 2011 John Dennis - 4.2.6-13 -- remove misleading comment in spec file concerning jar signing - -* Tue Jan 11 2011 Kevin Wright - 4.2.6-12 -- added missing patch line - -* Tue Dec 21 2010 Christina Fu - 4.2.6-11 -- bug 654657 - - Incorrect socket accept error message due to bad pointer arithmetic -- bug 661142 - - Verification should fail when a revoked certificate is added - -* Thu Dec 16 2010 John Dennis - 4.2.6-10 -- Resolves: bug 656094 - - Rebase jss to at least jss-4.2.6-9 -- - merge in updates from Fedora - move jar location to %%{_libdir}/jss and provide symlinks, on 32bit looks like this: - /usr/lib/java/jss4.jar -> /usr/lib/jss/jss4.jar - /usr/lib/jss/jss4-.jar - /usr/lib/jss/jss4.jar -> jss4-.jar - /usr/lib/jss/libjss4.so -- bug 654657 - - Incorrect socket accept error message due to bad pointer arithmetic -- bug 647364 - - Expose updated certificate verification function in JSS -- bug 529945 - - expose NSS calls for OCSP settings -- bug 638833 - - rfe ecc - add ec curve name support in JSS and CS -- - Need to explicitly catch UnsatisfiedLinkError exception for System.load() -- bug 533304 - - Move location of libjss4.so to subdirectory and use System.load() to - load it instead of System.loadLibrary() for Fedora packaging compliance - -* Mon Nov 30 2009 Dennis Gregorovic - 4.2.6-4.1 -- Rebuilt for RHEL 6 - -* Fri Jul 31 2009 Rob Crittenden 4.2.6-4 -- Resolves: bug 224688 - - Support ECC POP on the server -- Resolves: bug 469456 - - Server Sockets are hard coded to IPV4 -- Resolves: bug 509183 - - Set NSS dependency >= 3.12.3.99 - -* Fri Jul 24 2009 Fedora Release Engineering - 4.2.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Jun 5 2009 Rob Crittenden 4.2.6-2 -- Include patch to fix missing @param so javadocs will build - -* Fri Jun 5 2009 Rob Crittenden 4.2.6-1 -- Resolves: bug 455305 - - CA ECC Signing Key Failure -- Resolves: bug 502111 - - Need JSS interface for NSS's PK11_GenerateKeyPairWithOpFlags() function -- Resolves: bug 503809 - - Update JSS version to 4.2.6 -- Resolves: bug 503817 - - Create JSS Javadocs as their own RPM - -* Wed Feb 25 2009 Fedora Release Engineering - 4.2.5-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Tue Aug 5 2008 Tom "spot" Callaway - 4.2.5-3 -- fix license tag - -* Tue Feb 19 2008 Fedora Release Engineering - 4.2.5-2 -- Autorebuild for GCC 4.3 - -* Fri Aug 3 2007 Rob Crittenden 4.2.5-1 -- update to 4.2.5 - -* Thu May 24 2007 Rob Crittenden 4.2.4-6 -- Use _jnidir macro instead of _javadir for the jar files. This will break - multilib installs but adheres to the jpackage spec. - -* Wed May 16 2007 Rob Crittenden 4.2.4-5 -- Include the 3 license files -- Remove Requires for nss and nspr. These libraries have versioned symbols - so BuildRequires is enough to set the minimum. -- Add sparc64 for the 64-bit list - -* Mon May 14 2007 Rob Crittenden 4.2.4-4 -- Included additional comments on jar signing and why ldconfig is not - required. - -* Thu May 10 2007 Rob Crittenden 4.2.4-3 -- Added information on how to pull the source into a tar.gz - -* Thu Mar 15 2007 Rob Crittenden 4.2.4-2 -- Added RPM_OPT_FLAGS to XCFLAGS -- Added link to Sun JCE information - -* Tue Feb 27 2007 Rob Crittenden 4.2.4-1 -- Initial build +* Thu Apr 05 2018 Dogtag PKI Team 4.4.3-1 +- Rebased to JSS 4.4.3 +- Red Hat Bugzilla #1548548 - Partial Fedora build flags injection diff --git a/sources b/sources index 88399b9..8d146f6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.4.2.tar.gz) = 71f76aef2905c374a0d87b25a73db2498562fe16cef1489c5859271d2ae264695dd2b00880539c35b21f4e0b19856abc5028b813fe05b33352304b538182b251 +SHA512 (jss-4.4.3.tar.gz) = 4c471cc0195ece984f5cd232862e7de77ec371d8d994c72d1fb1d82ac4c3a523feda561c93c6668d3c50d6700128d56d05ab1bac918d0a618f5023afee3d36e5 From 3b443bb0bcc263bd866cd21164351dfa138c7390 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 29 May 2018 19:26:04 +0200 Subject: [PATCH 02/89] Rebased to JSS 4.4.4 --- .gitignore | 1 + jss.spec | 71 +++++++++++++++++++++++++++++++----------------------- sources | 2 +- 3 files changed, 43 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 54046f6..7778c28 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ jss-4.2.6.tar.gz /jss-4.4.1.tar.gz /jss-4.4.2.tar.gz /jss-4.4.3.tar.gz +/jss-4.4.4.tar.gz diff --git a/jss.spec b/jss.spec index ebf90c5..7179c51 100644 --- a/jss.spec +++ b/jss.spec @@ -1,49 +1,50 @@ +################################################################################ Name: jss -Version: 4.4.3 -Release: 1%{?dist} -Summary: Java Security Services (JSS) +################################################################################ -Group: System Environment/Libraries +Summary: Java Security Services (JSS) +URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -URL: http://www.mozilla.org/projects/security/pki/jss/ -# The source for this package was pulled from upstream repository. + +Version: 4.4.4 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} + +# To generate the source tarball: # -# To generate the tarball with HG: -# -# hg clone https://hg.mozilla.org/projects/jss +# git clone https://github.com/dogtagpki/jss.git # cd jss -# hg archive --prefix jss-4.4.3/jss/ ../jss-4.4.3.tar.gz +# git archive --format=tar.gz --prefix jss-VERSION/jss/ -o jss-VERSION.tar.gz -v HEAD # -# To generate the tarball with Git: -# -# git clone hg::https://hg.mozilla.org/projects/jss -# cd jss -# git archive --format=tar.gz --prefix jss-4.4.3/jss/ -o ../jss-4.4.3.tar.gz -v HEAD -# -Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{name}-%{version}.tar.gz -Source1: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/MPL-1.1.txt -Source2: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/gpl.txt -Source3: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/lgpl.txt +Source: https://github.com/dogtagpki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Conflicts: idm-console-framework < 1.1.17-4 Conflicts: pki-base < 10.4.0 Conflicts: tomcatjss < 7.2.1 +# autosetup +BuildRequires: git + BuildRequires: nss-devel >= 3.28.4-6 BuildRequires: nspr-devel >= 4.13.1 BuildRequires: java-devel +BuildRequires: jpackage-utils %if 0%{?fedora} >= 25 || 0%{?rhel} > 7 BuildRequires: perl-interpreter %endif -Requires: java-headless + Requires: nss >= 3.28.4-6 +Requires: java-headless +Requires: jpackage-utils %description Java Security Services (JSS) is a java native interface which provides a bridge for java-based applications to use native Network Security Services (NSS). This only works with gcj. Other JREs require that JCE providers be signed. +################################################################################ %package javadoc +################################################################################ + Summary: Java Security Services (JSS) Javadocs Group: Documentation Requires: jss = %{version}-%{release} @@ -51,9 +52,12 @@ Requires: jss = %{version}-%{release} %description javadoc This package contains the API documentation for JSS. +################################################################################ %prep -%autosetup -n %{name}-%{version} +%autosetup -n %{name}-%{version} -p 1 -S git + +################################################################################ %build %set_build_flags @@ -99,15 +103,13 @@ make -C jss/coreconf make -C jss make -C jss javadoc -%check - +################################################################################ %install -rm -rf $RPM_BUILD_ROOT docdir # Copy the license files here so we can include them in %%doc -cp -p %{SOURCE1} . -cp -p %{SOURCE2} . -cp -p %{SOURCE3} . +cp -p jss/MPL-1.1.txt . +cp -p jss/gpl.txt . +cp -p jss/lgpl.txt . # There is no install target so we'll do it by hand @@ -128,22 +130,31 @@ popd install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -rp dist/jssdoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -p jss/jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -p jss/*.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} # No ldconfig is required since this library is loaded by Java itself. +################################################################################ %files + %defattr(-,root,root,-) -%doc jss/jss.html MPL-1.1.txt gpl.txt lgpl.txt +%doc jss/jss.html jss/MPL-1.1.txt jss/gpl.txt jss/lgpl.txt %{_libdir}/jss/* %{_jnidir}/* %{_libdir}/jss/lib*.so +################################################################################ %files javadoc + %defattr(-,root,root,-) %dir %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name}-%{version}/* +################################################################################ %changelog + +* Tue May 29 2018 Dogtag PKI Team 4.4.4-1 +- Rebased to JSS 4.4.4 + * Thu Apr 05 2018 Dogtag PKI Team 4.4.3-1 - Rebased to JSS 4.4.3 - Red Hat Bugzilla #1548548 - Partial Fedora build flags injection diff --git a/sources b/sources index 8d146f6..2638641 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.4.3.tar.gz) = 4c471cc0195ece984f5cd232862e7de77ec371d8d994c72d1fb1d82ac4c3a523feda561c93c6668d3c50d6700128d56d05ab1bac918d0a618f5023afee3d36e5 +SHA512 (jss-4.4.4.tar.gz) = 206a2f26239a647b36f19277e2eebb73bfbd3bc436dabe708423498fb509956618a99c6f0532e47c7b7ddda71652612a450f7490b809866339a1d3827f7e2f51 From 7090fef2a78fe32bd338207a61ea83cb44b7f942 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 15 Jun 2018 23:31:35 +0200 Subject: [PATCH 03/89] Rebased to JSS 4.5.0-a1 --- .gitignore | 1 + jss.spec | 71 +++++++++++++++++++++++++++++++++--------------------- sources | 2 +- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 7778c28..5d191ba 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ jss-4.2.6.tar.gz /jss-4.4.2.tar.gz /jss-4.4.3.tar.gz /jss-4.4.4.tar.gz +/jss-4.5.0-a1.tar.gz diff --git a/jss.spec b/jss.spec index 7179c51..dc5560a 100644 --- a/jss.spec +++ b/jss.spec @@ -6,16 +6,26 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.4.4 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.5.0 +Release: 0.1%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -a1 # To generate the source tarball: -# -# git clone https://github.com/dogtagpki/jss.git -# cd jss -# git archive --format=tar.gz --prefix jss-VERSION/jss/ -o jss-VERSION.tar.gz -v HEAD -# -Source: https://github.com/dogtagpki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +# $ git clone https://github.com/dogtagpki/jss.git +# $ cd jss +# $ git archive \ +# --format=tar.gz \ +# --prefix jss-VERSION/ \ +# -o jss-VERSION.tar.gz \ +# +Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phase}/%{name}-%{version}%{?_phase}.tar.gz + +# To create a patch for all changes since a version tag: +# $ git format-patch \ +# --stdout \ +# \ +# > jss-VERSION-RELEASE.patch +# Patch: jss-VERSION-RELEASE.patch Conflicts: idm-console-framework < 1.1.17-4 Conflicts: pki-base < 10.4.0 @@ -28,6 +38,12 @@ BuildRequires: nss-devel >= 3.28.4-6 BuildRequires: nspr-devel >= 4.13.1 BuildRequires: java-devel BuildRequires: jpackage-utils +BuildRequires: slf4j +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: slf4j-jdk14 +%endif +BuildRequires: apache-commons-lang + %if 0%{?fedora} >= 25 || 0%{?rhel} > 7 BuildRequires: perl-interpreter %endif @@ -35,6 +51,11 @@ BuildRequires: perl-interpreter Requires: nss >= 3.28.4-6 Requires: java-headless Requires: jpackage-utils +Requires: slf4j +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires: slf4j-jdk14 +%endif +Requires: apache-commons-lang %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -55,7 +76,7 @@ This package contains the API documentation for JSS. ################################################################################ %prep -%autosetup -n %{name}-%{version} -p 1 -S git +%autosetup -n %{name}-%{version}%{?_phase} -p 1 -S git ################################################################################ %build @@ -66,10 +87,7 @@ This package contains the API documentation for JSS. [ -z "$USE_INSTALLED_NSPR" ] && export USE_INSTALLED_NSPR=1 [ -z "$USE_INSTALLED_NSS" ] && export USE_INSTALLED_NSS=1 -# Enable compiler optimizations and disable debugging code -# NOTE: If you ever need to create a debug build with optimizations disabled -# just comment out this line and change in the %%install section below the -# line that copies jars xpclass.jar to be xpclass_dbg.jar +# Enable compiler optimizations export BUILD_OPT=1 # Generate symbolic info for debuggers @@ -99,45 +117,39 @@ export USE_64 %endif # The Makefile is not thread-safe -make -C jss/coreconf -make -C jss -make -C jss javadoc +make -C coreconf +make +make javadoc ################################################################################ %install -# Copy the license files here so we can include them in %%doc -cp -p jss/MPL-1.1.txt . -cp -p jss/gpl.txt . -cp -p jss/lgpl.txt . - # There is no install target so we'll do it by hand # jars install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir} -# NOTE: if doing a debug no opt build change xpclass.jar to xpclass_dbg.jar -install -m 644 dist/xpclass.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar +install -m 644 ../dist/xpclass.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar # We have to use the name libjss4.so because this is dynamically # loaded by the jar file. install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss -install -m 0755 dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ +install -m 0755 ../dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ pushd ${RPM_BUILD_ROOT}%{_libdir}/jss ln -fs %{_jnidir}/jss4.jar jss4.jar popd # javadoc install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -rp dist/jssdoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -p jss/jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -p jss/*.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -rp ../dist/jssdoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -p jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} # No ldconfig is required since this library is loaded by Java itself. ################################################################################ %files %defattr(-,root,root,-) -%doc jss/jss.html jss/MPL-1.1.txt jss/gpl.txt jss/lgpl.txt +%doc jss.html MPL-1.1.txt gpl.txt lgpl.txt %{_libdir}/jss/* %{_jnidir}/* %{_libdir}/jss/lib*.so @@ -152,6 +164,9 @@ cp -p jss/*.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Jun 15 2018 Dogtag PKI Team 4.5.0-0.1 +- Rebased to JSS 4.5.0-a1 + * Tue May 29 2018 Dogtag PKI Team 4.4.4-1 - Rebased to JSS 4.4.4 diff --git a/sources b/sources index 2638641..607af78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.4.4.tar.gz) = 206a2f26239a647b36f19277e2eebb73bfbd3bc436dabe708423498fb509956618a99c6f0532e47c7b7ddda71652612a450f7490b809866339a1d3827f7e2f51 +SHA512 (jss-4.5.0-a1.tar.gz) = f5a8649c07392425b6f16a5fab33e6775428c90d26bfbeb442d31992ed4ef214c84b727dca6eda9924a95fe0e4a8f83a28661a2d9d5b5f15e73886f7eec1a87f From d4cc844388c43c4ff7a786a2aee447e7993516ea Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 22 Jun 2018 16:57:30 +0200 Subject: [PATCH 04/89] Rebased to JSS 4.5.0-a2 --- .gitignore | 1 + jss.spec | 11 +++++++++-- sources | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5d191ba..540976d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ jss-4.2.6.tar.gz /jss-4.4.3.tar.gz /jss-4.4.4.tar.gz /jss-4.5.0-a1.tar.gz +/jss-4.5.0-a2.tar.gz diff --git a/jss.spec b/jss.spec index dc5560a..95b1668 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.0 -Release: 0.1%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -a1 +Release: 0.2%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -a2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -43,6 +43,8 @@ BuildRequires: slf4j BuildRequires: slf4j-jdk14 %endif BuildRequires: apache-commons-lang +BuildRequires: apache-commons-codec +BuildRequires: ldapjdk %if 0%{?fedora} >= 25 || 0%{?rhel} > 7 BuildRequires: perl-interpreter @@ -56,6 +58,8 @@ Requires: slf4j Requires: slf4j-jdk14 %endif Requires: apache-commons-lang +Requires: apache-commons-codec +Requires: ldapjdk %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -164,6 +168,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Jun 22 2018 Dogtag PKI Team 4.5.0-0.2 +- Rebased to JSS 4.5.0-a2 + * Fri Jun 15 2018 Dogtag PKI Team 4.5.0-0.1 - Rebased to JSS 4.5.0-a1 diff --git a/sources b/sources index 607af78..da70cb7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.0-a1.tar.gz) = f5a8649c07392425b6f16a5fab33e6775428c90d26bfbeb442d31992ed4ef214c84b727dca6eda9924a95fe0e4a8f83a28661a2d9d5b5f15e73886f7eec1a87f +SHA512 (jss-4.5.0-a2.tar.gz) = 88af85f0819f46e2829bbe99566098aceb531c734b4820d08c7244374f11961dbc17535c198d832b1c1e579ba0598dd46048bfdbac5ea868823959c49ffebb49 From b44748093f6a6ae97c9b7fa41da2a4b26215c39a Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 5 Jul 2018 17:47:39 +0200 Subject: [PATCH 05/89] Rebased to JSS 4.5.0-a3 --- .gitignore | 1 + jss.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 540976d..fc4dd1f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ jss-4.2.6.tar.gz /jss-4.4.4.tar.gz /jss-4.5.0-a1.tar.gz /jss-4.5.0-a2.tar.gz +/jss-4.5.0-a3.tar.gz diff --git a/jss.spec b/jss.spec index 95b1668..ed29f10 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.0 -Release: 0.2%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -a2 +Release: 0.3%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -a3 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -28,8 +28,8 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # Patch: jss-VERSION-RELEASE.patch Conflicts: idm-console-framework < 1.1.17-4 -Conflicts: pki-base < 10.4.0 -Conflicts: tomcatjss < 7.2.1 +Conflicts: pki-base < 10.6.3 +Conflicts: tomcatjss < 7.3.2 # autosetup BuildRequires: git @@ -168,6 +168,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Jul 5 2018 Dogtag PKI Team 4.5.0-0.3 +- Rebased to JSS 4.5.0-a3 + * Fri Jun 22 2018 Dogtag PKI Team 4.5.0-0.2 - Rebased to JSS 4.5.0-a2 diff --git a/sources b/sources index da70cb7..db64094 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.0-a2.tar.gz) = 88af85f0819f46e2829bbe99566098aceb531c734b4820d08c7244374f11961dbc17535c198d832b1c1e579ba0598dd46048bfdbac5ea868823959c49ffebb49 +SHA512 (jss-4.5.0-a3.tar.gz) = 76e201b39cd7fbfc48ca1714030c3d9cfbc8a7acb175e371ace5a0dc3c86531c48f1237724338a59959f918e17351d9332fe99f8e059b821edb85230d4d202d9 From 02582610aee457eeb9f6a82a9d514c5e15cf803b Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Sat, 7 Jul 2018 16:44:47 +0200 Subject: [PATCH 06/89] Removed unused files --- MPL-1.1.txt | 470 ------------------------------------------------ gpl.txt | 339 ----------------------------------- lgpl.txt | 504 ---------------------------------------------------- 3 files changed, 1313 deletions(-) delete mode 100644 MPL-1.1.txt delete mode 100644 gpl.txt delete mode 100644 lgpl.txt diff --git a/MPL-1.1.txt b/MPL-1.1.txt deleted file mode 100644 index 7714141..0000000 --- a/MPL-1.1.txt +++ /dev/null @@ -1,470 +0,0 @@ - MOZILLA PUBLIC LICENSE - Version 1.1 - - --------------- - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] - diff --git a/gpl.txt b/gpl.txt deleted file mode 100644 index d511905..0000000 --- a/gpl.txt +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/lgpl.txt b/lgpl.txt deleted file mode 100644 index 5ab7695..0000000 --- a/lgpl.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - From 53f0a85f88b8efd02fd3a99bb64603e96d9c9c76 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 06:43:12 +0000 Subject: [PATCH 07/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index ed29f10..e373259 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.0 -Release: 0.3%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.4%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -a3 # To generate the source tarball: @@ -167,6 +167,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 4.5.0-0.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Jul 5 2018 Dogtag PKI Team 4.5.0-0.3 - Rebased to JSS 4.5.0-a3 From 7f77943096ecbb336b309629a5777bbd18b80cb7 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 11 Jul 2018 03:23:47 +0200 Subject: [PATCH 08/89] Rebased to JSS 4.5.0-a4 --- .gitignore | 1 + jss.spec | 42 ++++++++++++++++++++---------------------- sources | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index fc4dd1f..c12f2fb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ jss-4.2.6.tar.gz /jss-4.5.0-a1.tar.gz /jss-4.5.0-a2.tar.gz /jss-4.5.0-a3.tar.gz +/jss-4.5.0-a4.tar.gz diff --git a/jss.spec b/jss.spec index e373259..7af0455 100644 --- a/jss.spec +++ b/jss.spec @@ -8,7 +8,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.0 Release: 0.4%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -a3 +%global _phase -a4 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -27,24 +27,26 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Conflicts: idm-console-framework < 1.1.17-4 -Conflicts: pki-base < 10.6.3 -Conflicts: tomcatjss < 7.3.2 +################################################################################ +# Build Dependencies +################################################################################ # autosetup BuildRequires: git +BuildRequires: gcc-c++ BuildRequires: nss-devel >= 3.28.4-6 BuildRequires: nspr-devel >= 4.13.1 BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: slf4j -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?rhel} && 0%{?rhel} <= 7 +# no slf4j-jdk14 +%else BuildRequires: slf4j-jdk14 %endif BuildRequires: apache-commons-lang BuildRequires: apache-commons-codec -BuildRequires: ldapjdk %if 0%{?fedora} >= 25 || 0%{?rhel} > 7 BuildRequires: perl-interpreter @@ -54,12 +56,17 @@ Requires: nss >= 3.28.4-6 Requires: java-headless Requires: jpackage-utils Requires: slf4j -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?rhel} && 0%{?rhel} <= 7 +# no slf4j-jdk14 +%else Requires: slf4j-jdk14 %endif Requires: apache-commons-lang Requires: apache-commons-codec -Requires: ldapjdk + +Conflicts: idm-console-framework < 1.1.17-4 +Conflicts: pki-base < 10.6.3 +Conflicts: tomcatjss < 7.3.2 %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -154,22 +161,20 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %defattr(-,root,root,-) %doc jss.html MPL-1.1.txt gpl.txt lgpl.txt -%{_libdir}/jss/* +%{_libdir}/* %{_jnidir}/* -%{_libdir}/jss/lib*.so ################################################################################ %files javadoc %defattr(-,root,root,-) -%dir %{_javadocdir}/%{name}-%{version} -%{_javadocdir}/%{name}-%{version}/* +%{_javadocdir}/%{name}-%{version}/ ################################################################################ %changelog -* Fri Jul 13 2018 Fedora Release Engineering - 4.5.0-0.4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - +* Fri Jul 20 2018 Dogtag PKI Team 4.5.0-0.4 +- Rebased to JSS 4.5.0-a4 +- Red Hat Bugzilla #1604462 - jss: FTBFS in Fedora rawhide * Thu Jul 5 2018 Dogtag PKI Team 4.5.0-0.3 - Rebased to JSS 4.5.0-a3 @@ -179,10 +184,3 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} * Fri Jun 15 2018 Dogtag PKI Team 4.5.0-0.1 - Rebased to JSS 4.5.0-a1 - -* Tue May 29 2018 Dogtag PKI Team 4.4.4-1 -- Rebased to JSS 4.4.4 - -* Thu Apr 05 2018 Dogtag PKI Team 4.4.3-1 -- Rebased to JSS 4.4.3 -- Red Hat Bugzilla #1548548 - Partial Fedora build flags injection diff --git a/sources b/sources index db64094..6625c82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.0-a3.tar.gz) = 76e201b39cd7fbfc48ca1714030c3d9cfbc8a7acb175e371ace5a0dc3c86531c48f1237724338a59959f918e17351d9332fe99f8e059b821edb85230d4d202d9 +SHA512 (jss-4.5.0-a4.tar.gz) = 9a3e8adb87ff18102c7c497f8db40e07ee1efab157dae04e8b15ee49f3dc99069865a829b50ed9b4ee9ef3c649619697f88c31b8ff5461c426b63fec298d5f84 From 73c0ab90fe6c8aebc98211b77b68f362f2f5de86 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 7 Aug 2018 17:19:08 +0200 Subject: [PATCH 09/89] Rebased to JSS 4.5.0-b1 --- .gitignore | 1 + copr-build.sh | 9 +++++++++ jss.spec | 18 +++++++++++++----- sources | 2 +- sources-update.sh | 7 +++++++ 5 files changed, 31 insertions(+), 6 deletions(-) create mode 100755 copr-build.sh create mode 100755 sources-update.sh diff --git a/.gitignore b/.gitignore index c12f2fb..ce97b1d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ jss-4.2.6.tar.gz /jss-4.5.0-a2.tar.gz /jss-4.5.0-a3.tar.gz /jss-4.5.0-a4.tar.gz +/jss-4.5.0-b1.tar.gz diff --git a/copr-build.sh b/copr-build.sh new file mode 100755 index 0000000..156c705 --- /dev/null +++ b/copr-build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +REPO=$1 + +if [ "$REPO" == "" ]; then + REPO="pki-10.6" +fi + +fedpkg copr-build --nowait $REPO diff --git a/jss.spec b/jss.spec index 7af0455..0ac8ea0 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.0 -Release: 0.4%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -a4 +Release: 0.6%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -b1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -35,8 +35,9 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas BuildRequires: git BuildRequires: gcc-c++ -BuildRequires: nss-devel >= 3.28.4-6 BuildRequires: nspr-devel >= 4.13.1 +BuildRequires: nss-devel >= 3.28.4-6 +BuildRequires: nss-tools >= 3.28.4-6 BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: slf4j @@ -65,8 +66,8 @@ Requires: apache-commons-lang Requires: apache-commons-codec Conflicts: idm-console-framework < 1.1.17-4 -Conflicts: pki-base < 10.6.3 -Conflicts: tomcatjss < 7.3.2 +Conflicts: pki-base < 10.6.5 +Conflicts: tomcatjss < 7.3.4 %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -131,6 +132,7 @@ export USE_64 make -C coreconf make make javadoc +make test_jss ################################################################################ %install @@ -172,6 +174,12 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Aug 7 2018 Dogtag PKI Team 4.5.0-0.6 +- Rebased to JSS 4.5.0-b1 + +* Tue Aug 7 2018 Dogtag PKI Team 4.5.0-0.5 +- Red Hat Bugzilla #1612063 - Do not override system crypto policy (support TLS 1.3) + * Fri Jul 20 2018 Dogtag PKI Team 4.5.0-0.4 - Rebased to JSS 4.5.0-a4 - Red Hat Bugzilla #1604462 - jss: FTBFS in Fedora rawhide diff --git a/sources b/sources index 6625c82..623be8c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.0-a4.tar.gz) = 9a3e8adb87ff18102c7c497f8db40e07ee1efab157dae04e8b15ee49f3dc99069865a829b50ed9b4ee9ef3c649619697f88c31b8ff5461c426b63fec298d5f84 +SHA512 (jss-4.5.0-b1.tar.gz) = e5f5efbcf3e75c2e343e5531e11e131cd7704d4397adc419011eb1190d4aca44e4b9344ca2b985aaeb9823b377d01057f9736515c01d61676cd08f34dafe5300 diff --git a/sources-update.sh b/sources-update.sh new file mode 100755 index 0000000..96129ca --- /dev/null +++ b/sources-update.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +SOURCE=$1 +TARGET=`basename $1` + +cp $SOURCE $TARGET +sha512sum --tag $TARGET > sources From eec3e6f0c8e38044c7fd9b8852749cf1960bc3a0 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 10 Aug 2018 22:53:52 +0200 Subject: [PATCH 10/89] Rebased to JSS 4.5.0 --- .gitignore | 1 + jss.spec | 18 +++++++++++------- sources | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index ce97b1d..521c173 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ jss-4.2.6.tar.gz /jss-4.5.0-a3.tar.gz /jss-4.5.0-a4.tar.gz /jss-4.5.0-b1.tar.gz +/jss-4.5.0.tar.gz diff --git a/jss.spec b/jss.spec index 0ac8ea0..8e63e81 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.0 -Release: 0.6%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -b1 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +# global _phase -a1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -65,9 +65,10 @@ Requires: slf4j-jdk14 Requires: apache-commons-lang Requires: apache-commons-codec -Conflicts: idm-console-framework < 1.1.17-4 -Conflicts: pki-base < 10.6.5 +Conflicts: ldapjdk < 4.20 +Conflicts: idm-console-framework < 1.2 Conflicts: tomcatjss < 7.3.4 +Conflicts: pki-base < 10.6.5 %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -174,17 +175,20 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog -* Tue Aug 7 2018 Dogtag PKI Team 4.5.0-0.6 +* Fri Aug 10 2018 Dogtag PKI Team 4.5.0-1 +- Rebased to JSS 4.5.0 + +* Tue Aug 07 2018 Dogtag PKI Team 4.5.0-0.6 - Rebased to JSS 4.5.0-b1 -* Tue Aug 7 2018 Dogtag PKI Team 4.5.0-0.5 +* Tue Aug 07 2018 Dogtag PKI Team 4.5.0-0.5 - Red Hat Bugzilla #1612063 - Do not override system crypto policy (support TLS 1.3) * Fri Jul 20 2018 Dogtag PKI Team 4.5.0-0.4 - Rebased to JSS 4.5.0-a4 - Red Hat Bugzilla #1604462 - jss: FTBFS in Fedora rawhide -* Thu Jul 5 2018 Dogtag PKI Team 4.5.0-0.3 +* Thu Jul 05 2018 Dogtag PKI Team 4.5.0-0.3 - Rebased to JSS 4.5.0-a3 * Fri Jun 22 2018 Dogtag PKI Team 4.5.0-0.2 diff --git a/sources b/sources index 623be8c..e88e6d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.0-b1.tar.gz) = e5f5efbcf3e75c2e343e5531e11e131cd7704d4397adc419011eb1190d4aca44e4b9344ca2b985aaeb9823b377d01057f9736515c01d61676cd08f34dafe5300 +SHA512 (jss-4.5.0.tar.gz) = abebd75104f747a95dc3160dc6218c549235f5c9ee2d416299bfe132072b76fb7f0fec4ce2664931bf971280836ab0eb26746f964c13300393fa6a5937f81cda From 6143ea684c2f67e1df68483ad0324b9c8bae73cd Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 29 Nov 2018 15:50:39 -0500 Subject: [PATCH 11/89] Rebased to JSS v4.5.1 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 56 +++++++++++++++++++++--------------------------------- sources | 2 +- 3 files changed, 24 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 521c173..f89e975 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ jss-4.2.6.tar.gz /jss-4.5.0-a4.tar.gz /jss-4.5.0-b1.tar.gz /jss-4.5.0.tar.gz +/jss-4.5.1.tar.gz diff --git a/jss.spec b/jss.spec index 8e63e81..b829d3c 100644 --- a/jss.spec +++ b/jss.spec @@ -6,7 +6,7 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.5.0 +Version: 4.5.1 Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 @@ -33,6 +33,8 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # autosetup BuildRequires: git +BuildRequires: make +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: nspr-devel >= 4.13.1 @@ -41,6 +43,7 @@ BuildRequires: nss-tools >= 3.28.4-6 BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: slf4j +BuildRequires: glassfish-jaxb-api %if 0%{?rhel} && 0%{?rhel} <= 7 # no slf4j-jdk14 %else @@ -57,6 +60,7 @@ Requires: nss >= 3.28.4-6 Requires: java-headless Requires: jpackage-utils Requires: slf4j +Requires: glassfish-jaxb-api %if 0%{?rhel} && 0%{?rhel} <= 7 # no slf4j-jdk14 %else @@ -97,43 +101,22 @@ This package contains the API documentation for JSS. %set_build_flags [ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java -[ -z "$USE_INSTALLED_NSPR" ] && export USE_INSTALLED_NSPR=1 -[ -z "$USE_INSTALLED_NSS" ] && export USE_INSTALLED_NSS=1 # Enable compiler optimizations export BUILD_OPT=1 # Generate symbolic info for debuggers -XCFLAGS="-g $RPM_OPT_FLAGS" -export XCFLAGS - -PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 -PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 - -export PKG_CONFIG_ALLOW_SYSTEM_LIBS -export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS - -NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'` -NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'` - -NSS_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nss | sed 's/-I//'` -NSS_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nss | sed 's/-L//'` - -export NSPR_INCLUDE_DIR -export NSPR_LIB_DIR -export NSS_INCLUDE_DIR -export NSS_LIB_DIR - -%if 0%{?__isa_bits} == 64 -USE_64=1 -export USE_64 -%endif +CFLAGS="-g $RPM_OPT_FLAGS" +export CFLAGS # The Makefile is not thread-safe -make -C coreconf -make -make javadoc -make test_jss +rm -rf build && mkdir -p build && cd build +%cmake \ + -DJAVA_HOME=%{java_home} \ + -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ + .. + +%{__make} all test javadoc ################################################################################ %install @@ -142,19 +125,19 @@ make test_jss # jars install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir} -install -m 644 ../dist/xpclass.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar +install -m 644 build/jss4.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar # We have to use the name libjss4.so because this is dynamically # loaded by the jar file. install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss -install -m 0755 ../dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ +install -m 0755 build/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ pushd ${RPM_BUILD_ROOT}%{_libdir}/jss ln -fs %{_jnidir}/jss4.jar jss4.jar popd # javadoc install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -rp ../dist/jssdoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -rp build/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -p jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} @@ -175,6 +158,11 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Nov 29 2018 Dogtag PKI Team 4.5.1-1 +- Rebased to JSS 4.5.1 +- Red Hat Bugzilla #1582323 - DER encoding error for enumerated types with a value of zero +- Red Hat Bugzilla #1534765 - javadoc for org.mozilla.jss.pkix.cms.SignedData.getSignerInfos() is incorrect + * Fri Aug 10 2018 Dogtag PKI Team 4.5.0-1 - Rebased to JSS 4.5.0 diff --git a/sources b/sources index e88e6d8..9d27161 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.0.tar.gz) = abebd75104f747a95dc3160dc6218c549235f5c9ee2d416299bfe132072b76fb7f0fec4ce2664931bf971280836ab0eb26746f964c13300393fa6a5937f81cda +SHA512 (jss-4.5.1.tar.gz) = b16c422853fad83b750775633315278becfe2156a5c1ee6e6000a345a77dbfd6c1c059d458edf9fe770a4a66f58727568d268853220ffa7f4acb57a40c2f7f96 From ea7b88668f0acdee25c04dc8af437807fc354520 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 14 Jan 2019 15:12:05 -0500 Subject: [PATCH 12/89] Rebased to JSS v4.5.2 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f89e975..dbd1390 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ jss-4.2.6.tar.gz /jss-4.5.0-b1.tar.gz /jss-4.5.0.tar.gz /jss-4.5.1.tar.gz +/jss-4.5.2.tar.gz diff --git a/jss.spec b/jss.spec index b829d3c..7f52e74 100644 --- a/jss.spec +++ b/jss.spec @@ -6,7 +6,7 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.5.1 +Version: 4.5.2 Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 @@ -158,6 +158,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Mon Jan 14 2019 Dogtag PKI Team 4.5.2-1 +- Rebased to JSS 4.5.2 + * Thu Nov 29 2018 Dogtag PKI Team 4.5.1-1 - Rebased to JSS 4.5.1 - Red Hat Bugzilla #1582323 - DER encoding error for enumerated types with a value of zero diff --git a/sources b/sources index 9d27161..a43c93f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.1.tar.gz) = b16c422853fad83b750775633315278becfe2156a5c1ee6e6000a345a77dbfd6c1c059d458edf9fe770a4a66f58727568d268853220ffa7f4acb57a40c2f7f96 +SHA512 (jss-4.5.2.tar.gz) = 344b31a218b7aebb15cc24e24d5697978889bf37856ddefc9521899d2a2a80b1bc9ed0b498a6e0cd19deed169fe1bc56f1ad42e7b8cfc188fadd28245d7bec31 From 87126e21bede8e48b0e51d645af3cc15937d186d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:49 +0100 Subject: [PATCH 13/89] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- jss.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/jss.spec b/jss.spec index 7f52e74..a0de8db 100644 --- a/jss.spec +++ b/jss.spec @@ -84,7 +84,6 @@ This only works with gcj. Other JREs require that JCE providers be signed. ################################################################################ Summary: Java Security Services (JSS) Javadocs -Group: Documentation Requires: jss = %{version}-%{release} %description javadoc From ffb356ed5b529f4e89ce6192fda36fc9bc9d268c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 04:51:03 +0000 Subject: [PATCH 14/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index a0de8db..fb5788a 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.2 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -157,6 +157,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 4.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jan 14 2019 Dogtag PKI Team 4.5.2-1 - Rebased to JSS 4.5.2 From 034c9719591a491e680979b0342441caa2b3e968 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Fri, 1 Feb 2019 11:14:43 -0500 Subject: [PATCH 15/89] Add nuxwdog patch from PKI Signed-off-by: Alexander Scheel --- ...ki-sync-netscape-security-util-Utils.patch | 94 +++++++++++++++++++ jss.spec | 12 ++- 2 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 jss-pki-sync-netscape-security-util-Utils.patch diff --git a/jss-pki-sync-netscape-security-util-Utils.patch b/jss-pki-sync-netscape-security-util-Utils.patch new file mode 100644 index 0000000..41545a8 --- /dev/null +++ b/jss-pki-sync-netscape-security-util-Utils.patch @@ -0,0 +1,94 @@ +From a5b0caf63837acfd876ee15e3823fbfdf5685432 Mon Sep 17 00:00:00 2001 +From: Dinesh Prasanth M K +Date: Wed, 30 Jan 2019 12:31:29 -0500 +Subject: [PATCH] Add exec method to execute shell commands with input + +- This is an effort to move duplicate code from PKI code + base to JSS code base + +- This chunk of code was originally introduced in PKI + code: https://github.com/dogtagpki/pki/pull/131 + +- This PR is a joined effort of: + https://github.com/dogtagpki/pki/pull/122 + +Signed-off-by: Dinesh Prasanth M K +--- + .../jss/netscape/security/util/Utils.java | 57 +++++++++++++++++++ + 1 file changed, 57 insertions(+) + +diff --git a/org/mozilla/jss/netscape/security/util/Utils.java b/org/mozilla/jss/netscape/security/util/Utils.java +index b1a3c341..b45381ae 100644 +--- a/org/mozilla/jss/netscape/security/util/Utils.java ++++ b/org/mozilla/jss/netscape/security/util/Utils.java +@@ -25,6 +25,7 @@ + import java.io.FileWriter; + import java.io.IOException; + import java.io.InputStream; ++import java.io.InputStreamReader; + import java.io.OutputStream; + import java.io.OutputStreamWriter; + import java.io.PrintWriter; +@@ -96,6 +97,62 @@ public static boolean exec(String cmd) { + return false; + } + ++ public static String readFromStream(InputStream inputStream) throws IOException { ++ StringBuilder sb = new StringBuilder(); ++ BufferedReader br = null; ++ try { ++ br = new BufferedReader(new InputStreamReader(inputStream)); ++ String line = null; ++ while ((line = br.readLine()) != null) { ++ sb.append(line + System.getProperty("line.separator")); ++ } ++ } finally { ++ br.close(); ++ } ++ return sb.toString().trim(); ++ } ++ ++ public static void writeToStream(OutputStream outputStream, String input) throws IOException { ++ BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream)); ++ writer.write(input); ++ writer.flush(); ++ writer.close(); ++ } ++ ++ /** ++ * Utility method to execute system commands ++ * ++ * @param cmd The command to be executed and its arguments ++ * @param input The stdin input to be passed to the cmd ++ * @return stdout or stderr of the command executed ++ * @throws IOException ++ * @throws InterruptedException ++ */ ++ public static String exec(String[] cmd, String input) throws IOException, InterruptedException { ++ ++ ProcessBuilder pb = new ProcessBuilder(cmd); ++ ++ Process p = pb.start(); ++ ++ if (input != null) { ++ writeToStream(p.getOutputStream(), input); ++ } ++ ++ p.waitFor(); ++ ++ String output; ++ if (p.exitValue() == 0) { ++ output = readFromStream(p.getInputStream()); ++ } else { ++ output = readFromStream(p.getErrorStream()); ++ } ++ p.destroy(); ++ ++ return output; ++ } ++ ++ ++ + public static String SpecialURLDecode(String s) { + if (s == null) + return null; diff --git a/jss.spec b/jss.spec index fb5788a..ae5c90b 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.2 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} +Release: 3%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -26,6 +26,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +Patch1: jss-pki-sync-netscape-security-util-Utils.patch ################################################################################ # Build Dependencies @@ -38,8 +39,8 @@ BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: nspr-devel >= 4.13.1 -BuildRequires: nss-devel >= 3.28.4-6 -BuildRequires: nss-tools >= 3.28.4-6 +BuildRequires: nss-devel >= 3.30 +BuildRequires: nss-tools >= 3.30 BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: slf4j @@ -56,7 +57,7 @@ BuildRequires: apache-commons-codec BuildRequires: perl-interpreter %endif -Requires: nss >= 3.28.4-6 +Requires: nss >= 3.30 Requires: java-headless Requires: jpackage-utils Requires: slf4j @@ -157,6 +158,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Feb 01 2019 Dogtag PKI Team 4.5.2-3 +- Include nuxwdog patch for netscape.security.util.Utils from PKI + * Fri Feb 01 2019 Fedora Release Engineering - 4.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 0bf2396d8a4993d5fcf7612b3fde9489a2527838 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 19 Mar 2019 14:14:43 -0400 Subject: [PATCH 16/89] Rebase to JSS v4.5.3 Signed-off-by: Alexander Scheel --- .gitignore | 1 + ...ki-sync-netscape-security-util-Utils.patch | 94 ------------------- jss.spec | 6 +- sources | 2 +- 4 files changed, 5 insertions(+), 98 deletions(-) delete mode 100644 jss-pki-sync-netscape-security-util-Utils.patch diff --git a/.gitignore b/.gitignore index dbd1390..d1f14a6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ jss-4.2.6.tar.gz /jss-4.5.0.tar.gz /jss-4.5.1.tar.gz /jss-4.5.2.tar.gz +/jss-4.5.3.tar.gz diff --git a/jss-pki-sync-netscape-security-util-Utils.patch b/jss-pki-sync-netscape-security-util-Utils.patch deleted file mode 100644 index 41545a8..0000000 --- a/jss-pki-sync-netscape-security-util-Utils.patch +++ /dev/null @@ -1,94 +0,0 @@ -From a5b0caf63837acfd876ee15e3823fbfdf5685432 Mon Sep 17 00:00:00 2001 -From: Dinesh Prasanth M K -Date: Wed, 30 Jan 2019 12:31:29 -0500 -Subject: [PATCH] Add exec method to execute shell commands with input - -- This is an effort to move duplicate code from PKI code - base to JSS code base - -- This chunk of code was originally introduced in PKI - code: https://github.com/dogtagpki/pki/pull/131 - -- This PR is a joined effort of: - https://github.com/dogtagpki/pki/pull/122 - -Signed-off-by: Dinesh Prasanth M K ---- - .../jss/netscape/security/util/Utils.java | 57 +++++++++++++++++++ - 1 file changed, 57 insertions(+) - -diff --git a/org/mozilla/jss/netscape/security/util/Utils.java b/org/mozilla/jss/netscape/security/util/Utils.java -index b1a3c341..b45381ae 100644 ---- a/org/mozilla/jss/netscape/security/util/Utils.java -+++ b/org/mozilla/jss/netscape/security/util/Utils.java -@@ -25,6 +25,7 @@ - import java.io.FileWriter; - import java.io.IOException; - import java.io.InputStream; -+import java.io.InputStreamReader; - import java.io.OutputStream; - import java.io.OutputStreamWriter; - import java.io.PrintWriter; -@@ -96,6 +97,62 @@ public static boolean exec(String cmd) { - return false; - } - -+ public static String readFromStream(InputStream inputStream) throws IOException { -+ StringBuilder sb = new StringBuilder(); -+ BufferedReader br = null; -+ try { -+ br = new BufferedReader(new InputStreamReader(inputStream)); -+ String line = null; -+ while ((line = br.readLine()) != null) { -+ sb.append(line + System.getProperty("line.separator")); -+ } -+ } finally { -+ br.close(); -+ } -+ return sb.toString().trim(); -+ } -+ -+ public static void writeToStream(OutputStream outputStream, String input) throws IOException { -+ BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream)); -+ writer.write(input); -+ writer.flush(); -+ writer.close(); -+ } -+ -+ /** -+ * Utility method to execute system commands -+ * -+ * @param cmd The command to be executed and its arguments -+ * @param input The stdin input to be passed to the cmd -+ * @return stdout or stderr of the command executed -+ * @throws IOException -+ * @throws InterruptedException -+ */ -+ public static String exec(String[] cmd, String input) throws IOException, InterruptedException { -+ -+ ProcessBuilder pb = new ProcessBuilder(cmd); -+ -+ Process p = pb.start(); -+ -+ if (input != null) { -+ writeToStream(p.getOutputStream(), input); -+ } -+ -+ p.waitFor(); -+ -+ String output; -+ if (p.exitValue() == 0) { -+ output = readFromStream(p.getInputStream()); -+ } else { -+ output = readFromStream(p.getErrorStream()); -+ } -+ p.destroy(); -+ -+ return output; -+ } -+ -+ -+ - public static String SpecialURLDecode(String s) { - if (s == null) - return null; diff --git a/jss.spec b/jss.spec index ae5c90b..1d44cc4 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.5.2 -Release: 3%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.5.3 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -26,7 +26,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch1: jss-pki-sync-netscape-security-util-Utils.patch +# Patch1: jss-pki-sync-netscape-security-util-Utils.patch ################################################################################ # Build Dependencies diff --git a/sources b/sources index a43c93f..8c326c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.2.tar.gz) = 344b31a218b7aebb15cc24e24d5697978889bf37856ddefc9521899d2a2a80b1bc9ed0b498a6e0cd19deed169fe1bc56f1ad42e7b8cfc188fadd28245d7bec31 +SHA512 (jss-4.5.3.tar.gz) = 6a5d5065803a36a42f15c19fa870edf4844d650911c690a8033288ee0e2e6e115868de39a7c9c955e068568a859baf5fb3e8e970b4167dfc19782bb661ab6d71 From 14680af75b8579b84895c9d8d8eadcbb1779249f Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 19 Mar 2019 14:18:07 -0400 Subject: [PATCH 17/89] Updates to spec file from upstream Also adds changelog entry for the release of 4.5.3. Signed-off-by: Alexander Scheel --- jss.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jss.spec b/jss.spec index 1d44cc4..50f3e36 100644 --- a/jss.spec +++ b/jss.spec @@ -26,7 +26,6 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -# Patch1: jss-pki-sync-netscape-security-util-Utils.patch ################################################################################ # Build Dependencies @@ -53,9 +52,7 @@ BuildRequires: slf4j-jdk14 BuildRequires: apache-commons-lang BuildRequires: apache-commons-codec -%if 0%{?fedora} >= 25 || 0%{?rhel} > 7 -BuildRequires: perl-interpreter -%endif +BuildRequires: junit Requires: nss >= 3.30 Requires: java-headless @@ -116,7 +113,8 @@ rm -rf build && mkdir -p build && cd build -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ .. -%{__make} all test javadoc +%{__make} all javadoc +ctest --output-on-failure ################################################################################ %install @@ -158,7 +156,10 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog -* Fri Feb 01 2019 Dogtag PKI Team 4.5.2-3 +* Tue Mar 19 2019 Dogtag PKI Team - 4.5.3-1 +- Rebase to JSS 4.5.3 + +* Fri Feb 01 2019 Dogtag PKI Team - 4.5.2-3 - Include nuxwdog patch for netscape.security.util.Utils from PKI * Fri Feb 01 2019 Fedora Release Engineering - 4.5.2-2 From 7f9aaa6c42139f47d0130fe812b90ced5ddd1291 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 6 May 2019 16:24:58 -0400 Subject: [PATCH 18/89] Add fedpkg local artifacts to .gitignore Signed-off-by: Alexander Scheel --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index d1f14a6..fcc1b5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +# Local build files +jss-*.src.rpm +jss-*/ +x86_64/ +.build-*.log + +# Releases jss-4.2.6.tar.gz /jss-4.2.6.tar.gz /jss-4.4.0.tar.gz From 392c8b60cd5db53de4fb4634a464f91ddc9f66f4 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 6 May 2019 16:25:02 -0400 Subject: [PATCH 19/89] Add AIA OCSP extended certificate checking patches Signed-off-by: Alexander Scheel --- jss-aia-ocsp-1.patch | 659 +++++++++++++++++++++++++++++++++++++++++++ jss-aia-ocsp-2.patch | 141 +++++++++ jss.spec | 7 +- 3 files changed, 806 insertions(+), 1 deletion(-) create mode 100644 jss-aia-ocsp-1.patch create mode 100644 jss-aia-ocsp-2.patch diff --git a/jss-aia-ocsp-1.patch b/jss-aia-ocsp-1.patch new file mode 100644 index 0000000..f20207c --- /dev/null +++ b/jss-aia-ocsp-1.patch @@ -0,0 +1,659 @@ +From 8975c8ae1d0c8b916c5c73aff12046b01d3e6ef0 Mon Sep 17 00:00:00 2001 +From: Jack Magne +Date: Fri, 25 Jan 2019 14:54:11 -0800 +Subject: [PATCH] Resolve Bug 1666872 - CC: Enable AIA OCSP cert checking for + entire cert chain. + +This fix for jss, solves the one use case where the pki server is configured to perform ocsp checking ONLY with the contents of the AIA extension. Previously, jss could only check the ocsp server for the leaf node cert of the cert being verified. This fix allows the cert chain to be checked over ocsp for each cert in question. This is possible due to the fact that we have made a call in the PKIX library of nss to do the actual cert verfication. This call is made with all the needed flags to tell the PKIX library to make the ocsp verifications remotely over the network using the contents of the AIA extension. + +Later on we can use this code to handle the other cases, but for now we want to solve this one particular problem. If the server is configured in any other configuration than the one stated, the original verification code will be called as before. Below is an example of a configuration in server.xml, that will trigger this new code: + +< .... enableOCSP="true" ocspCacheSize="10000" ocspMinCacheEntryDuration="7200" .... > + +Note that due to ocsp caching, the cert chain verification may only be apparent after a restart of the server. A way to force an ocsp fetch every time is to set the value of ocspCacheSize=-1, which essentially disables the cache. + +Added a couple of minor fixes due to review comments. Possibly more to come. +Minor include directive change to compile on branch. +--- + org/mozilla/jss/CryptoManager.java | 48 +++++++ + org/mozilla/jss/PK11Finder.c | 95 ++++++++++++-- + org/mozilla/jss/ssl/callbacks.c | 67 ++++++++-- + org/mozilla/jss/ssl/common.c | 196 +++++++++++++++++++++++++++++ + org/mozilla/jss/ssl/jssl.h | 29 +++++ + org/mozilla/jss/util/java_ids.h | 9 ++ + 6 files changed, 422 insertions(+), 22 deletions(-) + +diff --git a/org/mozilla/jss/CryptoManager.java b/org/mozilla/jss/CryptoManager.java +index 9b86bf9e..c9a3fb2b 100644 +--- a/org/mozilla/jss/CryptoManager.java ++++ b/org/mozilla/jss/CryptoManager.java +@@ -1201,6 +1201,44 @@ private native boolean verifyCertTempNative(byte[] certPackage, + // OCSP management + /////////////////////////////////////////////////////////////////////// + ++ /* OCSP Policy related */ ++ ++ public enum OCSPPolicy { ++ NONE, ++ NORMAL, ++ LEAF_AND_CHAIN; ++ } ++ ++ private static OCSPPolicy ocspPolicy = OCSPPolicy.NONE; ++ ++ /** ++ * Gets the current ocsp Policy. ++ * Currently we only support 2 modes OCSP_LEAF_AND_CHAIN_POLICY. ++ * And OCSP_NORMAL_POLICY, which is current processing , by default. ++ * If we have AIA based OCSP enabled we will check all certs in the chain. ++ * using PKIX cert verfication calls in the various cert auth callbacks we ++ * have. ++ * @return - The current ocsp policy in effect. ++ */ ++ ++ public static synchronized int getOCSPPolicy() { ++ return ocspPolicy.ordinal(); ++ } ++ ++ /** ++ * Sets the current ocsp Policy. ++ * Currently we only support one mode OCSP_LEAF_AND_CHAIN_POLICY. ++ * If we have AIA based OCSP enabled we will check all certs in the chain. ++ * using PKIX cert verfication calls in the various cert auth callbacks we ++ * have. ++ * @param policy - Either cert and chain or normal default processing. ++ * ++ */ ++ ++ public static synchronized void setOCSPPolicy(OCSPPolicy policy) { ++ ocspPolicy = policy; ++ } ++ + /** + * Enables OCSP, note when you Initialize JSS for the first time, for + * backwards compatibility, the initialize will enable OCSP if you +@@ -1220,6 +1258,16 @@ public void configureOCSP( + String ocspResponderCertNickname ) + throws GeneralSecurityException + { ++ /* set the ocsp policy */ ++ ++ if(ocspCheckingEnabled && ++ ocspResponderURL == null && ++ ocspResponderCertNickname == null) { ++ setOCSPPolicy(OCSPPolicy.LEAF_AND_CHAIN); ++ } else { ++ setOCSPPolicy(OCSPPolicy.NORMAL); ++ } ++ + configureOCSPNative(ocspCheckingEnabled, + ocspResponderURL, + ocspResponderCertNickname ); +diff --git a/org/mozilla/jss/PK11Finder.c b/org/mozilla/jss/PK11Finder.c +index 45958181..0329e91d 100644 +--- a/org/mozilla/jss/PK11Finder.c ++++ b/org/mozilla/jss/PK11Finder.c +@@ -14,9 +14,9 @@ + #include + + #include +- + #include + #include "pk11util.h" ++#include "ssl/jssl.h" + #include + + /* +@@ -1574,6 +1574,9 @@ SECStatus verifyCertificateNow(JNIEnv *env, jobject self, jstring nickString, + goto finish; + } + ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ ++ + certificateUsage = required_certificateUsage; + + cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); +@@ -1587,8 +1590,24 @@ SECStatus verifyCertificateNow(JNIEnv *env, jobject self, jstring nickString, + /* 0 for certificateUsage in call to CERT_VerifyCertificateNow will + * retrieve the current valid usage into currUsage + */ +- rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, +- checkSig, certificateUsage, NULL, currUsage ); ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ rv = JSSL_verifyCertPKIX( cert, certificateUsage, ++ NULL /* pin arg */, ocspPolicy, NULL, currUsage); ++ ++ /* we need to do this just to get the cert usages, the pkix version ++ doesn't seem to honor the method to get the usages as of yet. ++ Let the PKIX call only determine the final fate. ++ */ ++ if(rv == SECSuccess) { ++ CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certificateUsage, NULL, currUsage ); ++ } ++ ++ } else { ++ rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certificateUsage, NULL, currUsage ); ++ } ++ + if ((rv == SECSuccess) && certificateUsage == 0x0000) { + if (*currUsage == + ( certUsageUserCertImport | +@@ -1639,6 +1658,8 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative(JNIEnv *env, + goto finish; + } + ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ + certificateUsage = required_certificateUsage; + + cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); +@@ -1653,8 +1674,23 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative(JNIEnv *env, + * just get the current usage (which we are not passing back for now + * but will bypass the certificate usage check + */ +- rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, +- checkSig, certificateUsage, NULL, &currUsage ); ++ ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ rv= JSSL_verifyCertPKIX( cert, certificateUsage, ++ NULL /* pin arg */, ocspPolicy, NULL, &currUsage); ++ ++ /* we need to do this just to get the cert usages, the pkix version ++ doesn't seem to honor the method to get the usages as of yet. ++ Let the PKIX call only determine the final fate. ++ */ ++ if(rv == SECSuccess) { ++ CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certificateUsage, NULL, &currUsage ); ++ } ++ } else { ++ rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certificateUsage, NULL, &currUsage ); ++ } + } + + finish: +@@ -1720,12 +1756,14 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative2(JNIEnv *env, + SECStatus rv = SECFailure; + CERTCertificate *cert = NULL; + char *nickname = NULL; +- ++ + if (nickString == NULL) { + JSS_throwMsg(env, INVALID_NICKNAME_EXCEPTION, "Missing certificate nickname"); + goto finish; + } + ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ + nickname = (char *) (*env)->GetStringUTFChars(env, nickString, NULL); + if (nickname == NULL) { + JSS_throwMsg(env, INVALID_NICKNAME_EXCEPTION, "Missing certificate nickname"); +@@ -1747,8 +1785,25 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative2(JNIEnv *env, + /* 0 for certificateUsage in call to CERT_VerifyCertificateNow will + * retrieve the current valid usage into currUsage + */ +- rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, +- checkSig, certificateUsage, NULL, &currUsage); ++ ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ rv = JSSL_verifyCertPKIX( cert, certificateUsage, ++ NULL /* pin arg */, ocspPolicy, NULL, &currUsage); ++ ++ /* we need to do this just to get the cert usages, the pkix version ++ doesn't seem to honor the method to get the usages as of yet. ++ Let the PKIX call only determine the final fate. ++ */ ++ if(rv == SECSuccess) { ++ CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certificateUsage, NULL, &currUsage ); ++ ++ } ++ ++ } else { ++ rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certificateUsage, NULL, &currUsage); ++ } + + if (rv != SECSuccess) { + JSS_throwMsgPrErr(env, CERTIFICATE_EXCEPTION, "Invalid certificate"); +@@ -1803,6 +1858,9 @@ Java_org_mozilla_jss_CryptoManager_verifyCertNowNative(JNIEnv *env, + if( nickname == NULL ) { + goto finish; + } ++ ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ + certUsage = cUsage; + cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); + +@@ -1812,8 +1870,13 @@ Java_org_mozilla_jss_CryptoManager_verifyCertNowNative(JNIEnv *env, + PR_smprintf_free(message); + goto finish; + } else { +- rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), cert, +- checkSig, certUsage, NULL ); ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ rv = JSSL_verifyCertPKIX( cert, certUsage, ++ NULL /* pin arg */, ocspPolicy, NULL, NULL); ++ } else { ++ rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), cert, ++ checkSig, certUsage, NULL ); ++ } + } + + finish: +@@ -1858,6 +1921,8 @@ Java_org_mozilla_jss_CryptoManager_verifyCertTempNative(JNIEnv *env, + derCerts[0] = JSS_ByteArrayToSECItem(env, packageArray); + derCerts[1] = NULL; + ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ + rv = CERT_ImportCerts(certdb, cUsage, + 1, derCerts, &certArray, PR_FALSE /*temp Certs*/, + PR_FALSE /*caOnly*/, NULL); +@@ -1869,8 +1934,14 @@ Java_org_mozilla_jss_CryptoManager_verifyCertTempNative(JNIEnv *env, + } + + certUsage = cUsage; +- rv = CERT_VerifyCertNow(certdb, certArray[0], +- checkSig, certUsage, NULL ); ++ ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ rv = JSSL_verifyCertPKIX( certArray[0], certUsage, ++ NULL /* pin arg */, ocspPolicy, NULL, NULL); ++ } else { ++ rv = CERT_VerifyCertNow(certdb, certArray[0], ++ checkSig, certUsage, NULL ); ++ } + + finish: + /* this checks for NULL */ +diff --git a/org/mozilla/jss/ssl/callbacks.c b/org/mozilla/jss/ssl/callbacks.c +index 634f31ec..42594a14 100644 +--- a/org/mozilla/jss/ssl/callbacks.c ++++ b/org/mozilla/jss/ssl/callbacks.c +@@ -20,6 +20,40 @@ + #include + #include + ++int ++JSSL_getOCSPPolicy() { ++ JNIEnv *env; ++ jint policy = -1; ++ ++ jmethodID getOCSPPolicyID; ++ jclass cryptoManagerClass; ++ ++ /* get the JNI environment */ ++ if((*JSS_javaVM)->AttachCurrentThread(JSS_javaVM, (void**)&env, NULL) != 0){ ++ PR_ASSERT(PR_FALSE); ++ goto finish; ++ } ++ ++ cryptoManagerClass = (*env)->FindClass(env, CRYPTO_MANAGER_NAME); ++ if( cryptoManagerClass == NULL ) { ++ ASSERT_OUTOFMEM(env); ++ goto finish; ++ } ++ getOCSPPolicyID = (*env)->GetStaticMethodID(env, cryptoManagerClass, ++ GET_OCSP_POLICY_NAME,GET_OCSP_POLICY_SIG); ++ ++ if( getOCSPPolicyID == NULL ) { ++ ASSERT_OUTOFMEM(env); ++ goto finish; ++ } ++ ++ policy = (*env)->CallStaticIntMethod(env, cryptoManagerClass, ++ getOCSPPolicyID); ++ ++finish: ++ return (int) policy; ++} ++ + static SECStatus + secCmpCertChainWCANames(CERTCertificate *cert, CERTDistNames *caNames) + { +@@ -443,8 +477,9 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + SECCertUsage certUsage; + CERTCertificate *peerCert=NULL; + ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ + certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; +- + + /* SSL_PeerCertificate() returns a shallow copy of the cert, so we + must destroy it before we exit this function */ +@@ -452,8 +487,13 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + peerCert = SSL_PeerCertificate(fd); + + if (peerCert) { +- rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), peerCert, +- checkSig, certUsage, NULL /*pinarg*/); ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ rv = JSSL_verifyCertPKIX( peerCert, certUsage, ++ NULL /* pin arg */, ocspPolicy, NULL, NULL); ++ } else { ++ rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), peerCert, ++ checkSig, certUsage, NULL /*pinarg*/); ++ } + } + + /* if we're a server, then we don't need to check the CN of the +@@ -569,6 +609,8 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + log.tail = NULL; + log.count = 0; + ++ int ocspPolicy = JSSL_getOCSPPolicy(); ++ + /* get the JNI environment */ + if((*JSS_javaVM)->AttachCurrentThread(JSS_javaVM, (void**)&env, NULL) != 0){ + PR_ASSERT(PR_FALSE); +@@ -589,13 +631,18 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + * logging parameter) + */ + +- verificationResult = CERT_VerifyCert( CERT_GetDefaultCertDB(), +- peerCert, +- checkSig, +- certUsage, +- PR_Now(), +- NULL /*pinarg*/, +- &log); ++ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { ++ verificationResult = JSSL_verifyCertPKIX( peerCert, certUsage, ++ NULL /* pin arg */, ocspPolicy, &log, NULL); ++ } else { ++ verificationResult = CERT_VerifyCert( CERT_GetDefaultCertDB(), ++ peerCert, ++ checkSig, ++ certUsage, ++ PR_Now(), ++ NULL /*pinarg*/, ++ &log); ++ } + + if (verificationResult == SECSuccess && log.count > 0) { + verificationResult = SECFailure; +diff --git a/org/mozilla/jss/ssl/common.c b/org/mozilla/jss/ssl/common.c +index 5c6efa85..aec88552 100644 +--- a/org/mozilla/jss/ssl/common.c ++++ b/org/mozilla/jss/ssl/common.c +@@ -15,6 +15,7 @@ + #include + #include "_jni/org_mozilla_jss_ssl_SSLSocket.h" + #include "jssl.h" ++#include "cert.h" + + #ifdef WIN32 + #include +@@ -889,3 +890,198 @@ JSS_SSL_processExceptions(JNIEnv *env, PRFilePrivate *priv) + PR_ASSERT(ret == 0); + } + } ++ ++/* Get the trusted anchor for pkix */ ++ ++CERTCertificate * getRoot(CERTCertificate *cert, ++ SECCertificateUsage certUsage) ++{ ++ CERTCertificate *root = NULL; ++ CERTCertListNode *node = NULL; ++ ++ if( !cert ) { ++ goto finish; ++ } ++ ++ CERTCertList *certList = CERT_GetCertChainFromCert(cert, ++ PR_Now(), ++ certUsage); ++ ++ if( certList == NULL) { ++ goto finish; ++ } ++ ++ for (node = CERT_LIST_HEAD(certList); ++ !CERT_LIST_END(node, certList); ++ node = CERT_LIST_NEXT(node)) { ++ ++ /* try to find the root */ ++ if( node->cert && node->cert->isRoot ) { ++ root = CERT_DupCertificate(node->cert) ; ++ } ++ } ++ ++finish: ++ ++ CERT_DestroyCertList (certList); ++ return root; ++} ++ ++/* Verify a cert using explicit PKIX call. ++ * For now only used in OCSP AIA context. ++ * The result of this call will be a full chain ++ * and leaf network AIA ocsp validation. ++ * The policy param will be used in the future to ++ * handle more scenarios. ++ */ ++ ++SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, ++ SECCertificateUsage certUsage,secuPWData *pwdata, int ocspPolicy, ++ CERTVerifyLog *log, SECCertificateUsage *usage) ++{ ++ ++ /* put the first set of possible flags internally here first */ ++ /* later there could be a more complete list to choose from */ ++ /* support our hard core fetch aia ocsp policy for now */ ++ ++ static PRUint64 ocsp_Enabled_Hard_Policy_LeafFlags[2] = { ++ /* crl */ ++ 0, ++ /* ocsp */ ++ CERT_REV_M_TEST_USING_THIS_METHOD | ++ CERT_REV_M_FAIL_ON_MISSING_FRESH_INFO ++ }; ++ ++ static PRUint64 ocsp_Enabled_Hard_Policy_ChainFlags[2] = { ++ /* crl */ ++ 0, ++ /* ocsp */ ++ CERT_REV_M_TEST_USING_THIS_METHOD | ++ CERT_REV_M_FAIL_ON_MISSING_FRESH_INFO ++ }; ++ ++ static CERTRevocationMethodIndex ++ ocsp_Enabled_Hard_Policy_Method_Preference = { ++ cert_revocation_method_ocsp ++ }; ++ ++ static CERTRevocationFlags ocsp_Enabled_Hard_Policy = { ++ { /* leafTests */ ++ 2, ++ ocsp_Enabled_Hard_Policy_LeafFlags, ++ 1, ++ &ocsp_Enabled_Hard_Policy_Method_Preference, ++ 0 }, ++ { /* chainTests */ ++ 2, ++ ocsp_Enabled_Hard_Policy_ChainFlags, ++ 1, ++ &ocsp_Enabled_Hard_Policy_Method_Preference, ++ 0 } ++ }; ++ ++ /* for future expansion */ ++ ++ CERTValOutParam cvout[20] = {0}; ++ CERTValInParam cvin[20] = {0}; ++ ++ int inParamIndex = 0; ++ int outParamIndex = 0; ++ CERTRevocationFlags *rev = NULL; ++ ++ CERTCertList *trustedCertList = NULL; ++ ++ PRBool fetchCerts = PR_FALSE; ++ ++ SECStatus res = SECFailure; ++ if(cert == NULL) { ++ goto finish; ++ } ++ ++ if(ocspPolicy != OCSP_LEAF_AND_CHAIN_POLICY) { ++ goto finish; ++ } ++ ++ /* Force the strict ocsp network check on chain ++ and leaf. ++ */ ++ ++ fetchCerts = PR_TRUE; ++ rev = &ocsp_Enabled_Hard_Policy; ++ ++ /* fetch aia over net */ ++ ++ cvin[inParamIndex].type = cert_pi_useAIACertFetch; ++ cvin[inParamIndex].value.scalar.b = fetchCerts; ++ inParamIndex++; ++ ++ /* time */ ++ ++ cvin[inParamIndex].type = cert_pi_date; ++ cvin[inParamIndex].value.scalar.time = PR_Now(); ++ inParamIndex++; ++ ++ /* flags */ ++ ++ cvin[inParamIndex].type = cert_pi_revocationFlags; ++ cvin[inParamIndex].value.pointer.revocation = rev; ++ inParamIndex++; ++ ++ ++ /* establish trust anchor */ ++ ++ CERTCertificate *root = getRoot(cert,certUsage); ++ ++ /* Try to add the root as the trust anchor so all the ++ other memebers of the ca chain will get validated. ++ */ ++ ++ if( root != NULL ) { ++ trustedCertList = CERT_NewCertList(); ++ CERT_AddCertToListTail(trustedCertList, root); ++ ++ cvin[inParamIndex].type = cert_pi_trustAnchors; ++ cvin[inParamIndex].value.pointer.chain = trustedCertList; ++ ++ inParamIndex++; ++ } ++ ++ cvin[inParamIndex].type = cert_pi_end; ++ ++ if(log != NULL) { ++ cvout[outParamIndex].type = cert_po_errorLog; ++ cvout[outParamIndex].value.pointer.log = log; ++ outParamIndex ++; ++ } ++ ++ int usageIndex = 0; ++ if(usage != NULL) { ++ usageIndex = outParamIndex; ++ cvout[outParamIndex].type = cert_po_usages; ++ cvout[outParamIndex].value.scalar.usages = 0; ++ outParamIndex ++; ++ } ++ ++ cvout[outParamIndex].type = cert_po_end; ++ ++ res = CERT_PKIXVerifyCert(cert, certUsage, cvin, cvout, &pwdata); ++ ++finish: ++ /* clean up any trusted cert list */ ++ ++ if (trustedCertList) { ++ CERT_DestroyCertList(trustedCertList); ++ trustedCertList = NULL; ++ } ++ ++ if(root) { ++ CERT_DestroyCertificate(root); ++ root = NULL; ++ } ++ ++ if(res == SECSuccess && usage) { ++ *usage = cvout[usageIndex].value.scalar.usages; ++ } ++ ++ return res; ++} +diff --git a/org/mozilla/jss/ssl/jssl.h b/org/mozilla/jss/ssl/jssl.h +index c15acf87..0e93eebe 100644 +--- a/org/mozilla/jss/ssl/jssl.h ++++ b/org/mozilla/jss/ssl/jssl.h +@@ -5,8 +5,27 @@ + #ifndef ORG_MOZILLA_JSS_SSL_JSSL_H + #define ORG_MOZILLA_JSS_SSL_JSSL_H + ++/* ocsp policy constants */ ++ ++/* ocsp policy constants */ ++static const int OCSP_NO_POLICY = 0; ++static const int OCSP_NORMAL_POLICY = 1; ++static const int OCSP_LEAF_AND_CHAIN_POLICY = 2; ++ + #include + ++typedef struct ++{ ++ enum ++ { ++ PW_NONE = 0, ++ PW_FROMFILE = 1, ++ PW_PLAINTEXT = 2, ++ PW_EXTERNAL = 3 ++ } source; ++ char *data; ++} secuPWData; ++ + struct JSSL_SocketData { + PRFileDesc *fd; + jobject socketObject; /* weak global ref */ +@@ -120,4 +139,14 @@ JSS_SSL_processExceptions(JNIEnv *env, PRFilePrivate *priv); + + void JSSL_throwSSLSocketException(JNIEnv *env, char *message); + ++int ++JSSL_getOCSPPolicy(); ++ ++ ++SECStatus ++JSSL_verifyCertPKIX(CERTCertificate *cert, ++ SECCertificateUsage certUsage, ++ secuPWData *pwdata, int ocspPolicy, ++ CERTVerifyLog *log,SECCertificateUsage *usage); ++ + #endif +diff --git a/org/mozilla/jss/util/java_ids.h b/org/mozilla/jss/util/java_ids.h +index 73b31fa9..4053d9a7 100644 +--- a/org/mozilla/jss/util/java_ids.h ++++ b/org/mozilla/jss/util/java_ids.h +@@ -276,6 +276,15 @@ PR_BEGIN_EXTERN_C + #define GET_RECV_BUF_SIZE "getReceiveBufferSize" + #define GET_BUF_SIZE_SIG "()I" + ++/* ++ * CryptoManager ++ * ++*/ ++ ++#define CRYPTO_MANAGER_NAME "org/mozilla/jss/CryptoManager" ++#define GET_OCSP_POLICY_NAME "getOCSPPolicy" ++#define GET_OCSP_POLICY_SIG "()I" ++ + /* + * SocketBase + */ diff --git a/jss-aia-ocsp-2.patch b/jss-aia-ocsp-2.patch new file mode 100644 index 0000000..c6b2f1c --- /dev/null +++ b/jss-aia-ocsp-2.patch @@ -0,0 +1,141 @@ +From 1fe6a451ec0c3ec960ac1119b39c406d999da5ec Mon Sep 17 00:00:00 2001 +From: Jack Magne +Date: Fri, 8 Feb 2019 11:21:48 -0800 +Subject: [PATCH] Additional: Resolve Bug 1666872 - CC: Enable AIA OCSP cert + checking for entire cert chain. + +Simple fix to make sure we are using the correct variant of the NSS cert usage quantity. + +It turns out some calls need a SECCertUsage and others need a SECCertificateUsage. +We also need to convert between the two in certain instances. + +Found and fixed double certificate object free issue. +--- + org/mozilla/jss/ssl/callbacks.c | 10 ++++++++-- + org/mozilla/jss/ssl/common.c | 19 ++++++++++++++----- + org/mozilla/jss/ssl/jssl.h | 2 +- + 3 files changed, 23 insertions(+), 8 deletions(-) + +diff --git a/org/mozilla/jss/ssl/callbacks.c b/org/mozilla/jss/ssl/callbacks.c +index 42594a14..4fe08a29 100644 +--- a/org/mozilla/jss/ssl/callbacks.c ++++ b/org/mozilla/jss/ssl/callbacks.c +@@ -481,6 +481,9 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + + certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; + ++ /* PKIX call needs a SECCertificate usage, convert */ ++ SECCertificateUsage certificateUsage = (SECCertificateUsage)1 << certUsage; ++ + /* SSL_PeerCertificate() returns a shallow copy of the cert, so we + must destroy it before we exit this function */ + +@@ -488,7 +491,7 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + + if (peerCert) { + if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { +- rv = JSSL_verifyCertPKIX( peerCert, certUsage, ++ rv = JSSL_verifyCertPKIX( peerCert, certificateUsage, + NULL /* pin arg */, ocspPolicy, NULL, NULL); + } else { + rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), peerCert, +@@ -624,6 +627,9 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + if (peerCert == NULL) goto finish; + + certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; ++ /* PKIX call needs a SECCertificate usage, convert */ ++ SECCertificateUsage certificateUsage = (SECCertificateUsage)1 << certUsage; ++ + + /* + * verify it against current time - (can't use +@@ -632,7 +638,7 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, + */ + + if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { +- verificationResult = JSSL_verifyCertPKIX( peerCert, certUsage, ++ verificationResult = JSSL_verifyCertPKIX( peerCert, certificateUsage, + NULL /* pin arg */, ocspPolicy, &log, NULL); + } else { + verificationResult = CERT_VerifyCert( CERT_GetDefaultCertDB(), +diff --git a/org/mozilla/jss/ssl/common.c b/org/mozilla/jss/ssl/common.c +index aec88552..cb281798 100644 +--- a/org/mozilla/jss/ssl/common.c ++++ b/org/mozilla/jss/ssl/common.c +@@ -894,7 +894,7 @@ JSS_SSL_processExceptions(JNIEnv *env, PRFilePrivate *priv) + /* Get the trusted anchor for pkix */ + + CERTCertificate * getRoot(CERTCertificate *cert, +- SECCertificateUsage certUsage) ++ SECCertUsage certUsage) + { + CERTCertificate *root = NULL; + CERTCertListNode *node = NULL; +@@ -936,7 +936,7 @@ CERTCertificate * getRoot(CERTCertificate *cert, + */ + + SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, +- SECCertificateUsage certUsage,secuPWData *pwdata, int ocspPolicy, ++ SECCertificateUsage certificateUsage,secuPWData *pwdata, int ocspPolicy, + CERTVerifyLog *log, SECCertificateUsage *usage) + { + +@@ -993,6 +993,8 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, + + PRBool fetchCerts = PR_FALSE; + ++ SECCertUsage certUsage = certUsageSSLClient /* 0 */; ++ + SECStatus res = SECFailure; + if(cert == NULL) { + goto finish; +@@ -1027,9 +1029,15 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, + cvin[inParamIndex].value.pointer.revocation = rev; + inParamIndex++; + +- + /* establish trust anchor */ + ++ /* We need to convert the SECCertificateUsage to a SECCertUsage to obtain ++ * the root. ++ */ ++ ++ SECCertificateUsage testUsage = certificateUsage; ++ while (0 != (testUsage = testUsage >> 1)) { certUsage++; } ++ + CERTCertificate *root = getRoot(cert,certUsage); + + /* Try to add the root as the trust anchor so all the +@@ -1064,7 +1072,7 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, + + cvout[outParamIndex].type = cert_po_end; + +- res = CERT_PKIXVerifyCert(cert, certUsage, cvin, cvout, &pwdata); ++ res = CERT_PKIXVerifyCert(cert, certificateUsage, cvin, cvout, &pwdata); + + finish: + /* clean up any trusted cert list */ +@@ -1074,8 +1082,9 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, + trustedCertList = NULL; + } + ++ /* CERT_DestroyCertList destroys interior certs for us. */ ++ + if(root) { +- CERT_DestroyCertificate(root); + root = NULL; + } + +diff --git a/org/mozilla/jss/ssl/jssl.h b/org/mozilla/jss/ssl/jssl.h +index 0e93eebe..925e1225 100644 +--- a/org/mozilla/jss/ssl/jssl.h ++++ b/org/mozilla/jss/ssl/jssl.h +@@ -145,7 +145,7 @@ JSSL_getOCSPPolicy(); + + SECStatus + JSSL_verifyCertPKIX(CERTCertificate *cert, +- SECCertificateUsage certUsage, ++ SECCertificateUsage certificateUsage, + secuPWData *pwdata, int ocspPolicy, + CERTVerifyLog *log,SECCertificateUsage *usage); + diff --git a/jss.spec b/jss.spec index 50f3e36..3f103ed 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.3 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -26,6 +26,8 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +Patch0: jss-aia-ocsp-1.patch +Patch1: jss-aia-ocsp-2.patch ################################################################################ # Build Dependencies @@ -156,6 +158,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Mon May 06 2019 Dogtag PKI Team - 4.5.3-2 +- Add AIA OCSP certificate checking patch + * Tue Mar 19 2019 Dogtag PKI Team - 4.5.3-1 - Rebase to JSS 4.5.3 From 95ed694df02859e7138834cae92ef71a7fac2dae Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 10:54:01 +0000 Subject: [PATCH 20/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 3f103ed..fb72206 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.5.3 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} +Release: 3%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -158,6 +158,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 4.5.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Mon May 06 2019 Dogtag PKI Team - 4.5.3-2 - Add AIA OCSP certificate checking patch From e672bfd04d36bc07695811487e63b1504c8e2b6a Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 8 Aug 2019 12:04:10 -0400 Subject: [PATCH 21/89] Rebase to upstream JSS v4.6.1 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 24 ++++++++++++++---------- sources | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index fcc1b5d..1c7e1b3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ jss-4.2.6.tar.gz /jss-4.5.1.tar.gz /jss-4.5.2.tar.gz /jss-4.5.3.tar.gz +/jss-4.6.1.tar.gz diff --git a/jss.spec b/jss.spec index fb72206..60f135f 100644 --- a/jss.spec +++ b/jss.spec @@ -6,18 +6,17 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.5.3 -Release: 3%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.6.1 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git # $ cd jss -# $ git archive \ -# --format=tar.gz \ -# --prefix jss-VERSION/ \ -# -o jss-VERSION.tar.gz \ -# +# $ git tag v4.5. +# $ git push origin v4.5. +# Then go to https://github.com/dogtagpki/jss/releases and download the source +# tarball. Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phase}/%{name}-%{version}%{?_phase}.tar.gz # To create a patch for all changes since a version tag: @@ -26,8 +25,6 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch0: jss-aia-ocsp-1.patch -Patch1: jss-aia-ocsp-2.patch ################################################################################ # Build Dependencies @@ -108,6 +105,9 @@ export BUILD_OPT=1 CFLAGS="-g $RPM_OPT_FLAGS" export CFLAGS +# Check if we're in FIPS mode +modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1 + # The Makefile is not thread-safe rm -rf build && mkdir -p build && cd build %cmake \ @@ -115,7 +115,8 @@ rm -rf build && mkdir -p build && cd build -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ .. -%{__make} all javadoc +%{__make} all +%{__make} javadoc || true ctest --output-on-failure ################################################################################ @@ -158,6 +159,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Aug 08 2019 Dogtag PKI Team - 4.6.1-1 +- Rebase to JSS 4.6.1 + * Thu Jul 25 2019 Fedora Release Engineering - 4.5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 8c326c0..99c1894 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.5.3.tar.gz) = 6a5d5065803a36a42f15c19fa870edf4844d650911c690a8033288ee0e2e6e115868de39a7c9c955e068568a859baf5fb3e8e970b4167dfc19782bb661ab6d71 +SHA512 (jss-4.6.1.tar.gz) = 7a7eb02e98a22d0817aec34cff32ac942545885c84992812d116b683fa31c12d0fb9b8aa3b8757ab234f9980993fb933d6556c959935cd5e09ca7468d8729c8a From 3cd9441c547009bc99ea7c1eb683fccceca76314 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 8 Aug 2019 12:48:44 -0400 Subject: [PATCH 22/89] Disable async io tests NSS on s390x is broken: https://bugzilla.redhat.com/show_bug.cgi?id=1730109 Ignore the problem by disabling some tests. Signed-off-by: Alexander Scheel --- 0001-Disable-buffer-based-tests.patch | 78 +++++++++++++++++++++++++++ jss.spec | 6 ++- 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 0001-Disable-buffer-based-tests.patch diff --git a/0001-Disable-buffer-based-tests.patch b/0001-Disable-buffer-based-tests.patch new file mode 100644 index 0000000..c432844 --- /dev/null +++ b/0001-Disable-buffer-based-tests.patch @@ -0,0 +1,78 @@ +From ab1ba593ac9965607e60a16f3e5e75ba9ccfb505 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Thu, 8 Aug 2019 12:35:28 -0400 +Subject: [PATCH] Disable failing tests on special arches + +Signed-off-by: Alexander Scheel +--- + cmake/JSSTests.cmake | 40 ---------------------------------------- + 1 file changed, 40 deletions(-) + +diff --git a/cmake/JSSTests.cmake b/cmake/JSSTests.cmake +index 9397f45d..ae6b0d22 100644 +--- a/cmake/JSSTests.cmake ++++ b/cmake/JSSTests.cmake +@@ -78,19 +78,6 @@ macro(jss_tests) + NAME "BigObjectIdentifier" + COMMAND "org.mozilla.jss.tests.BigObjectIdentifier" + ) +- jss_test_java( +- NAME "JSS_Test_PR_FileDesc" +- COMMAND "org.mozilla.jss.tests.TestPRFD" +- ) +- jss_test_java( +- NAME "JSS_Test_Raw_SSL" +- COMMAND "org.mozilla.jss.tests.TestRawSSL" "${RESULTS_NSSDB_OUTPUT_DIR}" +- DEPENDS "Setup_DBs" +- ) +- jss_test_java( +- NAME "JSS_Test_Buffer" +- COMMAND "org.mozilla.jss.tests.TestBuffer" +- ) + if ((${Java_VERSION_MAJOR} EQUAL 1) AND (${Java_VERSION_MINOR} LESS 9)) + jss_test_java( + NAME "Test_PKCS11Constants.java_for_Sun_compatibility" +@@ -121,16 +108,6 @@ macro(jss_tests) + NAME "JUnit_UTF8StringTest" + COMMAND "org.junit.runner.JUnitCore" "org.mozilla.jss.tests.UTF8StringTest" + ) +- jss_test_exec( +- NAME "buffer_size_1" +- COMMAND "${BIN_OUTPUT_DIR}/buffer_size_1" +- DEPENDS "generate_c_buffer_size_1" +- ) +- jss_test_exec( +- NAME "buffer_size_4" +- COMMAND "${BIN_OUTPUT_DIR}/buffer_size_4" +- DEPENDS "generate_c_buffer_size_4" +- ) + jss_test_java( + NAME "JUnit_ChainSortingTest" + COMMAND "org.junit.runner.JUnitCore" "org.mozilla.jss.tests.ChainSortingTest" +@@ -253,23 +230,6 @@ macro(jss_tests) + DEPENDS "Setup_DBs" + ) + +- # SSL Engine related tests +- jss_test_exec( +- NAME "TestBufferPRFD_RSA" +- COMMAND "${BIN_OUTPUT_DIR}/TestBufferPRFD" "${RESULTS_NSSDB_OUTPUT_DIR}" "${DB_PWD}" "Server_RSA" +- DEPENDS "List_CA_certs" "generate_c_TestBufferPRFD" +- ) +- jss_test_exec( +- NAME "TestBufferPRFD_ECDSA" +- COMMAND "${BIN_OUTPUT_DIR}/TestBufferPRFD" "${RESULTS_NSSDB_OUTPUT_DIR}" "${DB_PWD}" "Server_ECDSA" +- DEPENDS "List_CA_certs" "generate_c_TestBufferPRFD" +- ) +- jss_test_java( +- NAME "JSS_Test_BufferPRFD" +- COMMAND "org.mozilla.jss.tests.TestBufferPRFD" "${RESULTS_NSSDB_OUTPUT_DIR}" "${DB_PWD}" +- DEPENDS "List_CA_certs" +- ) +- + # FIPS-related tests + jss_test_java( + NAME "Enable_FipsMODE" +-- +2.21.0 + diff --git a/jss.spec b/jss.spec index 60f135f..40bbda1 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.6.1 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,6 +25,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +Patch0: 0001-Disable-buffer-based-tests.patch ################################################################################ # Build Dependencies @@ -159,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Aug 08 2019 Dogtag PKI Team - 4.6.1-2 +- Disable unnecessary tests to fix broken s390x + * Thu Aug 08 2019 Dogtag PKI Team - 4.6.1-1 - Rebase to JSS 4.6.1 From 9c3f65618b4aa69712c0da534d3583ee638e2f5f Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 15 Oct 2019 15:22:57 -0400 Subject: [PATCH 23/89] Rebase to upstream JSS v4.6.2 Fixes CVE-2019-14823 Signed-off-by: Alexander Scheel --- .gitignore | 1 + 0001-Disable-buffer-based-tests.patch | 78 --------------------------- jss.spec | 9 ++-- sources | 2 +- 4 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 0001-Disable-buffer-based-tests.patch diff --git a/.gitignore b/.gitignore index 1c7e1b3..5981ea6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ jss-4.2.6.tar.gz /jss-4.5.2.tar.gz /jss-4.5.3.tar.gz /jss-4.6.1.tar.gz +/jss-4.6.2.tar.gz diff --git a/0001-Disable-buffer-based-tests.patch b/0001-Disable-buffer-based-tests.patch deleted file mode 100644 index c432844..0000000 --- a/0001-Disable-buffer-based-tests.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ab1ba593ac9965607e60a16f3e5e75ba9ccfb505 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Thu, 8 Aug 2019 12:35:28 -0400 -Subject: [PATCH] Disable failing tests on special arches - -Signed-off-by: Alexander Scheel ---- - cmake/JSSTests.cmake | 40 ---------------------------------------- - 1 file changed, 40 deletions(-) - -diff --git a/cmake/JSSTests.cmake b/cmake/JSSTests.cmake -index 9397f45d..ae6b0d22 100644 ---- a/cmake/JSSTests.cmake -+++ b/cmake/JSSTests.cmake -@@ -78,19 +78,6 @@ macro(jss_tests) - NAME "BigObjectIdentifier" - COMMAND "org.mozilla.jss.tests.BigObjectIdentifier" - ) -- jss_test_java( -- NAME "JSS_Test_PR_FileDesc" -- COMMAND "org.mozilla.jss.tests.TestPRFD" -- ) -- jss_test_java( -- NAME "JSS_Test_Raw_SSL" -- COMMAND "org.mozilla.jss.tests.TestRawSSL" "${RESULTS_NSSDB_OUTPUT_DIR}" -- DEPENDS "Setup_DBs" -- ) -- jss_test_java( -- NAME "JSS_Test_Buffer" -- COMMAND "org.mozilla.jss.tests.TestBuffer" -- ) - if ((${Java_VERSION_MAJOR} EQUAL 1) AND (${Java_VERSION_MINOR} LESS 9)) - jss_test_java( - NAME "Test_PKCS11Constants.java_for_Sun_compatibility" -@@ -121,16 +108,6 @@ macro(jss_tests) - NAME "JUnit_UTF8StringTest" - COMMAND "org.junit.runner.JUnitCore" "org.mozilla.jss.tests.UTF8StringTest" - ) -- jss_test_exec( -- NAME "buffer_size_1" -- COMMAND "${BIN_OUTPUT_DIR}/buffer_size_1" -- DEPENDS "generate_c_buffer_size_1" -- ) -- jss_test_exec( -- NAME "buffer_size_4" -- COMMAND "${BIN_OUTPUT_DIR}/buffer_size_4" -- DEPENDS "generate_c_buffer_size_4" -- ) - jss_test_java( - NAME "JUnit_ChainSortingTest" - COMMAND "org.junit.runner.JUnitCore" "org.mozilla.jss.tests.ChainSortingTest" -@@ -253,23 +230,6 @@ macro(jss_tests) - DEPENDS "Setup_DBs" - ) - -- # SSL Engine related tests -- jss_test_exec( -- NAME "TestBufferPRFD_RSA" -- COMMAND "${BIN_OUTPUT_DIR}/TestBufferPRFD" "${RESULTS_NSSDB_OUTPUT_DIR}" "${DB_PWD}" "Server_RSA" -- DEPENDS "List_CA_certs" "generate_c_TestBufferPRFD" -- ) -- jss_test_exec( -- NAME "TestBufferPRFD_ECDSA" -- COMMAND "${BIN_OUTPUT_DIR}/TestBufferPRFD" "${RESULTS_NSSDB_OUTPUT_DIR}" "${DB_PWD}" "Server_ECDSA" -- DEPENDS "List_CA_certs" "generate_c_TestBufferPRFD" -- ) -- jss_test_java( -- NAME "JSS_Test_BufferPRFD" -- COMMAND "org.mozilla.jss.tests.TestBufferPRFD" "${RESULTS_NSSDB_OUTPUT_DIR}" "${DB_PWD}" -- DEPENDS "List_CA_certs" -- ) -- - # FIPS-related tests - jss_test_java( - NAME "Enable_FipsMODE" --- -2.21.0 - diff --git a/jss.spec b/jss.spec index 40bbda1..5c9fbd3 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.6.1 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.6.2 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,7 +25,6 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch0: 0001-Disable-buffer-based-tests.patch ################################################################################ # Build Dependencies @@ -160,6 +159,10 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Oct 15 2019 Dogtag PKI Team - 4.6.2-1 +- Rebase to JSS 4.6.2 +- Fixes CVE-2019-14823 + * Thu Aug 08 2019 Dogtag PKI Team - 4.6.1-2 - Disable unnecessary tests to fix broken s390x diff --git a/sources b/sources index 99c1894..32f2840 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.6.1.tar.gz) = 7a7eb02e98a22d0817aec34cff32ac942545885c84992812d116b683fa31c12d0fb9b8aa3b8757ab234f9980993fb933d6556c959935cd5e09ca7468d8729c8a +SHA512 (jss-4.6.2.tar.gz) = 53c12822b980f6dcaf5616366834fe4eaee07d84feae53096aa0ea142146e90d375910456d8192068cde5e63c3b60ded87862af50ea89c6b64224e8c105e00dd From 92d15fc305c3234d89258eb9d1af14b464a386fc Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 29 Oct 2019 10:56:50 -0400 Subject: [PATCH 24/89] Fix creation of NativeProxy Resolves: rhbz#1766451 Signed-off-by: Alexander Scheel --- 0001-Fix-NativeProxy-reference-tracker.patch | 53 ++ jss-aia-ocsp-1.patch | 659 ------------------- jss-aia-ocsp-2.patch | 141 ---- jss.spec | 6 +- 4 files changed, 58 insertions(+), 801 deletions(-) create mode 100644 0001-Fix-NativeProxy-reference-tracker.patch delete mode 100644 jss-aia-ocsp-1.patch delete mode 100644 jss-aia-ocsp-2.patch diff --git a/0001-Fix-NativeProxy-reference-tracker.patch b/0001-Fix-NativeProxy-reference-tracker.patch new file mode 100644 index 0000000..529b576 --- /dev/null +++ b/0001-Fix-NativeProxy-reference-tracker.patch @@ -0,0 +1,53 @@ +From 91514ca0a2979ba778d27220ced0cd312e2cd2d2 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Tue, 29 Oct 2019 10:43:56 -0400 +Subject: [PATCH] Fix NativeProxy reference tracker + +In eb5df01003d74b57473eacb84e538d31f5bb06ca, I introduced a bug by +setting mPointer after trying to add NativeProxy to the registry. In +most instances this won't matter, however, if another instance exists in +the HashSet with the same hash value, the equals comparator will be +used, triggering a NPE. + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/util/NativeProxy.java | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +diff --git a/org/mozilla/jss/util/NativeProxy.java b/org/mozilla/jss/util/NativeProxy.java +index 1c6d1aa5..a0811f76 100644 +--- a/org/mozilla/jss/util/NativeProxy.java ++++ b/org/mozilla/jss/util/NativeProxy.java +@@ -40,8 +40,8 @@ public abstract class NativeProxy implements AutoCloseable + */ + public NativeProxy(byte[] pointer) { + assert(pointer!=null); +- registry.add(this); + mPointer = pointer; ++ registry.add(this); + + if (saveStacktraces) { + mTrace = Arrays.toString(Thread.currentThread().getStackTrace()); +@@ -61,15 +61,12 @@ public abstract class NativeProxy implements AutoCloseable + if( ! (obj instanceof NativeProxy) ) { + return false; + } +- if( ((NativeProxy)obj).mPointer.length != mPointer.length) { ++ if (((NativeProxy)obj).mPointer == null) { ++ /* If mPointer is null, we have no way to compare the values ++ * of the pointers, so assume they're unequal. */ + return false; + } +- for(int i=0; i < mPointer.length; i++) { +- if(mPointer[i] != ((NativeProxy)obj).mPointer[i]) { +- return false; +- } +- } +- return true; ++ return Arrays.equals(((NativeProxy)obj).mPointer, mPointer); + } + + /** +-- +2.21.0 + diff --git a/jss-aia-ocsp-1.patch b/jss-aia-ocsp-1.patch deleted file mode 100644 index f20207c..0000000 --- a/jss-aia-ocsp-1.patch +++ /dev/null @@ -1,659 +0,0 @@ -From 8975c8ae1d0c8b916c5c73aff12046b01d3e6ef0 Mon Sep 17 00:00:00 2001 -From: Jack Magne -Date: Fri, 25 Jan 2019 14:54:11 -0800 -Subject: [PATCH] Resolve Bug 1666872 - CC: Enable AIA OCSP cert checking for - entire cert chain. - -This fix for jss, solves the one use case where the pki server is configured to perform ocsp checking ONLY with the contents of the AIA extension. Previously, jss could only check the ocsp server for the leaf node cert of the cert being verified. This fix allows the cert chain to be checked over ocsp for each cert in question. This is possible due to the fact that we have made a call in the PKIX library of nss to do the actual cert verfication. This call is made with all the needed flags to tell the PKIX library to make the ocsp verifications remotely over the network using the contents of the AIA extension. - -Later on we can use this code to handle the other cases, but for now we want to solve this one particular problem. If the server is configured in any other configuration than the one stated, the original verification code will be called as before. Below is an example of a configuration in server.xml, that will trigger this new code: - -< .... enableOCSP="true" ocspCacheSize="10000" ocspMinCacheEntryDuration="7200" .... > - -Note that due to ocsp caching, the cert chain verification may only be apparent after a restart of the server. A way to force an ocsp fetch every time is to set the value of ocspCacheSize=-1, which essentially disables the cache. - -Added a couple of minor fixes due to review comments. Possibly more to come. -Minor include directive change to compile on branch. ---- - org/mozilla/jss/CryptoManager.java | 48 +++++++ - org/mozilla/jss/PK11Finder.c | 95 ++++++++++++-- - org/mozilla/jss/ssl/callbacks.c | 67 ++++++++-- - org/mozilla/jss/ssl/common.c | 196 +++++++++++++++++++++++++++++ - org/mozilla/jss/ssl/jssl.h | 29 +++++ - org/mozilla/jss/util/java_ids.h | 9 ++ - 6 files changed, 422 insertions(+), 22 deletions(-) - -diff --git a/org/mozilla/jss/CryptoManager.java b/org/mozilla/jss/CryptoManager.java -index 9b86bf9e..c9a3fb2b 100644 ---- a/org/mozilla/jss/CryptoManager.java -+++ b/org/mozilla/jss/CryptoManager.java -@@ -1201,6 +1201,44 @@ private native boolean verifyCertTempNative(byte[] certPackage, - // OCSP management - /////////////////////////////////////////////////////////////////////// - -+ /* OCSP Policy related */ -+ -+ public enum OCSPPolicy { -+ NONE, -+ NORMAL, -+ LEAF_AND_CHAIN; -+ } -+ -+ private static OCSPPolicy ocspPolicy = OCSPPolicy.NONE; -+ -+ /** -+ * Gets the current ocsp Policy. -+ * Currently we only support 2 modes OCSP_LEAF_AND_CHAIN_POLICY. -+ * And OCSP_NORMAL_POLICY, which is current processing , by default. -+ * If we have AIA based OCSP enabled we will check all certs in the chain. -+ * using PKIX cert verfication calls in the various cert auth callbacks we -+ * have. -+ * @return - The current ocsp policy in effect. -+ */ -+ -+ public static synchronized int getOCSPPolicy() { -+ return ocspPolicy.ordinal(); -+ } -+ -+ /** -+ * Sets the current ocsp Policy. -+ * Currently we only support one mode OCSP_LEAF_AND_CHAIN_POLICY. -+ * If we have AIA based OCSP enabled we will check all certs in the chain. -+ * using PKIX cert verfication calls in the various cert auth callbacks we -+ * have. -+ * @param policy - Either cert and chain or normal default processing. -+ * -+ */ -+ -+ public static synchronized void setOCSPPolicy(OCSPPolicy policy) { -+ ocspPolicy = policy; -+ } -+ - /** - * Enables OCSP, note when you Initialize JSS for the first time, for - * backwards compatibility, the initialize will enable OCSP if you -@@ -1220,6 +1258,16 @@ public void configureOCSP( - String ocspResponderCertNickname ) - throws GeneralSecurityException - { -+ /* set the ocsp policy */ -+ -+ if(ocspCheckingEnabled && -+ ocspResponderURL == null && -+ ocspResponderCertNickname == null) { -+ setOCSPPolicy(OCSPPolicy.LEAF_AND_CHAIN); -+ } else { -+ setOCSPPolicy(OCSPPolicy.NORMAL); -+ } -+ - configureOCSPNative(ocspCheckingEnabled, - ocspResponderURL, - ocspResponderCertNickname ); -diff --git a/org/mozilla/jss/PK11Finder.c b/org/mozilla/jss/PK11Finder.c -index 45958181..0329e91d 100644 ---- a/org/mozilla/jss/PK11Finder.c -+++ b/org/mozilla/jss/PK11Finder.c -@@ -14,9 +14,9 @@ - #include - - #include -- - #include - #include "pk11util.h" -+#include "ssl/jssl.h" - #include - - /* -@@ -1574,6 +1574,9 @@ SECStatus verifyCertificateNow(JNIEnv *env, jobject self, jstring nickString, - goto finish; - } - -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ -+ - certificateUsage = required_certificateUsage; - - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); -@@ -1587,8 +1590,24 @@ SECStatus verifyCertificateNow(JNIEnv *env, jobject self, jstring nickString, - /* 0 for certificateUsage in call to CERT_VerifyCertificateNow will - * retrieve the current valid usage into currUsage - */ -- rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -- checkSig, certificateUsage, NULL, currUsage ); -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ rv = JSSL_verifyCertPKIX( cert, certificateUsage, -+ NULL /* pin arg */, ocspPolicy, NULL, currUsage); -+ -+ /* we need to do this just to get the cert usages, the pkix version -+ doesn't seem to honor the method to get the usages as of yet. -+ Let the PKIX call only determine the final fate. -+ */ -+ if(rv == SECSuccess) { -+ CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certificateUsage, NULL, currUsage ); -+ } -+ -+ } else { -+ rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certificateUsage, NULL, currUsage ); -+ } -+ - if ((rv == SECSuccess) && certificateUsage == 0x0000) { - if (*currUsage == - ( certUsageUserCertImport | -@@ -1639,6 +1658,8 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative(JNIEnv *env, - goto finish; - } - -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ - certificateUsage = required_certificateUsage; - - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); -@@ -1653,8 +1674,23 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative(JNIEnv *env, - * just get the current usage (which we are not passing back for now - * but will bypass the certificate usage check - */ -- rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -- checkSig, certificateUsage, NULL, &currUsage ); -+ -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ rv= JSSL_verifyCertPKIX( cert, certificateUsage, -+ NULL /* pin arg */, ocspPolicy, NULL, &currUsage); -+ -+ /* we need to do this just to get the cert usages, the pkix version -+ doesn't seem to honor the method to get the usages as of yet. -+ Let the PKIX call only determine the final fate. -+ */ -+ if(rv == SECSuccess) { -+ CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certificateUsage, NULL, &currUsage ); -+ } -+ } else { -+ rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certificateUsage, NULL, &currUsage ); -+ } - } - - finish: -@@ -1720,12 +1756,14 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative2(JNIEnv *env, - SECStatus rv = SECFailure; - CERTCertificate *cert = NULL; - char *nickname = NULL; -- -+ - if (nickString == NULL) { - JSS_throwMsg(env, INVALID_NICKNAME_EXCEPTION, "Missing certificate nickname"); - goto finish; - } - -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ - nickname = (char *) (*env)->GetStringUTFChars(env, nickString, NULL); - if (nickname == NULL) { - JSS_throwMsg(env, INVALID_NICKNAME_EXCEPTION, "Missing certificate nickname"); -@@ -1747,8 +1785,25 @@ Java_org_mozilla_jss_CryptoManager_verifyCertificateNowNative2(JNIEnv *env, - /* 0 for certificateUsage in call to CERT_VerifyCertificateNow will - * retrieve the current valid usage into currUsage - */ -- rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -- checkSig, certificateUsage, NULL, &currUsage); -+ -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ rv = JSSL_verifyCertPKIX( cert, certificateUsage, -+ NULL /* pin arg */, ocspPolicy, NULL, &currUsage); -+ -+ /* we need to do this just to get the cert usages, the pkix version -+ doesn't seem to honor the method to get the usages as of yet. -+ Let the PKIX call only determine the final fate. -+ */ -+ if(rv == SECSuccess) { -+ CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certificateUsage, NULL, &currUsage ); -+ -+ } -+ -+ } else { -+ rv = CERT_VerifyCertificateNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certificateUsage, NULL, &currUsage); -+ } - - if (rv != SECSuccess) { - JSS_throwMsgPrErr(env, CERTIFICATE_EXCEPTION, "Invalid certificate"); -@@ -1803,6 +1858,9 @@ Java_org_mozilla_jss_CryptoManager_verifyCertNowNative(JNIEnv *env, - if( nickname == NULL ) { - goto finish; - } -+ -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ - certUsage = cUsage; - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), nickname); - -@@ -1812,8 +1870,13 @@ Java_org_mozilla_jss_CryptoManager_verifyCertNowNative(JNIEnv *env, - PR_smprintf_free(message); - goto finish; - } else { -- rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), cert, -- checkSig, certUsage, NULL ); -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ rv = JSSL_verifyCertPKIX( cert, certUsage, -+ NULL /* pin arg */, ocspPolicy, NULL, NULL); -+ } else { -+ rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), cert, -+ checkSig, certUsage, NULL ); -+ } - } - - finish: -@@ -1858,6 +1921,8 @@ Java_org_mozilla_jss_CryptoManager_verifyCertTempNative(JNIEnv *env, - derCerts[0] = JSS_ByteArrayToSECItem(env, packageArray); - derCerts[1] = NULL; - -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ - rv = CERT_ImportCerts(certdb, cUsage, - 1, derCerts, &certArray, PR_FALSE /*temp Certs*/, - PR_FALSE /*caOnly*/, NULL); -@@ -1869,8 +1934,14 @@ Java_org_mozilla_jss_CryptoManager_verifyCertTempNative(JNIEnv *env, - } - - certUsage = cUsage; -- rv = CERT_VerifyCertNow(certdb, certArray[0], -- checkSig, certUsage, NULL ); -+ -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ rv = JSSL_verifyCertPKIX( certArray[0], certUsage, -+ NULL /* pin arg */, ocspPolicy, NULL, NULL); -+ } else { -+ rv = CERT_VerifyCertNow(certdb, certArray[0], -+ checkSig, certUsage, NULL ); -+ } - - finish: - /* this checks for NULL */ -diff --git a/org/mozilla/jss/ssl/callbacks.c b/org/mozilla/jss/ssl/callbacks.c -index 634f31ec..42594a14 100644 ---- a/org/mozilla/jss/ssl/callbacks.c -+++ b/org/mozilla/jss/ssl/callbacks.c -@@ -20,6 +20,40 @@ - #include - #include - -+int -+JSSL_getOCSPPolicy() { -+ JNIEnv *env; -+ jint policy = -1; -+ -+ jmethodID getOCSPPolicyID; -+ jclass cryptoManagerClass; -+ -+ /* get the JNI environment */ -+ if((*JSS_javaVM)->AttachCurrentThread(JSS_javaVM, (void**)&env, NULL) != 0){ -+ PR_ASSERT(PR_FALSE); -+ goto finish; -+ } -+ -+ cryptoManagerClass = (*env)->FindClass(env, CRYPTO_MANAGER_NAME); -+ if( cryptoManagerClass == NULL ) { -+ ASSERT_OUTOFMEM(env); -+ goto finish; -+ } -+ getOCSPPolicyID = (*env)->GetStaticMethodID(env, cryptoManagerClass, -+ GET_OCSP_POLICY_NAME,GET_OCSP_POLICY_SIG); -+ -+ if( getOCSPPolicyID == NULL ) { -+ ASSERT_OUTOFMEM(env); -+ goto finish; -+ } -+ -+ policy = (*env)->CallStaticIntMethod(env, cryptoManagerClass, -+ getOCSPPolicyID); -+ -+finish: -+ return (int) policy; -+} -+ - static SECStatus - secCmpCertChainWCANames(CERTCertificate *cert, CERTDistNames *caNames) - { -@@ -443,8 +477,9 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - SECCertUsage certUsage; - CERTCertificate *peerCert=NULL; - -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ - certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; -- - - /* SSL_PeerCertificate() returns a shallow copy of the cert, so we - must destroy it before we exit this function */ -@@ -452,8 +487,13 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - peerCert = SSL_PeerCertificate(fd); - - if (peerCert) { -- rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), peerCert, -- checkSig, certUsage, NULL /*pinarg*/); -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ rv = JSSL_verifyCertPKIX( peerCert, certUsage, -+ NULL /* pin arg */, ocspPolicy, NULL, NULL); -+ } else { -+ rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), peerCert, -+ checkSig, certUsage, NULL /*pinarg*/); -+ } - } - - /* if we're a server, then we don't need to check the CN of the -@@ -569,6 +609,8 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - log.tail = NULL; - log.count = 0; - -+ int ocspPolicy = JSSL_getOCSPPolicy(); -+ - /* get the JNI environment */ - if((*JSS_javaVM)->AttachCurrentThread(JSS_javaVM, (void**)&env, NULL) != 0){ - PR_ASSERT(PR_FALSE); -@@ -589,13 +631,18 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - * logging parameter) - */ - -- verificationResult = CERT_VerifyCert( CERT_GetDefaultCertDB(), -- peerCert, -- checkSig, -- certUsage, -- PR_Now(), -- NULL /*pinarg*/, -- &log); -+ if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -+ verificationResult = JSSL_verifyCertPKIX( peerCert, certUsage, -+ NULL /* pin arg */, ocspPolicy, &log, NULL); -+ } else { -+ verificationResult = CERT_VerifyCert( CERT_GetDefaultCertDB(), -+ peerCert, -+ checkSig, -+ certUsage, -+ PR_Now(), -+ NULL /*pinarg*/, -+ &log); -+ } - - if (verificationResult == SECSuccess && log.count > 0) { - verificationResult = SECFailure; -diff --git a/org/mozilla/jss/ssl/common.c b/org/mozilla/jss/ssl/common.c -index 5c6efa85..aec88552 100644 ---- a/org/mozilla/jss/ssl/common.c -+++ b/org/mozilla/jss/ssl/common.c -@@ -15,6 +15,7 @@ - #include - #include "_jni/org_mozilla_jss_ssl_SSLSocket.h" - #include "jssl.h" -+#include "cert.h" - - #ifdef WIN32 - #include -@@ -889,3 +890,198 @@ JSS_SSL_processExceptions(JNIEnv *env, PRFilePrivate *priv) - PR_ASSERT(ret == 0); - } - } -+ -+/* Get the trusted anchor for pkix */ -+ -+CERTCertificate * getRoot(CERTCertificate *cert, -+ SECCertificateUsage certUsage) -+{ -+ CERTCertificate *root = NULL; -+ CERTCertListNode *node = NULL; -+ -+ if( !cert ) { -+ goto finish; -+ } -+ -+ CERTCertList *certList = CERT_GetCertChainFromCert(cert, -+ PR_Now(), -+ certUsage); -+ -+ if( certList == NULL) { -+ goto finish; -+ } -+ -+ for (node = CERT_LIST_HEAD(certList); -+ !CERT_LIST_END(node, certList); -+ node = CERT_LIST_NEXT(node)) { -+ -+ /* try to find the root */ -+ if( node->cert && node->cert->isRoot ) { -+ root = CERT_DupCertificate(node->cert) ; -+ } -+ } -+ -+finish: -+ -+ CERT_DestroyCertList (certList); -+ return root; -+} -+ -+/* Verify a cert using explicit PKIX call. -+ * For now only used in OCSP AIA context. -+ * The result of this call will be a full chain -+ * and leaf network AIA ocsp validation. -+ * The policy param will be used in the future to -+ * handle more scenarios. -+ */ -+ -+SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, -+ SECCertificateUsage certUsage,secuPWData *pwdata, int ocspPolicy, -+ CERTVerifyLog *log, SECCertificateUsage *usage) -+{ -+ -+ /* put the first set of possible flags internally here first */ -+ /* later there could be a more complete list to choose from */ -+ /* support our hard core fetch aia ocsp policy for now */ -+ -+ static PRUint64 ocsp_Enabled_Hard_Policy_LeafFlags[2] = { -+ /* crl */ -+ 0, -+ /* ocsp */ -+ CERT_REV_M_TEST_USING_THIS_METHOD | -+ CERT_REV_M_FAIL_ON_MISSING_FRESH_INFO -+ }; -+ -+ static PRUint64 ocsp_Enabled_Hard_Policy_ChainFlags[2] = { -+ /* crl */ -+ 0, -+ /* ocsp */ -+ CERT_REV_M_TEST_USING_THIS_METHOD | -+ CERT_REV_M_FAIL_ON_MISSING_FRESH_INFO -+ }; -+ -+ static CERTRevocationMethodIndex -+ ocsp_Enabled_Hard_Policy_Method_Preference = { -+ cert_revocation_method_ocsp -+ }; -+ -+ static CERTRevocationFlags ocsp_Enabled_Hard_Policy = { -+ { /* leafTests */ -+ 2, -+ ocsp_Enabled_Hard_Policy_LeafFlags, -+ 1, -+ &ocsp_Enabled_Hard_Policy_Method_Preference, -+ 0 }, -+ { /* chainTests */ -+ 2, -+ ocsp_Enabled_Hard_Policy_ChainFlags, -+ 1, -+ &ocsp_Enabled_Hard_Policy_Method_Preference, -+ 0 } -+ }; -+ -+ /* for future expansion */ -+ -+ CERTValOutParam cvout[20] = {0}; -+ CERTValInParam cvin[20] = {0}; -+ -+ int inParamIndex = 0; -+ int outParamIndex = 0; -+ CERTRevocationFlags *rev = NULL; -+ -+ CERTCertList *trustedCertList = NULL; -+ -+ PRBool fetchCerts = PR_FALSE; -+ -+ SECStatus res = SECFailure; -+ if(cert == NULL) { -+ goto finish; -+ } -+ -+ if(ocspPolicy != OCSP_LEAF_AND_CHAIN_POLICY) { -+ goto finish; -+ } -+ -+ /* Force the strict ocsp network check on chain -+ and leaf. -+ */ -+ -+ fetchCerts = PR_TRUE; -+ rev = &ocsp_Enabled_Hard_Policy; -+ -+ /* fetch aia over net */ -+ -+ cvin[inParamIndex].type = cert_pi_useAIACertFetch; -+ cvin[inParamIndex].value.scalar.b = fetchCerts; -+ inParamIndex++; -+ -+ /* time */ -+ -+ cvin[inParamIndex].type = cert_pi_date; -+ cvin[inParamIndex].value.scalar.time = PR_Now(); -+ inParamIndex++; -+ -+ /* flags */ -+ -+ cvin[inParamIndex].type = cert_pi_revocationFlags; -+ cvin[inParamIndex].value.pointer.revocation = rev; -+ inParamIndex++; -+ -+ -+ /* establish trust anchor */ -+ -+ CERTCertificate *root = getRoot(cert,certUsage); -+ -+ /* Try to add the root as the trust anchor so all the -+ other memebers of the ca chain will get validated. -+ */ -+ -+ if( root != NULL ) { -+ trustedCertList = CERT_NewCertList(); -+ CERT_AddCertToListTail(trustedCertList, root); -+ -+ cvin[inParamIndex].type = cert_pi_trustAnchors; -+ cvin[inParamIndex].value.pointer.chain = trustedCertList; -+ -+ inParamIndex++; -+ } -+ -+ cvin[inParamIndex].type = cert_pi_end; -+ -+ if(log != NULL) { -+ cvout[outParamIndex].type = cert_po_errorLog; -+ cvout[outParamIndex].value.pointer.log = log; -+ outParamIndex ++; -+ } -+ -+ int usageIndex = 0; -+ if(usage != NULL) { -+ usageIndex = outParamIndex; -+ cvout[outParamIndex].type = cert_po_usages; -+ cvout[outParamIndex].value.scalar.usages = 0; -+ outParamIndex ++; -+ } -+ -+ cvout[outParamIndex].type = cert_po_end; -+ -+ res = CERT_PKIXVerifyCert(cert, certUsage, cvin, cvout, &pwdata); -+ -+finish: -+ /* clean up any trusted cert list */ -+ -+ if (trustedCertList) { -+ CERT_DestroyCertList(trustedCertList); -+ trustedCertList = NULL; -+ } -+ -+ if(root) { -+ CERT_DestroyCertificate(root); -+ root = NULL; -+ } -+ -+ if(res == SECSuccess && usage) { -+ *usage = cvout[usageIndex].value.scalar.usages; -+ } -+ -+ return res; -+} -diff --git a/org/mozilla/jss/ssl/jssl.h b/org/mozilla/jss/ssl/jssl.h -index c15acf87..0e93eebe 100644 ---- a/org/mozilla/jss/ssl/jssl.h -+++ b/org/mozilla/jss/ssl/jssl.h -@@ -5,8 +5,27 @@ - #ifndef ORG_MOZILLA_JSS_SSL_JSSL_H - #define ORG_MOZILLA_JSS_SSL_JSSL_H - -+/* ocsp policy constants */ -+ -+/* ocsp policy constants */ -+static const int OCSP_NO_POLICY = 0; -+static const int OCSP_NORMAL_POLICY = 1; -+static const int OCSP_LEAF_AND_CHAIN_POLICY = 2; -+ - #include - -+typedef struct -+{ -+ enum -+ { -+ PW_NONE = 0, -+ PW_FROMFILE = 1, -+ PW_PLAINTEXT = 2, -+ PW_EXTERNAL = 3 -+ } source; -+ char *data; -+} secuPWData; -+ - struct JSSL_SocketData { - PRFileDesc *fd; - jobject socketObject; /* weak global ref */ -@@ -120,4 +139,14 @@ JSS_SSL_processExceptions(JNIEnv *env, PRFilePrivate *priv); - - void JSSL_throwSSLSocketException(JNIEnv *env, char *message); - -+int -+JSSL_getOCSPPolicy(); -+ -+ -+SECStatus -+JSSL_verifyCertPKIX(CERTCertificate *cert, -+ SECCertificateUsage certUsage, -+ secuPWData *pwdata, int ocspPolicy, -+ CERTVerifyLog *log,SECCertificateUsage *usage); -+ - #endif -diff --git a/org/mozilla/jss/util/java_ids.h b/org/mozilla/jss/util/java_ids.h -index 73b31fa9..4053d9a7 100644 ---- a/org/mozilla/jss/util/java_ids.h -+++ b/org/mozilla/jss/util/java_ids.h -@@ -276,6 +276,15 @@ PR_BEGIN_EXTERN_C - #define GET_RECV_BUF_SIZE "getReceiveBufferSize" - #define GET_BUF_SIZE_SIG "()I" - -+/* -+ * CryptoManager -+ * -+*/ -+ -+#define CRYPTO_MANAGER_NAME "org/mozilla/jss/CryptoManager" -+#define GET_OCSP_POLICY_NAME "getOCSPPolicy" -+#define GET_OCSP_POLICY_SIG "()I" -+ - /* - * SocketBase - */ diff --git a/jss-aia-ocsp-2.patch b/jss-aia-ocsp-2.patch deleted file mode 100644 index c6b2f1c..0000000 --- a/jss-aia-ocsp-2.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 1fe6a451ec0c3ec960ac1119b39c406d999da5ec Mon Sep 17 00:00:00 2001 -From: Jack Magne -Date: Fri, 8 Feb 2019 11:21:48 -0800 -Subject: [PATCH] Additional: Resolve Bug 1666872 - CC: Enable AIA OCSP cert - checking for entire cert chain. - -Simple fix to make sure we are using the correct variant of the NSS cert usage quantity. - -It turns out some calls need a SECCertUsage and others need a SECCertificateUsage. -We also need to convert between the two in certain instances. - -Found and fixed double certificate object free issue. ---- - org/mozilla/jss/ssl/callbacks.c | 10 ++++++++-- - org/mozilla/jss/ssl/common.c | 19 ++++++++++++++----- - org/mozilla/jss/ssl/jssl.h | 2 +- - 3 files changed, 23 insertions(+), 8 deletions(-) - -diff --git a/org/mozilla/jss/ssl/callbacks.c b/org/mozilla/jss/ssl/callbacks.c -index 42594a14..4fe08a29 100644 ---- a/org/mozilla/jss/ssl/callbacks.c -+++ b/org/mozilla/jss/ssl/callbacks.c -@@ -481,6 +481,9 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - - certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; - -+ /* PKIX call needs a SECCertificate usage, convert */ -+ SECCertificateUsage certificateUsage = (SECCertificateUsage)1 << certUsage; -+ - /* SSL_PeerCertificate() returns a shallow copy of the cert, so we - must destroy it before we exit this function */ - -@@ -488,7 +491,7 @@ JSSL_DefaultCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - - if (peerCert) { - if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -- rv = JSSL_verifyCertPKIX( peerCert, certUsage, -+ rv = JSSL_verifyCertPKIX( peerCert, certificateUsage, - NULL /* pin arg */, ocspPolicy, NULL, NULL); - } else { - rv = CERT_VerifyCertNow(CERT_GetDefaultCertDB(), peerCert, -@@ -624,6 +627,9 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - if (peerCert == NULL) goto finish; - - certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; -+ /* PKIX call needs a SECCertificate usage, convert */ -+ SECCertificateUsage certificateUsage = (SECCertificateUsage)1 << certUsage; -+ - - /* - * verify it against current time - (can't use -@@ -632,7 +638,7 @@ JSSL_JavaCertAuthCallback(void *arg, PRFileDesc *fd, PRBool checkSig, - */ - - if( ocspPolicy == OCSP_LEAF_AND_CHAIN_POLICY) { -- verificationResult = JSSL_verifyCertPKIX( peerCert, certUsage, -+ verificationResult = JSSL_verifyCertPKIX( peerCert, certificateUsage, - NULL /* pin arg */, ocspPolicy, &log, NULL); - } else { - verificationResult = CERT_VerifyCert( CERT_GetDefaultCertDB(), -diff --git a/org/mozilla/jss/ssl/common.c b/org/mozilla/jss/ssl/common.c -index aec88552..cb281798 100644 ---- a/org/mozilla/jss/ssl/common.c -+++ b/org/mozilla/jss/ssl/common.c -@@ -894,7 +894,7 @@ JSS_SSL_processExceptions(JNIEnv *env, PRFilePrivate *priv) - /* Get the trusted anchor for pkix */ - - CERTCertificate * getRoot(CERTCertificate *cert, -- SECCertificateUsage certUsage) -+ SECCertUsage certUsage) - { - CERTCertificate *root = NULL; - CERTCertListNode *node = NULL; -@@ -936,7 +936,7 @@ CERTCertificate * getRoot(CERTCertificate *cert, - */ - - SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, -- SECCertificateUsage certUsage,secuPWData *pwdata, int ocspPolicy, -+ SECCertificateUsage certificateUsage,secuPWData *pwdata, int ocspPolicy, - CERTVerifyLog *log, SECCertificateUsage *usage) - { - -@@ -993,6 +993,8 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, - - PRBool fetchCerts = PR_FALSE; - -+ SECCertUsage certUsage = certUsageSSLClient /* 0 */; -+ - SECStatus res = SECFailure; - if(cert == NULL) { - goto finish; -@@ -1027,9 +1029,15 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, - cvin[inParamIndex].value.pointer.revocation = rev; - inParamIndex++; - -- - /* establish trust anchor */ - -+ /* We need to convert the SECCertificateUsage to a SECCertUsage to obtain -+ * the root. -+ */ -+ -+ SECCertificateUsage testUsage = certificateUsage; -+ while (0 != (testUsage = testUsage >> 1)) { certUsage++; } -+ - CERTCertificate *root = getRoot(cert,certUsage); - - /* Try to add the root as the trust anchor so all the -@@ -1064,7 +1072,7 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, - - cvout[outParamIndex].type = cert_po_end; - -- res = CERT_PKIXVerifyCert(cert, certUsage, cvin, cvout, &pwdata); -+ res = CERT_PKIXVerifyCert(cert, certificateUsage, cvin, cvout, &pwdata); - - finish: - /* clean up any trusted cert list */ -@@ -1074,8 +1082,9 @@ SECStatus JSSL_verifyCertPKIX(CERTCertificate *cert, - trustedCertList = NULL; - } - -+ /* CERT_DestroyCertList destroys interior certs for us. */ -+ - if(root) { -- CERT_DestroyCertificate(root); - root = NULL; - } - -diff --git a/org/mozilla/jss/ssl/jssl.h b/org/mozilla/jss/ssl/jssl.h -index 0e93eebe..925e1225 100644 ---- a/org/mozilla/jss/ssl/jssl.h -+++ b/org/mozilla/jss/ssl/jssl.h -@@ -145,7 +145,7 @@ JSSL_getOCSPPolicy(); - - SECStatus - JSSL_verifyCertPKIX(CERTCertificate *cert, -- SECCertificateUsage certUsage, -+ SECCertificateUsage certificateUsage, - secuPWData *pwdata, int ocspPolicy, - CERTVerifyLog *log,SECCertificateUsage *usage); - diff --git a/jss.spec b/jss.spec index 5c9fbd3..be8e0ab 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.6.2 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,6 +25,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +Patch: 0001-Fix-NativeProxy-reference-tracker.patch ################################################################################ # Build Dependencies @@ -159,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Oct 29 2019 Dogtag PKI Team - 4.6.2-2 +- Fix for rhbz#1766451 + * Tue Oct 15 2019 Dogtag PKI Team - 4.6.2-1 - Rebase to JSS 4.6.2 - Fixes CVE-2019-14823 From 7e749ce6786c63ae48bb0097fbddd8e182a2cf1f Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 28 Jan 2020 10:48:11 -0500 Subject: [PATCH 25/89] Rebuild with new NSS Resolves: rhbz#1794814 Signed-off-by: Alexander Scheel --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index be8e0ab..536e1db 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.6.2 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} +Release: 3%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Jan 28 2020 Dogtag PKI Team - 4.6.2-3 +- Rebuild with new NSS to fix rhbz#1794814 + * Tue Oct 29 2019 Dogtag PKI Team - 4.6.2-2 - Fix for rhbz#1766451 From 2bdd1199972bb28747b6f73ff140285e727a5c16 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Wed, 4 Mar 2020 11:33:04 -0500 Subject: [PATCH 26/89] Rebase to JSS v4.6.3 Also fixes three additional issues found since v4.6.3 rebase. Signed-off-by: Alexander Scheel --- .gitignore | 1 + 0001-Fix-NativeProxy-reference-tracker.patch | 53 ------------ 0001-Fix-base64-encoding-of-CSRs.patch | 39 +++++++++ ...Fix-swapped-parameter-names-with-PBE.patch | 80 +++++++++++++++++++ ...-Use-specified-algorithm-for-KeyWrap.patch | 60 ++++++++++++++ ...-Use-specified-algorithm-for-KeyWrap.patch | 60 ++++++++++++++ jss.spec | 14 +++- sources | 2 +- 8 files changed, 252 insertions(+), 57 deletions(-) delete mode 100644 0001-Fix-NativeProxy-reference-tracker.patch create mode 100644 0001-Fix-base64-encoding-of-CSRs.patch create mode 100644 0002-Fix-swapped-parameter-names-with-PBE.patch create mode 100644 0003-Use-specified-algorithm-for-KeyWrap.patch create mode 100644 0008-Use-specified-algorithm-for-KeyWrap.patch diff --git a/.gitignore b/.gitignore index 5981ea6..77527dc 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ jss-4.2.6.tar.gz /jss-4.5.3.tar.gz /jss-4.6.1.tar.gz /jss-4.6.2.tar.gz +/jss-4.6.3.tar.gz diff --git a/0001-Fix-NativeProxy-reference-tracker.patch b/0001-Fix-NativeProxy-reference-tracker.patch deleted file mode 100644 index 529b576..0000000 --- a/0001-Fix-NativeProxy-reference-tracker.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 91514ca0a2979ba778d27220ced0cd312e2cd2d2 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Tue, 29 Oct 2019 10:43:56 -0400 -Subject: [PATCH] Fix NativeProxy reference tracker - -In eb5df01003d74b57473eacb84e538d31f5bb06ca, I introduced a bug by -setting mPointer after trying to add NativeProxy to the registry. In -most instances this won't matter, however, if another instance exists in -the HashSet with the same hash value, the equals comparator will be -used, triggering a NPE. - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/util/NativeProxy.java | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - -diff --git a/org/mozilla/jss/util/NativeProxy.java b/org/mozilla/jss/util/NativeProxy.java -index 1c6d1aa5..a0811f76 100644 ---- a/org/mozilla/jss/util/NativeProxy.java -+++ b/org/mozilla/jss/util/NativeProxy.java -@@ -40,8 +40,8 @@ public abstract class NativeProxy implements AutoCloseable - */ - public NativeProxy(byte[] pointer) { - assert(pointer!=null); -- registry.add(this); - mPointer = pointer; -+ registry.add(this); - - if (saveStacktraces) { - mTrace = Arrays.toString(Thread.currentThread().getStackTrace()); -@@ -61,15 +61,12 @@ public abstract class NativeProxy implements AutoCloseable - if( ! (obj instanceof NativeProxy) ) { - return false; - } -- if( ((NativeProxy)obj).mPointer.length != mPointer.length) { -+ if (((NativeProxy)obj).mPointer == null) { -+ /* If mPointer is null, we have no way to compare the values -+ * of the pointers, so assume they're unequal. */ - return false; - } -- for(int i=0; i < mPointer.length; i++) { -- if(mPointer[i] != ((NativeProxy)obj).mPointer[i]) { -- return false; -- } -- } -- return true; -+ return Arrays.equals(((NativeProxy)obj).mPointer, mPointer); - } - - /** --- -2.21.0 - diff --git a/0001-Fix-base64-encoding-of-CSRs.patch b/0001-Fix-base64-encoding-of-CSRs.patch new file mode 100644 index 0000000..f898ed1 --- /dev/null +++ b/0001-Fix-base64-encoding-of-CSRs.patch @@ -0,0 +1,39 @@ +From 18efce236af6a1affebb274838318ba715114218 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Tue, 25 Feb 2020 09:14:47 -0500 +Subject: [PATCH 3/8] Fix base64-encoding of CSRs + +In 8de4440c5652f6f1af5b4b923a15730ba84f29e1, the base64 encoder was +changed from apache-commons-codec to the Java standard library to drop +a dependency. However, the behavior changed as a result: the Java +standard library doesn't include a final line separator, whereas +apache-commons-codec did. This results in malformed CSRs: + +> YWRPxyBKvFAOB29fwPwBJLZksrwQ0xAs7sooc+qF-----END NEW CERTIFICATE REQUEST----- + +Resolves: https://pagure.io/freeipa/issue/8199 + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/netscape/security/util/Utils.java | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/org/mozilla/jss/netscape/security/util/Utils.java b/org/mozilla/jss/netscape/security/util/Utils.java +index 19f3b1f9..e6e56ce4 100644 +--- a/org/mozilla/jss/netscape/security/util/Utils.java ++++ b/org/mozilla/jss/netscape/security/util/Utils.java +@@ -378,7 +378,10 @@ public class Utils { + * @return base-64 encoded data + */ + public static String base64encodeMultiLine(byte[] bytes) { +- return Base64.getMimeEncoder().encodeToString(bytes); ++ // When switching from apache-commons-codec to the standard library, ++ // the standard library does not include a final line separator at ++ // the end of the encoded data. This results in malformed CSRs. ++ return Base64.getMimeEncoder().encodeToString(bytes) + "\r\n"; + } + + +-- +2.24.1 + diff --git a/0002-Fix-swapped-parameter-names-with-PBE.patch b/0002-Fix-swapped-parameter-names-with-PBE.patch new file mode 100644 index 0000000..c535f6e --- /dev/null +++ b/0002-Fix-swapped-parameter-names-with-PBE.patch @@ -0,0 +1,80 @@ +From 9f29430656342829822568f4ef49f5237b41164b Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Fri, 28 Feb 2020 14:10:32 -0500 +Subject: [PATCH 7/8] Fix swapped parameter names with PBE + +Commit 13998a9e77e60d6509ac814ed711dd21e1248ecd introduced a regression +related to extracting the parameter classes during PBE operations: +previously, the classes of the underlying encryption algorithm were +iterated over, instead of the classes of the PBE class itself. However, +this commit iterated over the PBE parameter classes; no PBE algorithm +accepts a IvParameterSpec, resulting in a null parameter passed to the +later encryption or key wrap operation. This resulted in stack traces +like the following: + +Caused by: java.security.InvalidAlgorithmParameterException: DES3/CBC/Pad cannot use a null parameter + at org.mozilla.jss.pkcs11.PK11KeyWrapper.checkParams(PK11KeyWrapper.java:225) + at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:89) + at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:57) + at org.mozilla.jss.pkix.primitive.EncryptedPrivateKeyInfo.createPBE(EncryptedPrivateKeyInfo.java:342) + +Resolves: rh-bz#1807371 + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/pkcs7/EncryptedContentInfo.java | 2 +- + org/mozilla/jss/pkix/cms/EncryptedContentInfo.java | 2 +- + org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java +index 084752c3..0344b14d 100644 +--- a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java ++++ b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java +@@ -182,7 +182,7 @@ public class EncryptedContentInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( + javax.crypto.spec.IvParameterSpec.class ) ) { +diff --git a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java +index a4709070..d85eb0d3 100644 +--- a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java ++++ b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java +@@ -180,7 +180,7 @@ public class EncryptedContentInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( IVParameterSpec.class ) ) { + params = new IVParameterSpec( kg.generatePBE_IV() ); +diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +index b35714e3..ebd269f3 100644 +--- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java ++++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +@@ -147,7 +147,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( javax.crypto.spec.IvParameterSpec.class ) ) { + params = new IVParameterSpec( kg.generatePBE_IV() ); +@@ -328,7 +328,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( + javax.crypto.spec.IvParameterSpec.class ) ) { +-- +2.24.1 + diff --git a/0003-Use-specified-algorithm-for-KeyWrap.patch b/0003-Use-specified-algorithm-for-KeyWrap.patch new file mode 100644 index 0000000..d75534a --- /dev/null +++ b/0003-Use-specified-algorithm-for-KeyWrap.patch @@ -0,0 +1,60 @@ +From 55482c8bfa0addeb9db7b590703ba3704c5db167 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Fri, 28 Feb 2020 14:39:29 -0500 +Subject: [PATCH 8/8] Use specified algorithm for KeyWrap + +When the token-specified from of EncryptedPrivateKeyInfo.createPBE is +called, it would always request DES3_CBC_PAD as the key wrapping +algorithm, regardless of the input PBE key type. However, the other form +(with an implicit token) was correctly handling this case. + +Introduces a new KeyWrapAlgorithm method to take an OBJECT_IDENTIFIER +instead of having to convert to/from a String form. + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/crypto/KeyWrapAlgorithm.java | 5 ++++- + org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +index 3113f614..3a106977 100644 +--- a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java ++++ b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +@@ -138,7 +138,10 @@ public class KeyWrapAlgorithm extends Algorithm { + + public static KeyWrapAlgorithm fromOID(String wrapOID) throws NoSuchAlgorithmException { + OBJECT_IDENTIFIER oid = new OBJECT_IDENTIFIER(wrapOID); ++ return fromOID(oid); ++ } + ++ public static KeyWrapAlgorithm fromOID(OBJECT_IDENTIFIER oid) throws NoSuchAlgorithmException { + if (oid.equals(AES_KEY_WRAP_PAD_OID)) + return AES_KEY_WRAP_PAD; + +@@ -154,6 +157,6 @@ public class KeyWrapAlgorithm extends Algorithm { + if (oid.equals(DES_CBC_PAD_OID)) + return DES_CBC_PAD; + +- throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + wrapOID); ++ throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + oid); + } + } +diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +index ebd269f3..abfc39a7 100644 +--- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java ++++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +@@ -337,8 +337,8 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + } + } + +- KeyWrapper wrapper = token.getKeyWrapper( +- KeyWrapAlgorithm.DES3_CBC_PAD); ++ // wrap the key ++ KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.fromOID(encAlg.toOID())); + wrapper.initWrap(key, params); + byte encrypted[] = wrapper.wrap(pri); + +-- +2.24.1 + diff --git a/0008-Use-specified-algorithm-for-KeyWrap.patch b/0008-Use-specified-algorithm-for-KeyWrap.patch new file mode 100644 index 0000000..d75534a --- /dev/null +++ b/0008-Use-specified-algorithm-for-KeyWrap.patch @@ -0,0 +1,60 @@ +From 55482c8bfa0addeb9db7b590703ba3704c5db167 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Fri, 28 Feb 2020 14:39:29 -0500 +Subject: [PATCH 8/8] Use specified algorithm for KeyWrap + +When the token-specified from of EncryptedPrivateKeyInfo.createPBE is +called, it would always request DES3_CBC_PAD as the key wrapping +algorithm, regardless of the input PBE key type. However, the other form +(with an implicit token) was correctly handling this case. + +Introduces a new KeyWrapAlgorithm method to take an OBJECT_IDENTIFIER +instead of having to convert to/from a String form. + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/crypto/KeyWrapAlgorithm.java | 5 ++++- + org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +index 3113f614..3a106977 100644 +--- a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java ++++ b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +@@ -138,7 +138,10 @@ public class KeyWrapAlgorithm extends Algorithm { + + public static KeyWrapAlgorithm fromOID(String wrapOID) throws NoSuchAlgorithmException { + OBJECT_IDENTIFIER oid = new OBJECT_IDENTIFIER(wrapOID); ++ return fromOID(oid); ++ } + ++ public static KeyWrapAlgorithm fromOID(OBJECT_IDENTIFIER oid) throws NoSuchAlgorithmException { + if (oid.equals(AES_KEY_WRAP_PAD_OID)) + return AES_KEY_WRAP_PAD; + +@@ -154,6 +157,6 @@ public class KeyWrapAlgorithm extends Algorithm { + if (oid.equals(DES_CBC_PAD_OID)) + return DES_CBC_PAD; + +- throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + wrapOID); ++ throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + oid); + } + } +diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +index ebd269f3..abfc39a7 100644 +--- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java ++++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +@@ -337,8 +337,8 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + } + } + +- KeyWrapper wrapper = token.getKeyWrapper( +- KeyWrapAlgorithm.DES3_CBC_PAD); ++ // wrap the key ++ KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.fromOID(encAlg.toOID())); + wrapper.initWrap(key, params); + byte encrypted[] = wrapper.wrap(pri); + +-- +2.24.1 + diff --git a/jss.spec b/jss.spec index 536e1db..c58e687 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.6.2 -Release: 3%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.6.3 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,7 +25,9 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch: 0001-Fix-NativeProxy-reference-tracker.patch +Patch0: 0001-Fix-base64-encoding-of-CSRs.patch +Patch1: 0002-Fix-swapped-parameter-names-with-PBE.patch +Patch2: 0003-Use-specified-algorithm-for-KeyWrap.patch ################################################################################ # Build Dependencies @@ -160,6 +162,12 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Wed Mar 4 2020 Dogtag PKI Team - 4.6.3-1 +- Rebase to JSS 4.6.3 +- Fixes base64 encoding of CSRs +- Fixes swapped parameter names in PBE +- Use specified algorithms for KeyWrap in PBE + * Tue Jan 28 2020 Dogtag PKI Team - 4.6.2-3 - Rebuild with new NSS to fix rhbz#1794814 diff --git a/sources b/sources index 32f2840..c883e35 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.6.2.tar.gz) = 53c12822b980f6dcaf5616366834fe4eaee07d84feae53096aa0ea142146e90d375910456d8192068cde5e63c3b60ded87862af50ea89c6b64224e8c105e00dd +SHA512 (jss-4.6.3.tar.gz) = 6c45b67c40737ee7bbc9ad1db8a5ed233b050697f9c048e1a49cc541de889416afd36b2c9bcdc44a52d10b0c75f036e22155a5ee95869fdf31772683637a27b1 From 3cc21a363a90b1c9ca16982b95e4295a5b6a7d70 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Wed, 4 Mar 2020 11:49:32 -0500 Subject: [PATCH 27/89] Revert "Rebase to JSS v4.6.3" This reverts commit 2bdd1199972bb28747b6f73ff140285e727a5c16. --- .gitignore | 1 - 0001-Fix-NativeProxy-reference-tracker.patch | 53 ++++++++++++ 0001-Fix-base64-encoding-of-CSRs.patch | 39 --------- ...Fix-swapped-parameter-names-with-PBE.patch | 80 ------------------- ...-Use-specified-algorithm-for-KeyWrap.patch | 60 -------------- ...-Use-specified-algorithm-for-KeyWrap.patch | 60 -------------- jss.spec | 14 +--- sources | 2 +- 8 files changed, 57 insertions(+), 252 deletions(-) create mode 100644 0001-Fix-NativeProxy-reference-tracker.patch delete mode 100644 0001-Fix-base64-encoding-of-CSRs.patch delete mode 100644 0002-Fix-swapped-parameter-names-with-PBE.patch delete mode 100644 0003-Use-specified-algorithm-for-KeyWrap.patch delete mode 100644 0008-Use-specified-algorithm-for-KeyWrap.patch diff --git a/.gitignore b/.gitignore index 77527dc..5981ea6 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,3 @@ jss-4.2.6.tar.gz /jss-4.5.3.tar.gz /jss-4.6.1.tar.gz /jss-4.6.2.tar.gz -/jss-4.6.3.tar.gz diff --git a/0001-Fix-NativeProxy-reference-tracker.patch b/0001-Fix-NativeProxy-reference-tracker.patch new file mode 100644 index 0000000..529b576 --- /dev/null +++ b/0001-Fix-NativeProxy-reference-tracker.patch @@ -0,0 +1,53 @@ +From 91514ca0a2979ba778d27220ced0cd312e2cd2d2 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Tue, 29 Oct 2019 10:43:56 -0400 +Subject: [PATCH] Fix NativeProxy reference tracker + +In eb5df01003d74b57473eacb84e538d31f5bb06ca, I introduced a bug by +setting mPointer after trying to add NativeProxy to the registry. In +most instances this won't matter, however, if another instance exists in +the HashSet with the same hash value, the equals comparator will be +used, triggering a NPE. + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/util/NativeProxy.java | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +diff --git a/org/mozilla/jss/util/NativeProxy.java b/org/mozilla/jss/util/NativeProxy.java +index 1c6d1aa5..a0811f76 100644 +--- a/org/mozilla/jss/util/NativeProxy.java ++++ b/org/mozilla/jss/util/NativeProxy.java +@@ -40,8 +40,8 @@ public abstract class NativeProxy implements AutoCloseable + */ + public NativeProxy(byte[] pointer) { + assert(pointer!=null); +- registry.add(this); + mPointer = pointer; ++ registry.add(this); + + if (saveStacktraces) { + mTrace = Arrays.toString(Thread.currentThread().getStackTrace()); +@@ -61,15 +61,12 @@ public abstract class NativeProxy implements AutoCloseable + if( ! (obj instanceof NativeProxy) ) { + return false; + } +- if( ((NativeProxy)obj).mPointer.length != mPointer.length) { ++ if (((NativeProxy)obj).mPointer == null) { ++ /* If mPointer is null, we have no way to compare the values ++ * of the pointers, so assume they're unequal. */ + return false; + } +- for(int i=0; i < mPointer.length; i++) { +- if(mPointer[i] != ((NativeProxy)obj).mPointer[i]) { +- return false; +- } +- } +- return true; ++ return Arrays.equals(((NativeProxy)obj).mPointer, mPointer); + } + + /** +-- +2.21.0 + diff --git a/0001-Fix-base64-encoding-of-CSRs.patch b/0001-Fix-base64-encoding-of-CSRs.patch deleted file mode 100644 index f898ed1..0000000 --- a/0001-Fix-base64-encoding-of-CSRs.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 18efce236af6a1affebb274838318ba715114218 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Tue, 25 Feb 2020 09:14:47 -0500 -Subject: [PATCH 3/8] Fix base64-encoding of CSRs - -In 8de4440c5652f6f1af5b4b923a15730ba84f29e1, the base64 encoder was -changed from apache-commons-codec to the Java standard library to drop -a dependency. However, the behavior changed as a result: the Java -standard library doesn't include a final line separator, whereas -apache-commons-codec did. This results in malformed CSRs: - -> YWRPxyBKvFAOB29fwPwBJLZksrwQ0xAs7sooc+qF-----END NEW CERTIFICATE REQUEST----- - -Resolves: https://pagure.io/freeipa/issue/8199 - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/netscape/security/util/Utils.java | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/org/mozilla/jss/netscape/security/util/Utils.java b/org/mozilla/jss/netscape/security/util/Utils.java -index 19f3b1f9..e6e56ce4 100644 ---- a/org/mozilla/jss/netscape/security/util/Utils.java -+++ b/org/mozilla/jss/netscape/security/util/Utils.java -@@ -378,7 +378,10 @@ public class Utils { - * @return base-64 encoded data - */ - public static String base64encodeMultiLine(byte[] bytes) { -- return Base64.getMimeEncoder().encodeToString(bytes); -+ // When switching from apache-commons-codec to the standard library, -+ // the standard library does not include a final line separator at -+ // the end of the encoded data. This results in malformed CSRs. -+ return Base64.getMimeEncoder().encodeToString(bytes) + "\r\n"; - } - - --- -2.24.1 - diff --git a/0002-Fix-swapped-parameter-names-with-PBE.patch b/0002-Fix-swapped-parameter-names-with-PBE.patch deleted file mode 100644 index c535f6e..0000000 --- a/0002-Fix-swapped-parameter-names-with-PBE.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 9f29430656342829822568f4ef49f5237b41164b Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Fri, 28 Feb 2020 14:10:32 -0500 -Subject: [PATCH 7/8] Fix swapped parameter names with PBE - -Commit 13998a9e77e60d6509ac814ed711dd21e1248ecd introduced a regression -related to extracting the parameter classes during PBE operations: -previously, the classes of the underlying encryption algorithm were -iterated over, instead of the classes of the PBE class itself. However, -this commit iterated over the PBE parameter classes; no PBE algorithm -accepts a IvParameterSpec, resulting in a null parameter passed to the -later encryption or key wrap operation. This resulted in stack traces -like the following: - -Caused by: java.security.InvalidAlgorithmParameterException: DES3/CBC/Pad cannot use a null parameter - at org.mozilla.jss.pkcs11.PK11KeyWrapper.checkParams(PK11KeyWrapper.java:225) - at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:89) - at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:57) - at org.mozilla.jss.pkix.primitive.EncryptedPrivateKeyInfo.createPBE(EncryptedPrivateKeyInfo.java:342) - -Resolves: rh-bz#1807371 - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/pkcs7/EncryptedContentInfo.java | 2 +- - org/mozilla/jss/pkix/cms/EncryptedContentInfo.java | 2 +- - org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java -index 084752c3..0344b14d 100644 ---- a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java -+++ b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java -@@ -182,7 +182,7 @@ public class EncryptedContentInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( - javax.crypto.spec.IvParameterSpec.class ) ) { -diff --git a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java -index a4709070..d85eb0d3 100644 ---- a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java -+++ b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java -@@ -180,7 +180,7 @@ public class EncryptedContentInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( IVParameterSpec.class ) ) { - params = new IVParameterSpec( kg.generatePBE_IV() ); -diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -index b35714e3..ebd269f3 100644 ---- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -@@ -147,7 +147,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( javax.crypto.spec.IvParameterSpec.class ) ) { - params = new IVParameterSpec( kg.generatePBE_IV() ); -@@ -328,7 +328,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( - javax.crypto.spec.IvParameterSpec.class ) ) { --- -2.24.1 - diff --git a/0003-Use-specified-algorithm-for-KeyWrap.patch b/0003-Use-specified-algorithm-for-KeyWrap.patch deleted file mode 100644 index d75534a..0000000 --- a/0003-Use-specified-algorithm-for-KeyWrap.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 55482c8bfa0addeb9db7b590703ba3704c5db167 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Fri, 28 Feb 2020 14:39:29 -0500 -Subject: [PATCH 8/8] Use specified algorithm for KeyWrap - -When the token-specified from of EncryptedPrivateKeyInfo.createPBE is -called, it would always request DES3_CBC_PAD as the key wrapping -algorithm, regardless of the input PBE key type. However, the other form -(with an implicit token) was correctly handling this case. - -Introduces a new KeyWrapAlgorithm method to take an OBJECT_IDENTIFIER -instead of having to convert to/from a String form. - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/crypto/KeyWrapAlgorithm.java | 5 ++++- - org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -index 3113f614..3a106977 100644 ---- a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -+++ b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -@@ -138,7 +138,10 @@ public class KeyWrapAlgorithm extends Algorithm { - - public static KeyWrapAlgorithm fromOID(String wrapOID) throws NoSuchAlgorithmException { - OBJECT_IDENTIFIER oid = new OBJECT_IDENTIFIER(wrapOID); -+ return fromOID(oid); -+ } - -+ public static KeyWrapAlgorithm fromOID(OBJECT_IDENTIFIER oid) throws NoSuchAlgorithmException { - if (oid.equals(AES_KEY_WRAP_PAD_OID)) - return AES_KEY_WRAP_PAD; - -@@ -154,6 +157,6 @@ public class KeyWrapAlgorithm extends Algorithm { - if (oid.equals(DES_CBC_PAD_OID)) - return DES_CBC_PAD; - -- throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + wrapOID); -+ throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + oid); - } - } -diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -index ebd269f3..abfc39a7 100644 ---- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -@@ -337,8 +337,8 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - } - } - -- KeyWrapper wrapper = token.getKeyWrapper( -- KeyWrapAlgorithm.DES3_CBC_PAD); -+ // wrap the key -+ KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.fromOID(encAlg.toOID())); - wrapper.initWrap(key, params); - byte encrypted[] = wrapper.wrap(pri); - --- -2.24.1 - diff --git a/0008-Use-specified-algorithm-for-KeyWrap.patch b/0008-Use-specified-algorithm-for-KeyWrap.patch deleted file mode 100644 index d75534a..0000000 --- a/0008-Use-specified-algorithm-for-KeyWrap.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 55482c8bfa0addeb9db7b590703ba3704c5db167 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Fri, 28 Feb 2020 14:39:29 -0500 -Subject: [PATCH 8/8] Use specified algorithm for KeyWrap - -When the token-specified from of EncryptedPrivateKeyInfo.createPBE is -called, it would always request DES3_CBC_PAD as the key wrapping -algorithm, regardless of the input PBE key type. However, the other form -(with an implicit token) was correctly handling this case. - -Introduces a new KeyWrapAlgorithm method to take an OBJECT_IDENTIFIER -instead of having to convert to/from a String form. - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/crypto/KeyWrapAlgorithm.java | 5 ++++- - org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -index 3113f614..3a106977 100644 ---- a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -+++ b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -@@ -138,7 +138,10 @@ public class KeyWrapAlgorithm extends Algorithm { - - public static KeyWrapAlgorithm fromOID(String wrapOID) throws NoSuchAlgorithmException { - OBJECT_IDENTIFIER oid = new OBJECT_IDENTIFIER(wrapOID); -+ return fromOID(oid); -+ } - -+ public static KeyWrapAlgorithm fromOID(OBJECT_IDENTIFIER oid) throws NoSuchAlgorithmException { - if (oid.equals(AES_KEY_WRAP_PAD_OID)) - return AES_KEY_WRAP_PAD; - -@@ -154,6 +157,6 @@ public class KeyWrapAlgorithm extends Algorithm { - if (oid.equals(DES_CBC_PAD_OID)) - return DES_CBC_PAD; - -- throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + wrapOID); -+ throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + oid); - } - } -diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -index ebd269f3..abfc39a7 100644 ---- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -@@ -337,8 +337,8 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - } - } - -- KeyWrapper wrapper = token.getKeyWrapper( -- KeyWrapAlgorithm.DES3_CBC_PAD); -+ // wrap the key -+ KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.fromOID(encAlg.toOID())); - wrapper.initWrap(key, params); - byte encrypted[] = wrapper.wrap(pri); - --- -2.24.1 - diff --git a/jss.spec b/jss.spec index c58e687..536e1db 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.6.3 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.6.2 +Release: 3%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,9 +25,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch0: 0001-Fix-base64-encoding-of-CSRs.patch -Patch1: 0002-Fix-swapped-parameter-names-with-PBE.patch -Patch2: 0003-Use-specified-algorithm-for-KeyWrap.patch +Patch: 0001-Fix-NativeProxy-reference-tracker.patch ################################################################################ # Build Dependencies @@ -162,12 +160,6 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog -* Wed Mar 4 2020 Dogtag PKI Team - 4.6.3-1 -- Rebase to JSS 4.6.3 -- Fixes base64 encoding of CSRs -- Fixes swapped parameter names in PBE -- Use specified algorithms for KeyWrap in PBE - * Tue Jan 28 2020 Dogtag PKI Team - 4.6.2-3 - Rebuild with new NSS to fix rhbz#1794814 diff --git a/sources b/sources index c883e35..32f2840 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.6.3.tar.gz) = 6c45b67c40737ee7bbc9ad1db8a5ed233b050697f9c048e1a49cc541de889416afd36b2c9bcdc44a52d10b0c75f036e22155a5ee95869fdf31772683637a27b1 +SHA512 (jss-4.6.2.tar.gz) = 53c12822b980f6dcaf5616366834fe4eaee07d84feae53096aa0ea142146e90d375910456d8192068cde5e63c3b60ded87862af50ea89c6b64224e8c105e00dd From 01ab6695c1867669142609f0eb7e373d9c4d3e4d Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Wed, 4 Mar 2020 12:01:29 -0500 Subject: [PATCH 28/89] Add fixes for KRA issues Signed-off-by: Alexander Scheel --- ...Fix-swapped-parameter-names-with-PBE.patch | 80 +++++++++++++++++++ ...-Use-specified-algorithm-for-KeyWrap.patch | 60 ++++++++++++++ jss.spec | 9 ++- 3 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 0002-Fix-swapped-parameter-names-with-PBE.patch create mode 100644 0003-Use-specified-algorithm-for-KeyWrap.patch diff --git a/0002-Fix-swapped-parameter-names-with-PBE.patch b/0002-Fix-swapped-parameter-names-with-PBE.patch new file mode 100644 index 0000000..c535f6e --- /dev/null +++ b/0002-Fix-swapped-parameter-names-with-PBE.patch @@ -0,0 +1,80 @@ +From 9f29430656342829822568f4ef49f5237b41164b Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Fri, 28 Feb 2020 14:10:32 -0500 +Subject: [PATCH 7/8] Fix swapped parameter names with PBE + +Commit 13998a9e77e60d6509ac814ed711dd21e1248ecd introduced a regression +related to extracting the parameter classes during PBE operations: +previously, the classes of the underlying encryption algorithm were +iterated over, instead of the classes of the PBE class itself. However, +this commit iterated over the PBE parameter classes; no PBE algorithm +accepts a IvParameterSpec, resulting in a null parameter passed to the +later encryption or key wrap operation. This resulted in stack traces +like the following: + +Caused by: java.security.InvalidAlgorithmParameterException: DES3/CBC/Pad cannot use a null parameter + at org.mozilla.jss.pkcs11.PK11KeyWrapper.checkParams(PK11KeyWrapper.java:225) + at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:89) + at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:57) + at org.mozilla.jss.pkix.primitive.EncryptedPrivateKeyInfo.createPBE(EncryptedPrivateKeyInfo.java:342) + +Resolves: rh-bz#1807371 + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/pkcs7/EncryptedContentInfo.java | 2 +- + org/mozilla/jss/pkix/cms/EncryptedContentInfo.java | 2 +- + org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java +index 084752c3..0344b14d 100644 +--- a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java ++++ b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java +@@ -182,7 +182,7 @@ public class EncryptedContentInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( + javax.crypto.spec.IvParameterSpec.class ) ) { +diff --git a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java +index a4709070..d85eb0d3 100644 +--- a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java ++++ b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java +@@ -180,7 +180,7 @@ public class EncryptedContentInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( IVParameterSpec.class ) ) { + params = new IVParameterSpec( kg.generatePBE_IV() ); +diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +index b35714e3..ebd269f3 100644 +--- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java ++++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +@@ -147,7 +147,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( javax.crypto.spec.IvParameterSpec.class ) ) { + params = new IVParameterSpec( kg.generatePBE_IV() ); +@@ -328,7 +328,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + // generate IV + EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); + AlgorithmParameterSpec params=null; +- Class [] paramClasses = pbeAlg.getParameterClasses(); ++ Class [] paramClasses = encAlg.getParameterClasses(); + for (int i = 0; i < paramClasses.length; i ++) { + if ( paramClasses[i].equals( + javax.crypto.spec.IvParameterSpec.class ) ) { +-- +2.24.1 + diff --git a/0003-Use-specified-algorithm-for-KeyWrap.patch b/0003-Use-specified-algorithm-for-KeyWrap.patch new file mode 100644 index 0000000..d75534a --- /dev/null +++ b/0003-Use-specified-algorithm-for-KeyWrap.patch @@ -0,0 +1,60 @@ +From 55482c8bfa0addeb9db7b590703ba3704c5db167 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Fri, 28 Feb 2020 14:39:29 -0500 +Subject: [PATCH 8/8] Use specified algorithm for KeyWrap + +When the token-specified from of EncryptedPrivateKeyInfo.createPBE is +called, it would always request DES3_CBC_PAD as the key wrapping +algorithm, regardless of the input PBE key type. However, the other form +(with an implicit token) was correctly handling this case. + +Introduces a new KeyWrapAlgorithm method to take an OBJECT_IDENTIFIER +instead of having to convert to/from a String form. + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/crypto/KeyWrapAlgorithm.java | 5 ++++- + org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +index 3113f614..3a106977 100644 +--- a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java ++++ b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +@@ -138,7 +138,10 @@ public class KeyWrapAlgorithm extends Algorithm { + + public static KeyWrapAlgorithm fromOID(String wrapOID) throws NoSuchAlgorithmException { + OBJECT_IDENTIFIER oid = new OBJECT_IDENTIFIER(wrapOID); ++ return fromOID(oid); ++ } + ++ public static KeyWrapAlgorithm fromOID(OBJECT_IDENTIFIER oid) throws NoSuchAlgorithmException { + if (oid.equals(AES_KEY_WRAP_PAD_OID)) + return AES_KEY_WRAP_PAD; + +@@ -154,6 +157,6 @@ public class KeyWrapAlgorithm extends Algorithm { + if (oid.equals(DES_CBC_PAD_OID)) + return DES_CBC_PAD; + +- throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + wrapOID); ++ throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + oid); + } + } +diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +index ebd269f3..abfc39a7 100644 +--- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java ++++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java +@@ -337,8 +337,8 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { + } + } + +- KeyWrapper wrapper = token.getKeyWrapper( +- KeyWrapAlgorithm.DES3_CBC_PAD); ++ // wrap the key ++ KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.fromOID(encAlg.toOID())); + wrapper.initWrap(key, params); + byte encrypted[] = wrapper.wrap(pri); + +-- +2.24.1 + diff --git a/jss.spec b/jss.spec index 536e1db..da423a5 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.6.2 -Release: 3%{?_timestamp}%{?_commit_id}%{?dist} +Release: 4%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,7 +25,9 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch: 0001-Fix-NativeProxy-reference-tracker.patch +Patch0: 0001-Fix-NativeProxy-reference-tracker.patch +Patch1: 0002-Fix-swapped-parameter-names-with-PBE.patch +Patch2: 0003-Use-specified-algorithm-for-KeyWrap.patch ################################################################################ # Build Dependencies @@ -160,6 +162,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Wed Mar 04 2020 Dogtag PKI Team - 4.6.2-4 +- Fix for PBE errors + * Tue Jan 28 2020 Dogtag PKI Team - 4.6.2-3 - Rebuild with new NSS to fix rhbz#1794814 From 53c7b90df429ae7050bab67118bf53dbfc00b016 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 5 Mar 2020 09:32:14 -0500 Subject: [PATCH 29/89] Revert "Revert "Rebase to JSS v4.6.3"" This reverts commit 3cc21a363a90b1c9ca16982b95e4295a5b6a7d70. --- .gitignore | 1 + 0001-Fix-NativeProxy-reference-tracker.patch | 53 -------------------- 0001-Fix-base64-encoding-of-CSRs.patch | 39 ++++++++++++++ jss.spec | 10 ++-- sources | 2 +- 5 files changed, 48 insertions(+), 57 deletions(-) delete mode 100644 0001-Fix-NativeProxy-reference-tracker.patch create mode 100644 0001-Fix-base64-encoding-of-CSRs.patch diff --git a/.gitignore b/.gitignore index 5981ea6..77527dc 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ jss-4.2.6.tar.gz /jss-4.5.3.tar.gz /jss-4.6.1.tar.gz /jss-4.6.2.tar.gz +/jss-4.6.3.tar.gz diff --git a/0001-Fix-NativeProxy-reference-tracker.patch b/0001-Fix-NativeProxy-reference-tracker.patch deleted file mode 100644 index 529b576..0000000 --- a/0001-Fix-NativeProxy-reference-tracker.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 91514ca0a2979ba778d27220ced0cd312e2cd2d2 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Tue, 29 Oct 2019 10:43:56 -0400 -Subject: [PATCH] Fix NativeProxy reference tracker - -In eb5df01003d74b57473eacb84e538d31f5bb06ca, I introduced a bug by -setting mPointer after trying to add NativeProxy to the registry. In -most instances this won't matter, however, if another instance exists in -the HashSet with the same hash value, the equals comparator will be -used, triggering a NPE. - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/util/NativeProxy.java | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - -diff --git a/org/mozilla/jss/util/NativeProxy.java b/org/mozilla/jss/util/NativeProxy.java -index 1c6d1aa5..a0811f76 100644 ---- a/org/mozilla/jss/util/NativeProxy.java -+++ b/org/mozilla/jss/util/NativeProxy.java -@@ -40,8 +40,8 @@ public abstract class NativeProxy implements AutoCloseable - */ - public NativeProxy(byte[] pointer) { - assert(pointer!=null); -- registry.add(this); - mPointer = pointer; -+ registry.add(this); - - if (saveStacktraces) { - mTrace = Arrays.toString(Thread.currentThread().getStackTrace()); -@@ -61,15 +61,12 @@ public abstract class NativeProxy implements AutoCloseable - if( ! (obj instanceof NativeProxy) ) { - return false; - } -- if( ((NativeProxy)obj).mPointer.length != mPointer.length) { -+ if (((NativeProxy)obj).mPointer == null) { -+ /* If mPointer is null, we have no way to compare the values -+ * of the pointers, so assume they're unequal. */ - return false; - } -- for(int i=0; i < mPointer.length; i++) { -- if(mPointer[i] != ((NativeProxy)obj).mPointer[i]) { -- return false; -- } -- } -- return true; -+ return Arrays.equals(((NativeProxy)obj).mPointer, mPointer); - } - - /** --- -2.21.0 - diff --git a/0001-Fix-base64-encoding-of-CSRs.patch b/0001-Fix-base64-encoding-of-CSRs.patch new file mode 100644 index 0000000..f898ed1 --- /dev/null +++ b/0001-Fix-base64-encoding-of-CSRs.patch @@ -0,0 +1,39 @@ +From 18efce236af6a1affebb274838318ba715114218 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Tue, 25 Feb 2020 09:14:47 -0500 +Subject: [PATCH 3/8] Fix base64-encoding of CSRs + +In 8de4440c5652f6f1af5b4b923a15730ba84f29e1, the base64 encoder was +changed from apache-commons-codec to the Java standard library to drop +a dependency. However, the behavior changed as a result: the Java +standard library doesn't include a final line separator, whereas +apache-commons-codec did. This results in malformed CSRs: + +> YWRPxyBKvFAOB29fwPwBJLZksrwQ0xAs7sooc+qF-----END NEW CERTIFICATE REQUEST----- + +Resolves: https://pagure.io/freeipa/issue/8199 + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/netscape/security/util/Utils.java | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/org/mozilla/jss/netscape/security/util/Utils.java b/org/mozilla/jss/netscape/security/util/Utils.java +index 19f3b1f9..e6e56ce4 100644 +--- a/org/mozilla/jss/netscape/security/util/Utils.java ++++ b/org/mozilla/jss/netscape/security/util/Utils.java +@@ -378,7 +378,10 @@ public class Utils { + * @return base-64 encoded data + */ + public static String base64encodeMultiLine(byte[] bytes) { +- return Base64.getMimeEncoder().encodeToString(bytes); ++ // When switching from apache-commons-codec to the standard library, ++ // the standard library does not include a final line separator at ++ // the end of the encoded data. This results in malformed CSRs. ++ return Base64.getMimeEncoder().encodeToString(bytes) + "\r\n"; + } + + +-- +2.24.1 + diff --git a/jss.spec b/jss.spec index da423a5..2610821 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.6.2 -Release: 4%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.6.3 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 # To generate the source tarball: @@ -25,7 +25,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch0: 0001-Fix-NativeProxy-reference-tracker.patch +Patch0: 0001-Fix-base64-encoding-of-CSRs.patch Patch1: 0002-Fix-swapped-parameter-names-with-PBE.patch Patch2: 0003-Use-specified-algorithm-for-KeyWrap.patch @@ -162,6 +162,10 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Mar 5 2020 Dogtag PKI Team - 4.6.3-1 +- Rebase to JSS 4.6.3 +- Fixes base64 encoding of CSRs + * Wed Mar 04 2020 Dogtag PKI Team - 4.6.2-4 - Fix for PBE errors diff --git a/sources b/sources index 32f2840..c883e35 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.6.2.tar.gz) = 53c12822b980f6dcaf5616366834fe4eaee07d84feae53096aa0ea142146e90d375910456d8192068cde5e63c3b60ded87862af50ea89c6b64224e8c105e00dd +SHA512 (jss-4.6.3.tar.gz) = 6c45b67c40737ee7bbc9ad1db8a5ed233b050697f9c048e1a49cc541de889416afd36b2c9bcdc44a52d10b0c75f036e22155a5ee95869fdf31772683637a27b1 From c7f3ad477fa72a99b17c405aa4f48bedaee4686c Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 27 Apr 2020 11:14:28 -0400 Subject: [PATCH 30/89] Rebase to upstream JSS v4.6.4 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 9 +++++---- sources | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 77527dc..6c8702e 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ jss-4.2.6.tar.gz /jss-4.6.1.tar.gz /jss-4.6.2.tar.gz /jss-4.6.3.tar.gz +/jss-4.6.4.tar.gz diff --git a/jss.spec b/jss.spec index 2610821..0920b44 100644 --- a/jss.spec +++ b/jss.spec @@ -6,7 +6,7 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.6.3 +Version: 4.6.4 Release: 1%{?_timestamp}%{?_commit_id}%{?dist} # global _phase -a1 @@ -25,9 +25,6 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch0: 0001-Fix-base64-encoding-of-CSRs.patch -Patch1: 0002-Fix-swapped-parameter-names-with-PBE.patch -Patch2: 0003-Use-specified-algorithm-for-KeyWrap.patch ################################################################################ # Build Dependencies @@ -162,6 +159,10 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Mon Apr 27 2020 Dogtag PKI Team - 4.6.4-1 +- Rebase to JSS 4.6.4 +- Fixes memory leak present since v4.6.2 + * Thu Mar 5 2020 Dogtag PKI Team - 4.6.3-1 - Rebase to JSS 4.6.3 - Fixes base64 encoding of CSRs diff --git a/sources b/sources index c883e35..25b6a59 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.6.3.tar.gz) = 6c45b67c40737ee7bbc9ad1db8a5ed233b050697f9c048e1a49cc541de889416afd36b2c9bcdc44a52d10b0c75f036e22155a5ee95869fdf31772683637a27b1 +SHA512 (jss-4.6.4.tar.gz) = c0adc950e1ce5e0f3d846dcb158d831575be84176ded3eec7ce3569cfd96c872a2089a2eede249c5924e1eee58d88574accd3403623910343130cf90b504b348 From 03671f7edfa8387c21b348de21f7cd07346e17f8 Mon Sep 17 00:00:00 2001 From: Dinesh Prasanth M K Date: Wed, 10 Jun 2020 15:40:00 -0400 Subject: [PATCH 31/89] Rebase to latest upstream version 4.7.0-b2 Also, remove unused patch files Signed-off-by: Dinesh Prasanth M K --- .gitignore | 1 + 0001-Fix-base64-encoding-of-CSRs.patch | 39 --------- ...Fix-swapped-parameter-names-with-PBE.patch | 80 ------------------- ...-Use-specified-algorithm-for-KeyWrap.patch | 60 -------------- jss.spec | 25 +++--- sources | 2 +- 6 files changed, 17 insertions(+), 190 deletions(-) delete mode 100644 0001-Fix-base64-encoding-of-CSRs.patch delete mode 100644 0002-Fix-swapped-parameter-names-with-PBE.patch delete mode 100644 0003-Use-specified-algorithm-for-KeyWrap.patch diff --git a/.gitignore b/.gitignore index 6c8702e..de898e2 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ jss-4.2.6.tar.gz /jss-4.6.2.tar.gz /jss-4.6.3.tar.gz /jss-4.6.4.tar.gz +/jss-4.7.0-b2.tar.gz diff --git a/0001-Fix-base64-encoding-of-CSRs.patch b/0001-Fix-base64-encoding-of-CSRs.patch deleted file mode 100644 index f898ed1..0000000 --- a/0001-Fix-base64-encoding-of-CSRs.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 18efce236af6a1affebb274838318ba715114218 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Tue, 25 Feb 2020 09:14:47 -0500 -Subject: [PATCH 3/8] Fix base64-encoding of CSRs - -In 8de4440c5652f6f1af5b4b923a15730ba84f29e1, the base64 encoder was -changed from apache-commons-codec to the Java standard library to drop -a dependency. However, the behavior changed as a result: the Java -standard library doesn't include a final line separator, whereas -apache-commons-codec did. This results in malformed CSRs: - -> YWRPxyBKvFAOB29fwPwBJLZksrwQ0xAs7sooc+qF-----END NEW CERTIFICATE REQUEST----- - -Resolves: https://pagure.io/freeipa/issue/8199 - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/netscape/security/util/Utils.java | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/org/mozilla/jss/netscape/security/util/Utils.java b/org/mozilla/jss/netscape/security/util/Utils.java -index 19f3b1f9..e6e56ce4 100644 ---- a/org/mozilla/jss/netscape/security/util/Utils.java -+++ b/org/mozilla/jss/netscape/security/util/Utils.java -@@ -378,7 +378,10 @@ public class Utils { - * @return base-64 encoded data - */ - public static String base64encodeMultiLine(byte[] bytes) { -- return Base64.getMimeEncoder().encodeToString(bytes); -+ // When switching from apache-commons-codec to the standard library, -+ // the standard library does not include a final line separator at -+ // the end of the encoded data. This results in malformed CSRs. -+ return Base64.getMimeEncoder().encodeToString(bytes) + "\r\n"; - } - - --- -2.24.1 - diff --git a/0002-Fix-swapped-parameter-names-with-PBE.patch b/0002-Fix-swapped-parameter-names-with-PBE.patch deleted file mode 100644 index c535f6e..0000000 --- a/0002-Fix-swapped-parameter-names-with-PBE.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 9f29430656342829822568f4ef49f5237b41164b Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Fri, 28 Feb 2020 14:10:32 -0500 -Subject: [PATCH 7/8] Fix swapped parameter names with PBE - -Commit 13998a9e77e60d6509ac814ed711dd21e1248ecd introduced a regression -related to extracting the parameter classes during PBE operations: -previously, the classes of the underlying encryption algorithm were -iterated over, instead of the classes of the PBE class itself. However, -this commit iterated over the PBE parameter classes; no PBE algorithm -accepts a IvParameterSpec, resulting in a null parameter passed to the -later encryption or key wrap operation. This resulted in stack traces -like the following: - -Caused by: java.security.InvalidAlgorithmParameterException: DES3/CBC/Pad cannot use a null parameter - at org.mozilla.jss.pkcs11.PK11KeyWrapper.checkParams(PK11KeyWrapper.java:225) - at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:89) - at org.mozilla.jss.pkcs11.PK11KeyWrapper.initWrap(PK11KeyWrapper.java:57) - at org.mozilla.jss.pkix.primitive.EncryptedPrivateKeyInfo.createPBE(EncryptedPrivateKeyInfo.java:342) - -Resolves: rh-bz#1807371 - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/pkcs7/EncryptedContentInfo.java | 2 +- - org/mozilla/jss/pkix/cms/EncryptedContentInfo.java | 2 +- - org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java -index 084752c3..0344b14d 100644 ---- a/org/mozilla/jss/pkcs7/EncryptedContentInfo.java -+++ b/org/mozilla/jss/pkcs7/EncryptedContentInfo.java -@@ -182,7 +182,7 @@ public class EncryptedContentInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( - javax.crypto.spec.IvParameterSpec.class ) ) { -diff --git a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java -index a4709070..d85eb0d3 100644 ---- a/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java -+++ b/org/mozilla/jss/pkix/cms/EncryptedContentInfo.java -@@ -180,7 +180,7 @@ public class EncryptedContentInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( IVParameterSpec.class ) ) { - params = new IVParameterSpec( kg.generatePBE_IV() ); -diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -index b35714e3..ebd269f3 100644 ---- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -@@ -147,7 +147,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( javax.crypto.spec.IvParameterSpec.class ) ) { - params = new IVParameterSpec( kg.generatePBE_IV() ); -@@ -328,7 +328,7 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - // generate IV - EncryptionAlgorithm encAlg = pbeAlg.getEncryptionAlg(); - AlgorithmParameterSpec params=null; -- Class [] paramClasses = pbeAlg.getParameterClasses(); -+ Class [] paramClasses = encAlg.getParameterClasses(); - for (int i = 0; i < paramClasses.length; i ++) { - if ( paramClasses[i].equals( - javax.crypto.spec.IvParameterSpec.class ) ) { --- -2.24.1 - diff --git a/0003-Use-specified-algorithm-for-KeyWrap.patch b/0003-Use-specified-algorithm-for-KeyWrap.patch deleted file mode 100644 index d75534a..0000000 --- a/0003-Use-specified-algorithm-for-KeyWrap.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 55482c8bfa0addeb9db7b590703ba3704c5db167 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Fri, 28 Feb 2020 14:39:29 -0500 -Subject: [PATCH 8/8] Use specified algorithm for KeyWrap - -When the token-specified from of EncryptedPrivateKeyInfo.createPBE is -called, it would always request DES3_CBC_PAD as the key wrapping -algorithm, regardless of the input PBE key type. However, the other form -(with an implicit token) was correctly handling this case. - -Introduces a new KeyWrapAlgorithm method to take an OBJECT_IDENTIFIER -instead of having to convert to/from a String form. - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/crypto/KeyWrapAlgorithm.java | 5 ++++- - org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -index 3113f614..3a106977 100644 ---- a/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -+++ b/org/mozilla/jss/crypto/KeyWrapAlgorithm.java -@@ -138,7 +138,10 @@ public class KeyWrapAlgorithm extends Algorithm { - - public static KeyWrapAlgorithm fromOID(String wrapOID) throws NoSuchAlgorithmException { - OBJECT_IDENTIFIER oid = new OBJECT_IDENTIFIER(wrapOID); -+ return fromOID(oid); -+ } - -+ public static KeyWrapAlgorithm fromOID(OBJECT_IDENTIFIER oid) throws NoSuchAlgorithmException { - if (oid.equals(AES_KEY_WRAP_PAD_OID)) - return AES_KEY_WRAP_PAD; - -@@ -154,6 +157,6 @@ public class KeyWrapAlgorithm extends Algorithm { - if (oid.equals(DES_CBC_PAD_OID)) - return DES_CBC_PAD; - -- throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + wrapOID); -+ throw new NoSuchAlgorithmException("Unknown Algorithm for OID: " + oid); - } - } -diff --git a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -index ebd269f3..abfc39a7 100644 ---- a/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -+++ b/org/mozilla/jss/pkix/primitive/EncryptedPrivateKeyInfo.java -@@ -337,8 +337,8 @@ public class EncryptedPrivateKeyInfo implements ASN1Value { - } - } - -- KeyWrapper wrapper = token.getKeyWrapper( -- KeyWrapAlgorithm.DES3_CBC_PAD); -+ // wrap the key -+ KeyWrapper wrapper = token.getKeyWrapper(KeyWrapAlgorithm.fromOID(encAlg.toOID())); - wrapper.initWrap(key, params); - byte encrypted[] = wrapper.wrap(pri); - --- -2.24.1 - diff --git a/jss.spec b/jss.spec index 0920b44..abb49ae 100644 --- a/jss.spec +++ b/jss.spec @@ -6,9 +6,9 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.6.4 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} -# global _phase -a1 +Version: 4.7.0 +Release: 0.2%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -b2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -34,11 +34,13 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas BuildRequires: git BuildRequires: make BuildRequires: cmake +BuildRequires: zip +BuildRequires: unzip BuildRequires: gcc-c++ BuildRequires: nspr-devel >= 4.13.1 -BuildRequires: nss-devel >= 3.30 -BuildRequires: nss-tools >= 3.30 +BuildRequires: nss-devel >= 3.44 +BuildRequires: nss-tools >= 3.44 BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: slf4j @@ -49,11 +51,10 @@ BuildRequires: glassfish-jaxb-api BuildRequires: slf4j-jdk14 %endif BuildRequires: apache-commons-lang -BuildRequires: apache-commons-codec BuildRequires: junit -Requires: nss >= 3.30 +Requires: nss >= 3.44 Requires: java-headless Requires: jpackage-utils Requires: slf4j @@ -64,7 +65,6 @@ Requires: glassfish-jaxb-api Requires: slf4j-jdk14 %endif Requires: apache-commons-lang -Requires: apache-commons-codec Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 @@ -116,7 +116,7 @@ rm -rf build && mkdir -p build && cd build .. %{__make} all -%{__make} javadoc || true +%{__make} javadoc ctest --output-on-failure ################################################################################ @@ -147,7 +147,8 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %files %defattr(-,root,root,-) -%doc jss.html MPL-1.1.txt gpl.txt lgpl.txt +%doc jss.html +%license MPL-1.1.txt gpl.txt lgpl.txt %{_libdir}/* %{_jnidir}/* @@ -159,6 +160,10 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Wed Jun 10 2020 Dogtag PKI Team - 4.7.0-0.2 +- Rebase to latest upstream JSS 4.7.0 +- JSS Provided SSLEngine + * Mon Apr 27 2020 Dogtag PKI Team - 4.6.4-1 - Rebase to JSS 4.6.4 - Fixes memory leak present since v4.6.2 diff --git a/sources b/sources index 25b6a59..eaf917e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.6.4.tar.gz) = c0adc950e1ce5e0f3d846dcb158d831575be84176ded3eec7ce3569cfd96c872a2089a2eede249c5924e1eee58d88574accd3403623910343130cf90b504b348 +SHA512 (jss-4.7.0-b2.tar.gz) = 6bd5fd4823ea4b14bfd53dc64796b6fcb7018a6118b943b46be7a5caf874a386802f1e6e0e542743be505d73f2b9625b0f1d479b1292c7364ac62d8cee3e4e52 From 90b6186a2b3a6a1385fd372f1eb243f016bd0d9c Mon Sep 17 00:00:00 2001 From: Dinesh Prasanth M K Date: Tue, 30 Jun 2020 17:11:55 -0400 Subject: [PATCH 32/89] Rebased to upstream JSS v4.7.0-b4 --- .gitignore | 1 + jss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index de898e2..87c5030 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ jss-4.2.6.tar.gz /jss-4.6.3.tar.gz /jss-4.6.4.tar.gz /jss-4.7.0-b2.tar.gz +/jss-4.7.0-b4.tar.gz diff --git a/jss.spec b/jss.spec index abb49ae..554fecc 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.7.0 -Release: 0.2%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -b2 +Release: 0.4%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -b4 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Jun 30 2020 Dogtag PKI Team - 4.7.0-0.4 +- Rebase to latest upstream JSS v4.7.0-b4 + * Wed Jun 10 2020 Dogtag PKI Team - 4.7.0-0.2 - Rebase to latest upstream JSS 4.7.0 - JSS Provided SSLEngine diff --git a/sources b/sources index eaf917e..eae7417 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.7.0-b2.tar.gz) = 6bd5fd4823ea4b14bfd53dc64796b6fcb7018a6118b943b46be7a5caf874a386802f1e6e0e542743be505d73f2b9625b0f1d479b1292c7364ac62d8cee3e4e52 +SHA512 (jss-4.7.0-b4.tar.gz) = 79c01fc513de479a63cbe164c772f9f685afe032a280f59eb3bb096a653424b3df1a9403c8cf443ffbe8b9a1d97a8aeb48064fbbe92e4c12e29767fb2a547d9f From 77453bee29456db4d5a7132dae0cac6aae12df11 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 6 Jul 2020 17:34:31 -0400 Subject: [PATCH 33/89] Fix build with new Crypto-Policies on Fedora Rawhide Signed-off-by: Alexander Scheel --- jss-crypto-policies-1.patch | 49 +++++++++++++++++++++++++++++++++++++ jss-crypto-policies-2.patch | 47 +++++++++++++++++++++++++++++++++++ jss.spec | 7 +++++- 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 jss-crypto-policies-1.patch create mode 100644 jss-crypto-policies-2.patch diff --git a/jss-crypto-policies-1.patch b/jss-crypto-policies-1.patch new file mode 100644 index 0000000..dc23e85 --- /dev/null +++ b/jss-crypto-policies-1.patch @@ -0,0 +1,49 @@ +From 1fb6097a2ab73ef897d011e7383d7f5f1bf6a1df Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Wed, 1 Jul 2020 12:41:20 -0400 +Subject: [PATCH] Replace SHA-1 signature with SHA-256 + +A recent change in Fedora Rawhide's crypto-policies package caused +failures in the tests like the following: + + Exception in thread "main" java.io.IOException: SocketException cannot read on socket: Error reading from socket: (-12271) SSL peer cannot verify your certificate. + at org.mozilla.jss.ssl.SSLSocket.read(SSLSocket.java:1494) + at org.mozilla.jss.ssl.SSLInputStream.read(SSLInputStream.java:38) + at org.mozilla.jss.ssl.SSLInputStream.read(SSLInputStream.java:25) + at org.mozilla.jss.tests.SSLClientAuth.run(SSLClientAuth.java:435) + at java.lang.Thread.run(Thread.java:748) + Caused by: org.mozilla.jss.ssl.SSLSocketException: Error reading from socket: (-12271) SSL peer cannot verify your certificate. + at org.mozilla.jss.ssl.SSLSocket.socketRead(Native Method) + at org.mozilla.jss.ssl.SSLSocket.read(SSLSocket.java:1488) + ... 4 more + Server exiting + org.mozilla.jss.ssl.SSLSocketException: SSL_ForceHandshake failed: (-8016) Unknown error + at org.mozilla.jss.ssl.SSLSocket.forceHandshake(Native Method) + at org.mozilla.jss.tests.SSLClientAuth.testConnection(SSLClientAuth.java:345) + at org.mozilla.jss.tests.SSLClientAuth.doIt(SSLClientAuth.java:156) + at org.mozilla.jss.tests.SSLClientAuth.main(SSLClientAuth.java:90) + +This was caused by dropping SHA-1 as an allowed hash during handshakes. +However, because SSLClientAuth manually generated its certificate (and +explicitly asked for SHA-1), it failed. + +Switch to SHA-256 instead. + +Signed-off-by: Alexander Scheel +--- + org/mozilla/jss/tests/SSLClientAuth.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/org/mozilla/jss/tests/SSLClientAuth.java b/org/mozilla/jss/tests/SSLClientAuth.java +index 6f1fd2b12..bf270a634 100644 +--- a/org/mozilla/jss/tests/SSLClientAuth.java ++++ b/org/mozilla/jss/tests/SSLClientAuth.java +@@ -28,7 +28,7 @@ + + private CryptoManager cm; + public static final SignatureAlgorithm sigAlg = +- SignatureAlgorithm.RSASignatureWithSHA1Digest; ++ SignatureAlgorithm.RSASignatureWithSHA256Digest; + + /** + * Method that generates a certificate for given credential diff --git a/jss-crypto-policies-2.patch b/jss-crypto-policies-2.patch new file mode 100644 index 0000000..71fe8c2 --- /dev/null +++ b/jss-crypto-policies-2.patch @@ -0,0 +1,47 @@ +From 8ed5a82a973922d07d0610fd42c48b2a0ec97d6c Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Wed, 1 Jul 2020 12:44:53 -0400 +Subject: [PATCH] Remove all legacy DSS/DSA tests + +The only signature algorithm suppoted with DSS is SHA-1, which will soon +become deprecated and broken. DSS itself isn't widely used either, so we +should remove it from the test suite as well. + +Signed-off-by: Alexander Scheel +--- + cmake/JSSTests.cmake | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +diff --git a/cmake/JSSTests.cmake b/cmake/JSSTests.cmake +index a26b95425..a0fe36e22 100644 +--- a/cmake/JSSTests.cmake ++++ b/cmake/JSSTests.cmake +@@ -170,11 +170,6 @@ macro(jss_tests) + COMMAND "org.mozilla.jss.tests.GenerateTestCert" "${RESULTS_NSSDB_OUTPUT_DIR}" "${PASSWORD_FILE}" "30" "localhost" "SHA-256/EC" "CA_ECDSA" "Server_ECDSA" "Client_ECDSA" + DEPENDS "Generate_known_RSA_cert_pair" + ) +- jss_test_java( +- NAME "Generate_known_DSS_cert_pair" +- COMMAND "org.mozilla.jss.tests.GenerateTestCert" "${RESULTS_NSSDB_OUTPUT_DIR}" "${PASSWORD_FILE}" "40" "localhost" "SHA-1/DSA" "CA_DSS" "Server_DSS" "Client_DSS" +- DEPENDS "Generate_known_ECDSA_cert_pair" +- ) + jss_test_exec( + NAME "Create_PKCS11_cert_to_PKCS12_rsa.pfx" + COMMAND "pk12util" "-o" "${RESULTS_NSSDB_OUTPUT_DIR}/rsa.pfx" "-n" "CA_RSA" "-d" "${RESULTS_NSSDB_OUTPUT_DIR}" "-K" "${DB_PWD}" "-W" "${DB_PWD}" +@@ -185,15 +180,10 @@ macro(jss_tests) + COMMAND "pk12util" "-o" "${RESULTS_NSSDB_OUTPUT_DIR}/ecdsa.pfx" "-n" "CA_ECDSA" "-d" "${RESULTS_NSSDB_OUTPUT_DIR}" "-K" "${DB_PWD}" "-W" "${DB_PWD}" + DEPENDS "Generate_known_ECDSA_cert_pair" + ) +- jss_test_exec( +- NAME "Create_PKCS11_cert_to_PKCS12_dss.pfx" +- COMMAND "pk12util" "-o" "${RESULTS_NSSDB_OUTPUT_DIR}/dss.pfx" "-n" "CA_DSS" "-d" "${RESULTS_NSSDB_OUTPUT_DIR}" "-K" "${DB_PWD}" "-W" "${DB_PWD}" +- DEPENDS "Generate_known_DSS_cert_pair" +- ) + jss_test_java( + NAME "List_CA_certs" + COMMAND "org.mozilla.jss.tests.ListCACerts" "${RESULTS_NSSDB_OUTPUT_DIR}" "Verbose" +- DEPENDS "Generate_known_DSS_cert_pair" ++ DEPENDS "Generate_known_ECDSA_cert_pair" + ) + jss_test_java( + NAME "SSLClientAuth" diff --git a/jss.spec b/jss.spec index 554fecc..244ef1d 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.7.0 -Release: 0.4%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.5%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -b4 # To generate the source tarball: @@ -25,6 +25,8 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +Patch0: jss-crypto-policies-1.patch +Patch1: jss-crypto-policies-2.patch ################################################################################ # Build Dependencies @@ -160,6 +162,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Mon Jul 06 2020 Dogtag PKI Team - 4.7.0-0.5 +- Fix build issues with new Crypto-Policies denying SHA-1 usage + * Tue Jun 30 2020 Dogtag PKI Team - 4.7.0-0.4 - Rebase to latest upstream JSS v4.7.0-b4 From af8114637b7efc2e7a37bbb970916cd8d02b2f3b Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 9 Jul 2020 12:55:29 -0400 Subject: [PATCH 34/89] Update to stable v4.7.0 release Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 9 +++++---- sources | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 87c5030..a9ae250 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ jss-4.2.6.tar.gz /jss-4.6.4.tar.gz /jss-4.7.0-b2.tar.gz /jss-4.7.0-b4.tar.gz +/jss-4.7.0.tar.gz diff --git a/jss.spec b/jss.spec index 244ef1d..9eb1987 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.7.0 -Release: 0.5%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -b4 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +#global _phase -a1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -25,8 +25,6 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # \ # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -Patch0: jss-crypto-policies-1.patch -Patch1: jss-crypto-policies-2.patch ################################################################################ # Build Dependencies @@ -162,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Jul 09 2020 Dogtag PKI Team - 4.7.0-1 +- Rebase to upstream stable release JSS v4.7.0 + * Mon Jul 06 2020 Dogtag PKI Team - 4.7.0-0.5 - Fix build issues with new Crypto-Policies denying SHA-1 usage diff --git a/sources b/sources index eae7417..7f6e516 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.7.0-b4.tar.gz) = 79c01fc513de479a63cbe164c772f9f685afe032a280f59eb3bb096a653424b3df1a9403c8cf443ffbe8b9a1d97a8aeb48064fbbe92e4c12e29767fb2a547d9f +SHA512 (jss-4.7.0.tar.gz) = 91a6bbc2c9dde436fd07e2f2bf9e71bd0a40c643547f41a95152a51200d126a37e2e580ef78d9075dc349f5dfe613b04eaf2a32009da13889e824ee9db255a43 From b90185b8b6c5819cf303394d3e8fccf08502ae36 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 11 Jul 2020 01:22:04 +0200 Subject: [PATCH 35/89] Rebuilt for JDK-11 --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 9eb1987..e9c8c56 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.7.0 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Jul 10 2020 Jiri Vanek - 4.7.0-2 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + * Thu Jul 09 2020 Dogtag PKI Team - 4.7.0-1 - Rebase to upstream stable release JSS v4.7.0 From 47dd782c32182adb9c910b41e3af18240924e8ab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 02:36:22 +0000 Subject: [PATCH 36/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index e9c8c56..2860899 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.7.0 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} +Release: 3%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 4.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jul 10 2020 Jiri Vanek - 4.7.0-2 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 From 382e5071a5d6678c87a7cee092c3d3a33ca0aa56 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 03:41:25 +0000 Subject: [PATCH 37/89] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 2860899..93db0ad 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.7.0 -Release: 3%{?_timestamp}%{?_commit_id}%{?dist} +Release: 4%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -160,6 +160,10 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 4.7.0-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 4.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 1aaa1081587204a36830513aaf32cc6ed154cf1d Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 18 Aug 2020 13:56:49 -0400 Subject: [PATCH 38/89] Rebase to JSS v4.7.2 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 17 ++++++++++------- sources | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index a9ae250..d7eb920 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ jss-4.2.6.tar.gz /jss-4.7.0-b2.tar.gz /jss-4.7.0-b4.tar.gz /jss-4.7.0.tar.gz +/jss-4.7.2.tar.gz diff --git a/jss.spec b/jss.spec index 93db0ad..2b099c7 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.7.0 -Release: 4%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.7.2 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -109,12 +109,12 @@ export CFLAGS modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1 # The Makefile is not thread-safe -rm -rf build && mkdir -p build && cd build %cmake \ -DJAVA_HOME=%{java_home} \ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ - .. + -B %{_vpath_builddir} +cd %{_vpath_builddir} %{__make} all %{__make} javadoc ctest --output-on-failure @@ -126,19 +126,19 @@ ctest --output-on-failure # jars install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir} -install -m 644 build/jss4.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar +install -m 644 %{_vpath_builddir}/jss4.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar # We have to use the name libjss4.so because this is dynamically # loaded by the jar file. install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss -install -m 0755 build/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ +install -m 0755 %{_vpath_builddir}/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ pushd ${RPM_BUILD_ROOT}%{_libdir}/jss ln -fs %{_jnidir}/jss4.jar jss4.jar popd # javadoc install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -rp build/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -rp %{_vpath_builddir}/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -p jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Aug 18 2020 Dogtag PKI Team - 4.7.2-1 +- Rebase to upstream stable release JSS v4.7.2 ; fixes FTBFS + * Sat Aug 01 2020 Fedora Release Engineering - 4.7.0-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 7f6e516..1f22225 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.7.0.tar.gz) = 91a6bbc2c9dde436fd07e2f2bf9e71bd0a40c643547f41a95152a51200d126a37e2e580ef78d9075dc349f5dfe613b04eaf2a32009da13889e824ee9db255a43 +SHA512 (jss-4.7.2.tar.gz) = 171b4c341b56c49eaedf0663cee7c949bd91f070781debc80b7b74f85eeacc5e4092cc5ab8eb3ace926493a7ea64d08c5c7a614dccd2e479f8b371b6075d6594 From 8d0f659a7b9ac2d0ee7ab02be0de758a28f0b46a Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Fri, 11 Sep 2020 16:48:33 -0400 Subject: [PATCH 39/89] Rebase to JSS v4.7.3 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 18 +++++++++++++++++- sources | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d7eb920..349bfb5 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ jss-4.2.6.tar.gz /jss-4.7.0-b4.tar.gz /jss-4.7.0.tar.gz /jss-4.7.2.tar.gz +/jss-4.7.3.tar.gz diff --git a/jss.spec b/jss.spec index 2b099c7..401fe38 100644 --- a/jss.spec +++ b/jss.spec @@ -6,7 +6,7 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.7.2 +Version: 4.7.3 Release: 1%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 @@ -108,13 +108,26 @@ export CFLAGS # Check if we're in FIPS mode modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1 +# RHEL's CMake doesn't support -B flag. +%if 0%{?rhel} +%{__mkdir_p} %{_vpath_builddir} +cd %{_vpath_builddir} +%endif + # The Makefile is not thread-safe %cmake \ -DJAVA_HOME=%{java_home} \ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ +%if 0%{?rhel} + .. +%else -B %{_vpath_builddir} +%endif +%if 0%{?fedora} cd %{_vpath_builddir} +%endif + %{__make} all %{__make} javadoc ctest --output-on-failure @@ -160,6 +173,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Fri Sep 11 2020 Dogtag PKI Team - 4.7.3-1 +- Rebase to upstream stable release JSS v4.7.3 + * Tue Aug 18 2020 Dogtag PKI Team - 4.7.2-1 - Rebase to upstream stable release JSS v4.7.2 ; fixes FTBFS diff --git a/sources b/sources index 1f22225..13d43e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.7.2.tar.gz) = 171b4c341b56c49eaedf0663cee7c949bd91f070781debc80b7b74f85eeacc5e4092cc5ab8eb3ace926493a7ea64d08c5c7a614dccd2e479f8b371b6075d6594 +SHA512 (jss-4.7.3.tar.gz) = 9358cf78d99e5e32a07dd457d6b0c916bdf9bf6959efe889f1cb91af75aa79fc419c2d057a40bfbe4e2a4924bffc1cafa04d917622cafe07062bcb633f330f98 From 89bcbe8882b72b2957680ff66ec6a45ab234f0e8 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Wed, 21 Oct 2020 12:12:46 -0400 Subject: [PATCH 40/89] Rebase to upstream JSS v4.8.0-b1 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss-crypto-policies-1.patch | 49 ------------------------------------- jss-crypto-policies-2.patch | 47 ----------------------------------- jss.spec | 26 ++++++-------------- sources | 2 +- 5 files changed, 10 insertions(+), 115 deletions(-) delete mode 100644 jss-crypto-policies-1.patch delete mode 100644 jss-crypto-policies-2.patch diff --git a/.gitignore b/.gitignore index 349bfb5..cb5030b 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ jss-4.2.6.tar.gz /jss-4.7.0.tar.gz /jss-4.7.2.tar.gz /jss-4.7.3.tar.gz +/jss-4.8.0-b1.tar.gz diff --git a/jss-crypto-policies-1.patch b/jss-crypto-policies-1.patch deleted file mode 100644 index dc23e85..0000000 --- a/jss-crypto-policies-1.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 1fb6097a2ab73ef897d011e7383d7f5f1bf6a1df Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Wed, 1 Jul 2020 12:41:20 -0400 -Subject: [PATCH] Replace SHA-1 signature with SHA-256 - -A recent change in Fedora Rawhide's crypto-policies package caused -failures in the tests like the following: - - Exception in thread "main" java.io.IOException: SocketException cannot read on socket: Error reading from socket: (-12271) SSL peer cannot verify your certificate. - at org.mozilla.jss.ssl.SSLSocket.read(SSLSocket.java:1494) - at org.mozilla.jss.ssl.SSLInputStream.read(SSLInputStream.java:38) - at org.mozilla.jss.ssl.SSLInputStream.read(SSLInputStream.java:25) - at org.mozilla.jss.tests.SSLClientAuth.run(SSLClientAuth.java:435) - at java.lang.Thread.run(Thread.java:748) - Caused by: org.mozilla.jss.ssl.SSLSocketException: Error reading from socket: (-12271) SSL peer cannot verify your certificate. - at org.mozilla.jss.ssl.SSLSocket.socketRead(Native Method) - at org.mozilla.jss.ssl.SSLSocket.read(SSLSocket.java:1488) - ... 4 more - Server exiting - org.mozilla.jss.ssl.SSLSocketException: SSL_ForceHandshake failed: (-8016) Unknown error - at org.mozilla.jss.ssl.SSLSocket.forceHandshake(Native Method) - at org.mozilla.jss.tests.SSLClientAuth.testConnection(SSLClientAuth.java:345) - at org.mozilla.jss.tests.SSLClientAuth.doIt(SSLClientAuth.java:156) - at org.mozilla.jss.tests.SSLClientAuth.main(SSLClientAuth.java:90) - -This was caused by dropping SHA-1 as an allowed hash during handshakes. -However, because SSLClientAuth manually generated its certificate (and -explicitly asked for SHA-1), it failed. - -Switch to SHA-256 instead. - -Signed-off-by: Alexander Scheel ---- - org/mozilla/jss/tests/SSLClientAuth.java | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/org/mozilla/jss/tests/SSLClientAuth.java b/org/mozilla/jss/tests/SSLClientAuth.java -index 6f1fd2b12..bf270a634 100644 ---- a/org/mozilla/jss/tests/SSLClientAuth.java -+++ b/org/mozilla/jss/tests/SSLClientAuth.java -@@ -28,7 +28,7 @@ - - private CryptoManager cm; - public static final SignatureAlgorithm sigAlg = -- SignatureAlgorithm.RSASignatureWithSHA1Digest; -+ SignatureAlgorithm.RSASignatureWithSHA256Digest; - - /** - * Method that generates a certificate for given credential diff --git a/jss-crypto-policies-2.patch b/jss-crypto-policies-2.patch deleted file mode 100644 index 71fe8c2..0000000 --- a/jss-crypto-policies-2.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8ed5a82a973922d07d0610fd42c48b2a0ec97d6c Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Wed, 1 Jul 2020 12:44:53 -0400 -Subject: [PATCH] Remove all legacy DSS/DSA tests - -The only signature algorithm suppoted with DSS is SHA-1, which will soon -become deprecated and broken. DSS itself isn't widely used either, so we -should remove it from the test suite as well. - -Signed-off-by: Alexander Scheel ---- - cmake/JSSTests.cmake | 12 +----------- - 1 file changed, 1 insertion(+), 11 deletions(-) - -diff --git a/cmake/JSSTests.cmake b/cmake/JSSTests.cmake -index a26b95425..a0fe36e22 100644 ---- a/cmake/JSSTests.cmake -+++ b/cmake/JSSTests.cmake -@@ -170,11 +170,6 @@ macro(jss_tests) - COMMAND "org.mozilla.jss.tests.GenerateTestCert" "${RESULTS_NSSDB_OUTPUT_DIR}" "${PASSWORD_FILE}" "30" "localhost" "SHA-256/EC" "CA_ECDSA" "Server_ECDSA" "Client_ECDSA" - DEPENDS "Generate_known_RSA_cert_pair" - ) -- jss_test_java( -- NAME "Generate_known_DSS_cert_pair" -- COMMAND "org.mozilla.jss.tests.GenerateTestCert" "${RESULTS_NSSDB_OUTPUT_DIR}" "${PASSWORD_FILE}" "40" "localhost" "SHA-1/DSA" "CA_DSS" "Server_DSS" "Client_DSS" -- DEPENDS "Generate_known_ECDSA_cert_pair" -- ) - jss_test_exec( - NAME "Create_PKCS11_cert_to_PKCS12_rsa.pfx" - COMMAND "pk12util" "-o" "${RESULTS_NSSDB_OUTPUT_DIR}/rsa.pfx" "-n" "CA_RSA" "-d" "${RESULTS_NSSDB_OUTPUT_DIR}" "-K" "${DB_PWD}" "-W" "${DB_PWD}" -@@ -185,15 +180,10 @@ macro(jss_tests) - COMMAND "pk12util" "-o" "${RESULTS_NSSDB_OUTPUT_DIR}/ecdsa.pfx" "-n" "CA_ECDSA" "-d" "${RESULTS_NSSDB_OUTPUT_DIR}" "-K" "${DB_PWD}" "-W" "${DB_PWD}" - DEPENDS "Generate_known_ECDSA_cert_pair" - ) -- jss_test_exec( -- NAME "Create_PKCS11_cert_to_PKCS12_dss.pfx" -- COMMAND "pk12util" "-o" "${RESULTS_NSSDB_OUTPUT_DIR}/dss.pfx" "-n" "CA_DSS" "-d" "${RESULTS_NSSDB_OUTPUT_DIR}" "-K" "${DB_PWD}" "-W" "${DB_PWD}" -- DEPENDS "Generate_known_DSS_cert_pair" -- ) - jss_test_java( - NAME "List_CA_certs" - COMMAND "org.mozilla.jss.tests.ListCACerts" "${RESULTS_NSSDB_OUTPUT_DIR}" "Verbose" -- DEPENDS "Generate_known_DSS_cert_pair" -+ DEPENDS "Generate_known_ECDSA_cert_pair" - ) - jss_test_java( - NAME "SSLClientAuth" diff --git a/jss.spec b/jss.spec index 401fe38..c0e48c9 100644 --- a/jss.spec +++ b/jss.spec @@ -6,9 +6,9 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.7.3 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} -#global _phase -a1 +Version: 4.8.0 +Release: 0.1%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -b1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -50,7 +50,7 @@ BuildRequires: glassfish-jaxb-api %else BuildRequires: slf4j-jdk14 %endif -BuildRequires: apache-commons-lang +BuildRequires: apache-commons-lang3 BuildRequires: junit @@ -64,7 +64,7 @@ Requires: glassfish-jaxb-api %else Requires: slf4j-jdk14 %endif -Requires: apache-commons-lang +Requires: apache-commons-lang3 Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 @@ -108,26 +108,13 @@ export CFLAGS # Check if we're in FIPS mode modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1 -# RHEL's CMake doesn't support -B flag. -%if 0%{?rhel} -%{__mkdir_p} %{_vpath_builddir} -cd %{_vpath_builddir} -%endif - # The Makefile is not thread-safe %cmake \ -DJAVA_HOME=%{java_home} \ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ -%if 0%{?rhel} - .. -%else -B %{_vpath_builddir} -%endif -%if 0%{?fedora} cd %{_vpath_builddir} -%endif - %{__make} all %{__make} javadoc ctest --output-on-failure @@ -173,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Wed Oct 21 2020 Dogtag PKI Team - 4.8.0-b1 +- Rebase to upstream beta release JSS v4.8.0-b1 + * Fri Sep 11 2020 Dogtag PKI Team - 4.7.3-1 - Rebase to upstream stable release JSS v4.7.3 diff --git a/sources b/sources index 13d43e8..c295965 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.7.3.tar.gz) = 9358cf78d99e5e32a07dd457d6b0c916bdf9bf6959efe889f1cb91af75aa79fc419c2d057a40bfbe4e2a4924bffc1cafa04d917622cafe07062bcb633f330f98 +SHA512 (jss-4.8.0-b1.tar.gz) = 5601922b1c2e8006951a01e50486f585e2f6e3c0cd987a7e75c62755b4e14e2c7d489b583f92ba09281ceee2b5b1363f3d8fc94b039232fb3694975bd041a332 From c0c3a769acbb5341a6c4851459aebe8e3b98a150 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Wed, 28 Oct 2020 16:01:27 -0400 Subject: [PATCH 41/89] Rebase to latest stable JSS release v4.8.0 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cb5030b..181787c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ jss-4.2.6.tar.gz /jss-4.7.2.tar.gz /jss-4.7.3.tar.gz /jss-4.8.0-b1.tar.gz +/jss-4.8.0.tar.gz diff --git a/jss.spec b/jss.spec index c0e48c9..a7c9812 100644 --- a/jss.spec +++ b/jss.spec @@ -7,8 +7,8 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.8.0 -Release: 0.1%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -b1 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +#global _phase -a1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Wed Oct 21 2020 Dogtag PKI Team - 4.8.0-1 +- Rebase to upstream stable release JSS v4.8.0 + * Wed Oct 21 2020 Dogtag PKI Team - 4.8.0-b1 - Rebase to upstream beta release JSS v4.8.0-b1 diff --git a/sources b/sources index c295965..017d89b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.8.0-b1.tar.gz) = 5601922b1c2e8006951a01e50486f585e2f6e3c0cd987a7e75c62755b4e14e2c7d489b583f92ba09281ceee2b5b1363f3d8fc94b039232fb3694975bd041a332 +SHA512 (jss-4.8.0.tar.gz) = 322d12b69a2665a4ea2302a9a3ba8668c8dd6b56e6aaa17b48e11885ebcb9b38663242312207a0452c95bd84306bab4e968a8d0a1444dea003e4d19e43f6f425 From f25b2d6a41e9049b9c03d0fd3a6e566842bf40a5 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 5 Nov 2020 09:40:00 -0500 Subject: [PATCH 42/89] Add conflict on older PKI versions due to ACL3 Signed-off-by: Alexander Scheel --- jss.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jss.spec b/jss.spec index a7c9812..925b552 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.8.0 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -69,7 +69,7 @@ Requires: apache-commons-lang3 Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 Conflicts: tomcatjss < 7.3.4 -Conflicts: pki-base < 10.6.5 +Conflicts: pki-base < 10.10.0 %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Nov 05 2020 Dogtag PKI Team - 4.8.0-2 +- Add Conflicts on older PKI versions due to missing ACL3 + * Wed Oct 21 2020 Dogtag PKI Team - 4.8.0-1 - Rebase to upstream stable release JSS v4.8.0 From 049ad39b72d847664f925f54073e15ad66d0d3de Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 14 Jan 2021 09:09:11 -0500 Subject: [PATCH 43/89] Rebase to latest stable JSS v4.8.1 Signed-off-by: Alexander Scheel --- .gitignore | 1 + jss.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 181787c..5d94c56 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ jss-4.2.6.tar.gz /jss-4.7.3.tar.gz /jss-4.8.0-b1.tar.gz /jss-4.8.0.tar.gz +/jss-4.8.1.tar.gz diff --git a/jss.spec b/jss.spec index 925b552..8849d06 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.8.0 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} +Version: 4.8.1 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -33,7 +33,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # autosetup BuildRequires: git BuildRequires: make -BuildRequires: cmake +BuildRequires: cmake >= 3.14 BuildRequires: zip BuildRequires: unzip @@ -68,7 +68,7 @@ Requires: apache-commons-lang3 Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 -Conflicts: tomcatjss < 7.3.4 +Conflicts: tomcatjss < 7.6.0 Conflicts: pki-base < 10.10.0 %description @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Thu Jan 14 2021 Dogtag PKI Team - 4.8.1-1 +- Rebase to upstream stable JSS v4.8.1 + * Thu Nov 05 2020 Dogtag PKI Team - 4.8.0-2 - Add Conflicts on older PKI versions due to missing ACL3 diff --git a/sources b/sources index 017d89b..064f3c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.8.0.tar.gz) = 322d12b69a2665a4ea2302a9a3ba8668c8dd6b56e6aaa17b48e11885ebcb9b38663242312207a0452c95bd84306bab4e968a8d0a1444dea003e4d19e43f6f425 +SHA512 (jss-4.8.1.tar.gz) = d18ef995cba627de68077bbd8dc25640b6444c4674e29ec83a05296ac1f18289e1ada35229baafbf5c5e4f1ae712a46e48d9d6dcead935e0f4d3d72b5208cf40 From 78dbecd2ecd5d46f2367176ac22c790161acc861 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 15:04:59 +0000 Subject: [PATCH 44/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 8849d06..e753986 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: 4.8.1 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 2%{?_timestamp}%{?_commit_id}%{?dist} #global _phase -a1 # To generate the source tarball: @@ -160,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 4.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 14 2021 Dogtag PKI Team - 4.8.1-1 - Rebase to upstream stable JSS v4.8.1 From 9d6582a8f850f0d377a3ec5985f7913b470c3dfb Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 18 May 2021 19:44:19 -0500 Subject: [PATCH 45/89] Rebase to JSS 4.9.0-alpha1 --- .gitignore | 1 + jss.spec | 11 ++++++++--- sources | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5d94c56..385bad6 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ jss-4.2.6.tar.gz /jss-4.8.0-b1.tar.gz /jss-4.8.0.tar.gz /jss-4.8.1.tar.gz +/jss-4.9.0-alpha1.tar.gz diff --git a/jss.spec b/jss.spec index e753986..c953b50 100644 --- a/jss.spec +++ b/jss.spec @@ -6,9 +6,11 @@ Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ -Version: 4.8.1 -Release: 2%{?_timestamp}%{?_commit_id}%{?dist} -#global _phase -a1 +# For development (i.e. unsupported) releases, use x.y.z-0.n.. +# For official (i.e. supported) releases, use x.y.z-r where r >=1. +Version: 4.9.0 +Release: 0.1.alpha1%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -alpha1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -160,6 +162,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Tue May 18 2021 Dogtag PKI Team - 4.9.0-0.1 +- Rebase to JSS 4.9.0-alpha1 + * Tue Jan 26 2021 Fedora Release Engineering - 4.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 064f3c9..c706521 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.8.1.tar.gz) = d18ef995cba627de68077bbd8dc25640b6444c4674e29ec83a05296ac1f18289e1ada35229baafbf5c5e4f1ae712a46e48d9d6dcead935e0f4d3d72b5208cf40 +SHA512 (jss-4.9.0-alpha1.tar.gz) = 3ab83818cf0c283f74087fd9de033d618ebbb8214b23a118414832017abbe2d4ed1f0567ab00e9aaec31ec9a04030a8817cf580ec6aeaf8f03a6be4b98c9a327 From d17adf6943138df2da190b413d9371b80a609e84 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 26 May 2021 18:13:27 -0500 Subject: [PATCH 46/89] Drop git dependency --- jss.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jss.spec b/jss.spec index c953b50..6bf6884 100644 --- a/jss.spec +++ b/jss.spec @@ -9,7 +9,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 4.9.0 -Release: 0.1.alpha1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.2.alpha1%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -alpha1 # To generate the source tarball: @@ -32,8 +32,6 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # Build Dependencies ################################################################################ -# autosetup -BuildRequires: git BuildRequires: make BuildRequires: cmake >= 3.14 BuildRequires: zip @@ -91,7 +89,7 @@ This package contains the API documentation for JSS. ################################################################################ %prep -%autosetup -n %{name}-%{version}%{?_phase} -p 1 -S git +%autosetup -n %{name}-%{version}%{?_phase} -p 1 ################################################################################ %build @@ -162,6 +160,9 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog +* Wed May 26 2021 Dogtag PKI Team - 4.9.0-0.2 +- Drop git dependency + * Tue May 18 2021 Dogtag PKI Team - 4.9.0-0.1 - Rebase to JSS 4.9.0-alpha1 From d09d72c0f6f0226350a793faf1782514a0a59810 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 26 May 2021 18:20:35 -0500 Subject: [PATCH 47/89] Disable unit tests by default --- jss.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jss.spec b/jss.spec index 6bf6884..e65db2b 100644 --- a/jss.spec +++ b/jss.spec @@ -28,6 +28,15 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +################################################################################ +# Build Options +################################################################################ + +# By default the build will not execute unit tests unless --with test +# option is specified. + +%bcond_with test + ################################################################################ # Build Dependencies ################################################################################ @@ -117,7 +126,10 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA cd %{_vpath_builddir} %{__make} all %{__make} javadoc + +%if %{with test} ctest --output-on-failure +%endif ################################################################################ %install @@ -162,6 +174,7 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %changelog * Wed May 26 2021 Dogtag PKI Team - 4.9.0-0.2 - Drop git dependency +- Disable unit tests by default * Tue May 18 2021 Dogtag PKI Team - 4.9.0-0.1 - Rebase to JSS 4.9.0-alpha1 From ef80dbd51c645585ad2255fd0455d252466858a1 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 22 Jun 2021 14:35:42 -0500 Subject: [PATCH 48/89] Rebase to JSS 5.0.0-alpha1 --- .gitignore | 1 + jss.spec | 196 ++++++++--------------------------------------------- sources | 2 +- 3 files changed, 30 insertions(+), 169 deletions(-) diff --git a/.gitignore b/.gitignore index 385bad6..78c09bc 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ jss-4.2.6.tar.gz /jss-4.8.0.tar.gz /jss-4.8.1.tar.gz /jss-4.9.0-alpha1.tar.gz +/jss-5.0.0-alpha1.tar.gz diff --git a/jss.spec b/jss.spec index e65db2b..79c7bb3 100644 --- a/jss.spec +++ b/jss.spec @@ -8,8 +8,8 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. -Version: 4.9.0 -Release: 0.2.alpha1%{?_timestamp}%{?_commit_id}%{?dist} +Version: 5.0.0 +Release: 0.1.alpha1%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -alpha1 # To generate the source tarball: @@ -28,6 +28,14 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +################################################################################ +# Java +################################################################################ + +%define java_devel java-11-openjdk-devel +%define java_headless java-11-openjdk-headless +%define java_home /usr/lib/jvm/jre-11-openjdk + ################################################################################ # Build Options ################################################################################ @@ -50,29 +58,21 @@ BuildRequires: gcc-c++ BuildRequires: nspr-devel >= 4.13.1 BuildRequires: nss-devel >= 3.44 BuildRequires: nss-tools >= 3.44 -BuildRequires: java-devel +BuildRequires: %{java_devel} BuildRequires: jpackage-utils BuildRequires: slf4j BuildRequires: glassfish-jaxb-api -%if 0%{?rhel} && 0%{?rhel} <= 7 -# no slf4j-jdk14 -%else BuildRequires: slf4j-jdk14 -%endif BuildRequires: apache-commons-lang3 BuildRequires: junit Requires: nss >= 3.44 -Requires: java-headless +Requires: %{java_headless} Requires: jpackage-utils Requires: slf4j Requires: glassfish-jaxb-api -%if 0%{?rhel} && 0%{?rhel} <= 7 -# no slf4j-jdk14 -%else Requires: slf4j-jdk14 -%endif Requires: apache-commons-lang3 Conflicts: ldapjdk < 4.20 @@ -105,7 +105,7 @@ This package contains the API documentation for JSS. %set_build_flags -[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java +export JAVA_HOME=%{java_home} # Enable compiler optimizations export BUILD_OPT=1 @@ -117,44 +117,24 @@ export CFLAGS # Check if we're in FIPS mode modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1 -# The Makefile is not thread-safe -%cmake \ - -DJAVA_HOME=%{java_home} \ - -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ - -B %{_vpath_builddir} - -cd %{_vpath_builddir} -%{__make} all -%{__make} javadoc - -%if %{with test} -ctest --output-on-failure -%endif +./build.sh \ + %{?_verbose:-v} \ + --work-dir=%{_vpath_builddir} \ + --java-lib-dir=%{_jnidir} \ + --jss-lib-dir=%{_libdir}/jss \ + --version=%{version} \ + %{!?with_test:--without-test} \ + dist ################################################################################ %install -# There is no install target so we'll do it by hand +./build.sh \ + %{?_verbose:-v} \ + --work-dir=%{_vpath_builddir} \ + --install-dir=%{buildroot} \ + install -# jars -install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir} -install -m 644 %{_vpath_builddir}/jss4.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar - -# We have to use the name libjss4.so because this is dynamically -# loaded by the jar file. -install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss -install -m 0755 %{_vpath_builddir}/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/ -pushd ${RPM_BUILD_ROOT}%{_libdir}/jss - ln -fs %{_jnidir}/jss4.jar jss4.jar -popd - -# javadoc -install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -rp %{_vpath_builddir}/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -p jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} - -# No ldconfig is required since this library is loaded by Java itself. ################################################################################ %files @@ -172,125 +152,5 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ################################################################################ %changelog -* Wed May 26 2021 Dogtag PKI Team - 4.9.0-0.2 -- Drop git dependency -- Disable unit tests by default - -* Tue May 18 2021 Dogtag PKI Team - 4.9.0-0.1 -- Rebase to JSS 4.9.0-alpha1 - -* Tue Jan 26 2021 Fedora Release Engineering - 4.8.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Thu Jan 14 2021 Dogtag PKI Team - 4.8.1-1 -- Rebase to upstream stable JSS v4.8.1 - -* Thu Nov 05 2020 Dogtag PKI Team - 4.8.0-2 -- Add Conflicts on older PKI versions due to missing ACL3 - -* Wed Oct 21 2020 Dogtag PKI Team - 4.8.0-1 -- Rebase to upstream stable release JSS v4.8.0 - -* Wed Oct 21 2020 Dogtag PKI Team - 4.8.0-b1 -- Rebase to upstream beta release JSS v4.8.0-b1 - -* Fri Sep 11 2020 Dogtag PKI Team - 4.7.3-1 -- Rebase to upstream stable release JSS v4.7.3 - -* Tue Aug 18 2020 Dogtag PKI Team - 4.7.2-1 -- Rebase to upstream stable release JSS v4.7.2 ; fixes FTBFS - -* Sat Aug 01 2020 Fedora Release Engineering - 4.7.0-4 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 4.7.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 10 2020 Jiri Vanek - 4.7.0-2 -- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 - -* Thu Jul 09 2020 Dogtag PKI Team - 4.7.0-1 -- Rebase to upstream stable release JSS v4.7.0 - -* Mon Jul 06 2020 Dogtag PKI Team - 4.7.0-0.5 -- Fix build issues with new Crypto-Policies denying SHA-1 usage - -* Tue Jun 30 2020 Dogtag PKI Team - 4.7.0-0.4 -- Rebase to latest upstream JSS v4.7.0-b4 - -* Wed Jun 10 2020 Dogtag PKI Team - 4.7.0-0.2 -- Rebase to latest upstream JSS 4.7.0 -- JSS Provided SSLEngine - -* Mon Apr 27 2020 Dogtag PKI Team - 4.6.4-1 -- Rebase to JSS 4.6.4 -- Fixes memory leak present since v4.6.2 - -* Thu Mar 5 2020 Dogtag PKI Team - 4.6.3-1 -- Rebase to JSS 4.6.3 -- Fixes base64 encoding of CSRs - -* Wed Mar 04 2020 Dogtag PKI Team - 4.6.2-4 -- Fix for PBE errors - -* Tue Jan 28 2020 Dogtag PKI Team - 4.6.2-3 -- Rebuild with new NSS to fix rhbz#1794814 - -* Tue Oct 29 2019 Dogtag PKI Team - 4.6.2-2 -- Fix for rhbz#1766451 - -* Tue Oct 15 2019 Dogtag PKI Team - 4.6.2-1 -- Rebase to JSS 4.6.2 -- Fixes CVE-2019-14823 - -* Thu Aug 08 2019 Dogtag PKI Team - 4.6.1-2 -- Disable unnecessary tests to fix broken s390x - -* Thu Aug 08 2019 Dogtag PKI Team - 4.6.1-1 -- Rebase to JSS 4.6.1 - -* Thu Jul 25 2019 Fedora Release Engineering - 4.5.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon May 06 2019 Dogtag PKI Team - 4.5.3-2 -- Add AIA OCSP certificate checking patch - -* Tue Mar 19 2019 Dogtag PKI Team - 4.5.3-1 -- Rebase to JSS 4.5.3 - -* Fri Feb 01 2019 Dogtag PKI Team - 4.5.2-3 -- Include nuxwdog patch for netscape.security.util.Utils from PKI - -* Fri Feb 01 2019 Fedora Release Engineering - 4.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 14 2019 Dogtag PKI Team 4.5.2-1 -- Rebased to JSS 4.5.2 - -* Thu Nov 29 2018 Dogtag PKI Team 4.5.1-1 -- Rebased to JSS 4.5.1 -- Red Hat Bugzilla #1582323 - DER encoding error for enumerated types with a value of zero -- Red Hat Bugzilla #1534765 - javadoc for org.mozilla.jss.pkix.cms.SignedData.getSignerInfos() is incorrect - -* Fri Aug 10 2018 Dogtag PKI Team 4.5.0-1 -- Rebased to JSS 4.5.0 - -* Tue Aug 07 2018 Dogtag PKI Team 4.5.0-0.6 -- Rebased to JSS 4.5.0-b1 - -* Tue Aug 07 2018 Dogtag PKI Team 4.5.0-0.5 -- Red Hat Bugzilla #1612063 - Do not override system crypto policy (support TLS 1.3) - -* Fri Jul 20 2018 Dogtag PKI Team 4.5.0-0.4 -- Rebased to JSS 4.5.0-a4 -- Red Hat Bugzilla #1604462 - jss: FTBFS in Fedora rawhide - -* Thu Jul 05 2018 Dogtag PKI Team 4.5.0-0.3 -- Rebased to JSS 4.5.0-a3 - -* Fri Jun 22 2018 Dogtag PKI Team 4.5.0-0.2 -- Rebased to JSS 4.5.0-a2 - -* Fri Jun 15 2018 Dogtag PKI Team 4.5.0-0.1 -- Rebased to JSS 4.5.0-a1 +* Tue Jun 22 2021 Dogtag PKI Team - 5.0.0-0.1 +- Rebase to JSS 5.0.0-alpha1 diff --git a/sources b/sources index c706521..3d73504 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-4.9.0-alpha1.tar.gz) = 3ab83818cf0c283f74087fd9de033d618ebbb8214b23a118414832017abbe2d4ed1f0567ab00e9aaec31ec9a04030a8817cf580ec6aeaf8f03a6be4b98c9a327 +SHA512 (jss-5.0.0-alpha1.tar.gz) = 27c18c88cea85a62e9dd2b1c4bf7223629938fd1a47d5c0c9168eaa3ab79366961dd9c6a17cd2c37633b18b9287776ecb2b027090425d530cddb4d056b220e39 From 8e5f461e834d1e2b24c02f404ac69e94b47e26d8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 09:19:42 +0000 Subject: [PATCH 49/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 79c7bb3..5db023e 100644 --- a/jss.spec +++ b/jss.spec @@ -9,7 +9,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.0.0 -Release: 0.1.alpha1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.2.alpha1%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -alpha1 # To generate the source tarball: @@ -152,5 +152,8 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 5.0.0-0.2.alpha1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jun 22 2021 Dogtag PKI Team - 5.0.0-0.1 - Rebase to JSS 5.0.0-alpha1 From f29b811b7f89ae9d03f4b2fc44aa5c064b9507a7 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 12 Aug 2021 13:03:54 -0500 Subject: [PATCH 50/89] Rebase to JSS 5.0.0-alpha2 --- .gitignore | 1 + jss.spec | 32 ++++++++++++++++++++++---------- sources | 2 +- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 78c09bc..5ea8d6a 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ jss-4.2.6.tar.gz /jss-4.8.1.tar.gz /jss-4.9.0-alpha1.tar.gz /jss-5.0.0-alpha1.tar.gz +/jss-5.0.0-alpha2.tar.gz diff --git a/jss.spec b/jss.spec index 5db023e..95e275b 100644 --- a/jss.spec +++ b/jss.spec @@ -9,8 +9,8 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.0.0 -Release: 0.2.alpha1%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -alpha1 +Release: 0.3.alpha2%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -alpha2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -40,10 +40,15 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # Build Options ################################################################################ -# By default the build will not execute unit tests unless --with test +# By default the javadoc package will be built unless --without javadoc # option is specified. -%bcond_with test +%bcond_without javadoc + +# By default the build will execute unit tests unless --without test +# option is specified. + +%bcond_without test ################################################################################ # Build Dependencies @@ -55,9 +60,8 @@ BuildRequires: zip BuildRequires: unzip BuildRequires: gcc-c++ -BuildRequires: nspr-devel >= 4.13.1 -BuildRequires: nss-devel >= 3.44 -BuildRequires: nss-tools >= 3.44 +BuildRequires: nss-devel >= 3.66 +BuildRequires: nss-tools >= 3.66 BuildRequires: %{java_devel} BuildRequires: jpackage-utils BuildRequires: slf4j @@ -67,7 +71,7 @@ BuildRequires: apache-commons-lang3 BuildRequires: junit -Requires: nss >= 3.44 +Requires: nss >= 3.66 Requires: %{java_headless} Requires: jpackage-utils Requires: slf4j @@ -85,6 +89,7 @@ Java Security Services (JSS) is a java native interface which provides a bridge for java-based applications to use native Network Security Services (NSS). This only works with gcj. Other JREs require that JCE providers be signed. +%if %{with javadoc} ################################################################################ %package javadoc ################################################################################ @@ -94,6 +99,7 @@ Requires: jss = %{version}-%{release} %description javadoc This package contains the API documentation for JSS. +%endif ################################################################################ %prep @@ -123,6 +129,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA --java-lib-dir=%{_jnidir} \ --jss-lib-dir=%{_libdir}/jss \ --version=%{version} \ + %{!?with_javadoc:--without-javadoc} \ %{!?with_test:--without-test} \ dist @@ -144,16 +151,21 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA %{_libdir}/* %{_jnidir}/* +%if %{with javadoc} ################################################################################ %files javadoc %defattr(-,root,root,-) -%{_javadocdir}/%{name}-%{version}/ +%{_javadocdir}/%{name}/ +%endif ################################################################################ %changelog +* Thu Aug 12 2021 Dogtag PKI Team - 5.0.0-0.3.alpha2 +- Rebase to JSS 5.0.0-alpha2 + * Thu Jul 22 2021 Fedora Release Engineering - 5.0.0-0.2.alpha1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Tue Jun 22 2021 Dogtag PKI Team - 5.0.0-0.1 +* Tue Jun 22 2021 Dogtag PKI Team - 5.0.0-0.1.alpha1 - Rebase to JSS 5.0.0-alpha1 diff --git a/sources b/sources index 3d73504..756e287 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.0.0-alpha1.tar.gz) = 27c18c88cea85a62e9dd2b1c4bf7223629938fd1a47d5c0c9168eaa3ab79366961dd9c6a17cd2c37633b18b9287776ecb2b027090425d530cddb4d056b220e39 +SHA512 (jss-5.0.0-alpha2.tar.gz) = de48ce48f2bc6544871308394ccaa187c4aecb72b3f4d5ce5dd692e8a6f6edaa835ce12aa80c2ac0745baca05e7fb7b943ae3abafe88636c07868633111c6118 From 9c8bb2356f1eee220cf73cfaefed124bdbf80624 Mon Sep 17 00:00:00 2001 From: Chris Kelley Date: Fri, 3 Sep 2021 23:23:32 +0100 Subject: [PATCH 51/89] Rebase to JSS 5.0.0-beta1 --- .gitignore | 1 + jss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5ea8d6a..66804ec 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ jss-4.2.6.tar.gz /jss-4.9.0-alpha1.tar.gz /jss-5.0.0-alpha1.tar.gz /jss-5.0.0-alpha2.tar.gz +/jss-5.0.0-beta1.tar.gz diff --git a/jss.spec b/jss.spec index 95e275b..e64e2a3 100644 --- a/jss.spec +++ b/jss.spec @@ -9,8 +9,8 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.0.0 -Release: 0.3.alpha2%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -alpha2 +Release: 0.4.beta1%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -beta1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -161,6 +161,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Fri Sep 03 2021 Dogtag PKI Team - 5.0.0-0.4.beta1 +- Rebase to JSS 5.0.0-beta1 + * Thu Aug 12 2021 Dogtag PKI Team - 5.0.0-0.3.alpha2 - Rebase to JSS 5.0.0-alpha2 diff --git a/sources b/sources index 756e287..15f1b12 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.0.0-alpha2.tar.gz) = de48ce48f2bc6544871308394ccaa187c4aecb72b3f4d5ce5dd692e8a6f6edaa835ce12aa80c2ac0745baca05e7fb7b943ae3abafe88636c07868633111c6118 +SHA512 (jss-5.0.0-beta1.tar.gz) = 9413102a75e6d73b81b3adaeda65958f2363f075e8295cc2e796afaf0aae2c0e1942734cd3314754d5bccc21f92d3bfa16515e63954b0a4239f7ba85e2ce8f95 From 269ca9b45883b6af3eab6f7ed21cc3ec238ed944 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 29 Sep 2021 23:11:52 -0500 Subject: [PATCH 52/89] Drop BuildRequires and Requires on glassfish-jaxb-api --- jss.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jss.spec b/jss.spec index e64e2a3..51490d7 100644 --- a/jss.spec +++ b/jss.spec @@ -9,7 +9,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.0.0 -Release: 0.4.beta1%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.5.beta1%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -beta1 # To generate the source tarball: @@ -34,7 +34,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas %define java_devel java-11-openjdk-devel %define java_headless java-11-openjdk-headless -%define java_home /usr/lib/jvm/jre-11-openjdk +%define java_home %{_libdir}/jvm/jre-11-openjdk ################################################################################ # Build Options @@ -65,7 +65,6 @@ BuildRequires: nss-tools >= 3.66 BuildRequires: %{java_devel} BuildRequires: jpackage-utils BuildRequires: slf4j -BuildRequires: glassfish-jaxb-api BuildRequires: slf4j-jdk14 BuildRequires: apache-commons-lang3 @@ -75,7 +74,6 @@ Requires: nss >= 3.66 Requires: %{java_headless} Requires: jpackage-utils Requires: slf4j -Requires: glassfish-jaxb-api Requires: slf4j-jdk14 Requires: apache-commons-lang3 @@ -161,6 +159,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Wed Sep 29 2021 Dogtag PKI Team - 5.0.0-0.5.beta1 +- Drop BuildRequires and Requires on glassfish-jaxb-api + * Fri Sep 03 2021 Dogtag PKI Team - 5.0.0-0.4.beta1 - Rebase to JSS 5.0.0-beta1 From 23bd244360ca8ceef2572e5f6859b7af564f9a0f Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 30 Sep 2021 23:34:32 -0500 Subject: [PATCH 53/89] Rebase to JSS 5.0.0 --- .gitignore | 1 + jss.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 66804ec..21231ff 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ jss-4.2.6.tar.gz /jss-5.0.0-alpha1.tar.gz /jss-5.0.0-alpha2.tar.gz /jss-5.0.0-beta1.tar.gz +/jss-5.0.0.tar.gz diff --git a/jss.spec b/jss.spec index 51490d7..dfc608f 100644 --- a/jss.spec +++ b/jss.spec @@ -9,8 +9,8 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.0.0 -Release: 0.5.beta1%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -beta1 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +#global _phase -alpha1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -34,7 +34,7 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas %define java_devel java-11-openjdk-devel %define java_headless java-11-openjdk-headless -%define java_home %{_libdir}/jvm/jre-11-openjdk +%define java_home /usr/lib/jvm/jre-11-openjdk ################################################################################ # Build Options @@ -159,6 +159,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Sep 30 2021 Dogtag PKI Team - 5.0.0-1 +- Rebase to JSS 5.0.0 + * Wed Sep 29 2021 Dogtag PKI Team - 5.0.0-0.5.beta1 - Drop BuildRequires and Requires on glassfish-jaxb-api diff --git a/sources b/sources index 15f1b12..fa96496 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.0.0-beta1.tar.gz) = 9413102a75e6d73b81b3adaeda65958f2363f075e8295cc2e796afaf0aae2c0e1942734cd3314754d5bccc21f92d3bfa16515e63954b0a4239f7ba85e2ce8f95 +SHA512 (jss-5.0.0.tar.gz) = 9857ff8e6c1e54927c78904be2d9a84ad4afc0559e95a4c835fd2000388c542d90d31bca7da7e99b0b74ef6e4175512227acb3341aa3475526f5f222c071aa97 From fa24161b1a045bad563331d689fc6d01269256e5 Mon Sep 17 00:00:00 2001 From: Chris Kelley Date: Fri, 26 Nov 2021 15:11:57 +0000 Subject: [PATCH 54/89] Rebase to JSS 5.1.0-alpha2 --- .gitignore | 1 + jss.spec | 21 ++++++++++++--------- sources | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 21231ff..d584a8a 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ jss-4.2.6.tar.gz /jss-5.0.0-alpha2.tar.gz /jss-5.0.0-beta1.tar.gz /jss-5.0.0.tar.gz +/jss-5.1.0-alpha2.tar.gz diff --git a/jss.spec b/jss.spec index dfc608f..96d564d 100644 --- a/jss.spec +++ b/jss.spec @@ -8,9 +8,9 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. -Version: 5.0.0 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} -#global _phase -alpha1 +Version: 5.1.0 +Release: 0.1.alpha2%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -alpha2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -32,9 +32,9 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # Java ################################################################################ -%define java_devel java-11-openjdk-devel -%define java_headless java-11-openjdk-headless -%define java_home /usr/lib/jvm/jre-11-openjdk +%define java_devel java-17-openjdk-devel +%define java_headless java-17-openjdk-headless +%define java_home %{_jvmdir}/jre-17-openjdk ################################################################################ # Build Options @@ -45,10 +45,10 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas %bcond_without javadoc -# By default the build will execute unit tests unless --without test +# By default the build will not execute unit tests unless --with tests # option is specified. -%bcond_without test +%bcond_with tests ################################################################################ # Build Dependencies @@ -128,7 +128,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA --jss-lib-dir=%{_libdir}/jss \ --version=%{version} \ %{!?with_javadoc:--without-javadoc} \ - %{!?with_test:--without-test} \ + %{?with_tests:--with-tests} \ dist ################################################################################ @@ -159,6 +159,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Fri Nov 26 2021 Dogtag PKI Team - 5.1.0-0.1.alpha2 +- Rebase to JSS 5.1.0-alpha2 + * Thu Sep 30 2021 Dogtag PKI Team - 5.0.0-1 - Rebase to JSS 5.0.0 diff --git a/sources b/sources index fa96496..1205a51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.0.0.tar.gz) = 9857ff8e6c1e54927c78904be2d9a84ad4afc0559e95a4c835fd2000388c542d90d31bca7da7e99b0b74ef6e4175512227acb3341aa3475526f5f222c071aa97 +SHA512 (jss-5.1.0-alpha2.tar.gz) = 6c97b42d4d52e6b016b0da72f834f8307905d894780f00a329e39cf3c1271cfb56873f899bd3090188aba015315b08d8b2d8848f5e4f053c64cd1e012f10a6f5 From b513b36692dfe54cfca54d23e1e0d612010986c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 14:01:52 +0000 Subject: [PATCH 55/89] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 96d564d..f9b3fd2 100644 --- a/jss.spec +++ b/jss.spec @@ -9,7 +9,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.1.0 -Release: 0.1.alpha2%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.2.alpha2%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -alpha2 # To generate the source tarball: @@ -159,6 +159,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 5.1.0-0.2.alpha2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Nov 26 2021 Dogtag PKI Team - 5.1.0-0.1.alpha2 - Rebase to JSS 5.1.0-alpha2 From 2070756ccac09cff425f628d9e6e1c4dabc405e9 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 5 Feb 2022 22:08:15 +0100 Subject: [PATCH 56/89] Rebuilt for java-17-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java17 --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index f9b3fd2..7b8165e 100644 --- a/jss.spec +++ b/jss.spec @@ -9,7 +9,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.1.0 -Release: 0.2.alpha2%{?_timestamp}%{?_commit_id}%{?dist} +Release: 0.3.alpha2%{?_timestamp}%{?_commit_id}%{?dist} %global _phase -alpha2 # To generate the source tarball: @@ -159,6 +159,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Sat Feb 05 2022 Jiri Vanek - 5.1.0-0.3.alpha2 +- Rebuilt for java-17-openjdk as system jdk + * Thu Jan 20 2022 Fedora Release Engineering - 5.1.0-0.2.alpha2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 13d4c207f4d917e4e83c33713eca26eb9a999eaf Mon Sep 17 00:00:00 2001 From: Chris Kelley Date: Mon, 14 Feb 2022 16:12:37 +0000 Subject: [PATCH 57/89] Rebase to JSS 5.1.0 --- .gitignore | 1 + jss.spec | 13 ++++++++----- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index d584a8a..f8083a5 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ jss-4.2.6.tar.gz /jss-5.0.0-beta1.tar.gz /jss-5.0.0.tar.gz /jss-5.1.0-alpha2.tar.gz +/jss-5.1.0.tar.gz diff --git a/jss.spec b/jss.spec index 7b8165e..9d0dd7f 100644 --- a/jss.spec +++ b/jss.spec @@ -9,8 +9,8 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. Version: 5.1.0 -Release: 0.3.alpha2%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -alpha2 +Release: 1%{?_timestamp}%{?_commit_id}%{?dist} +#global _phase -alpha2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -124,8 +124,8 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ./build.sh \ %{?_verbose:-v} \ --work-dir=%{_vpath_builddir} \ - --java-lib-dir=%{_jnidir} \ - --jss-lib-dir=%{_libdir}/jss \ + --jni-dir=%{_jnidir} \ + --lib-dir=%{_libdir} \ --version=%{version} \ %{!?with_javadoc:--without-javadoc} \ %{?with_tests:--with-tests} \ @@ -145,7 +145,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA %defattr(-,root,root,-) %doc jss.html -%license MPL-1.1.txt gpl.txt lgpl.txt +%license MPL-1.1.txt gpl.txt lgpl.txt symkey/LICENSE %{_libdir}/* %{_jnidir}/* @@ -159,6 +159,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Mon Feb 14 2022 Dogtag PKI Team - 5.1.0-1 +- Rebase to JSS 5.1.0 + * Sat Feb 05 2022 Jiri Vanek - 5.1.0-0.3.alpha2 - Rebuilt for java-17-openjdk as system jdk diff --git a/sources b/sources index 1205a51..eefcf57 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.1.0-alpha2.tar.gz) = 6c97b42d4d52e6b016b0da72f834f8307905d894780f00a329e39cf3c1271cfb56873f899bd3090188aba015315b08d8b2d8848f5e4f053c64cd1e012f10a6f5 +SHA512 (jss-5.1.0.tar.gz) = 5bed03b443a2f9c8912e153a27469bdd6e8363465c3748c39defb19de1db1f489293ff86aeb6be7417e1b4bdc2c7915847b35521c220c68e18b2c15c24144306 From e1fb53d4aa5cada1f4cd9b73e5fb9a32921d79b3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 11 Apr 2022 14:20:55 -0500 Subject: [PATCH 58/89] Rebase to JSS 5.2.0-beta1 --- .gitignore | 1 + jss.spec | 24 ++++++++++++++++++++---- sources | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f8083a5..ca5b012 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ jss-4.2.6.tar.gz /jss-5.0.0.tar.gz /jss-5.1.0-alpha2.tar.gz /jss-5.1.0.tar.gz +/jss-5.2.0-beta1.tar.gz diff --git a/jss.spec b/jss.spec index 9d0dd7f..0ed4ff9 100644 --- a/jss.spec +++ b/jss.spec @@ -8,9 +8,9 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # For development (i.e. unsupported) releases, use x.y.z-0.n.. # For official (i.e. supported) releases, use x.y.z-r where r >=1. -Version: 5.1.0 -Release: 1%{?_timestamp}%{?_commit_id}%{?dist} -#global _phase -alpha2 +Version: 5.2.0 +Release: 0.2.beta1%{?_timestamp}%{?_commit_id}%{?dist} +%global _phase -beta1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -101,12 +101,16 @@ This package contains the API documentation for JSS. ################################################################################ %prep +################################################################################ %autosetup -n %{name}-%{version}%{?_phase} -p 1 ################################################################################ %build +################################################################################ +# Set build flags for CMake +# (see /usr/lib/rpm/macros.d/macros.cmake) %set_build_flags export JAVA_HOME=%{java_home} @@ -124,8 +128,14 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ./build.sh \ %{?_verbose:-v} \ --work-dir=%{_vpath_builddir} \ - --jni-dir=%{_jnidir} \ + --prefix-dir=%{_prefix} \ + --include-dir=%{_includedir} \ --lib-dir=%{_libdir} \ + --sysconfig-dir=%{_sysconfigdir} \ + --share-dir=%{_datadir} \ + --cmake=%{__cmake} \ + --java-home=%{java_home} \ + --jni-dir=%{_jnidir} \ --version=%{version} \ %{!?with_javadoc:--without-javadoc} \ %{?with_tests:--with-tests} \ @@ -133,6 +143,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %install +################################################################################ ./build.sh \ %{?_verbose:-v} \ @@ -142,6 +153,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %files +################################################################################ %defattr(-,root,root,-) %doc jss.html @@ -152,6 +164,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA %if %{with javadoc} ################################################################################ %files javadoc +################################################################################ %defattr(-,root,root,-) %{_javadocdir}/%{name}/ @@ -159,6 +172,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Mon Apr 11 2022 Dogtag PKI Team - 5.2.0-0.2.beta1 +- Rebase to JSS 5.2.0-beta1 + * Mon Feb 14 2022 Dogtag PKI Team - 5.1.0-1 - Rebase to JSS 5.1.0 diff --git a/sources b/sources index eefcf57..b03417d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.1.0.tar.gz) = 5bed03b443a2f9c8912e153a27469bdd6e8363465c3748c39defb19de1db1f489293ff86aeb6be7417e1b4bdc2c7915847b35521c220c68e18b2c15c24144306 +SHA512 (jss-5.2.0-beta1.tar.gz) = be6f4612567676e797bb07a00cbc8e6ebab4e930770e00514152e5c3389a0484dcc3eb959c3c57d33d12ed38fbf160a02c69d1c6d5c7b40b93b9fe90cbf0bbb3 From e499f9be0bf2843994c34997f2d9d95f726ec819 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 27 Apr 2022 18:19:12 -0500 Subject: [PATCH 59/89] Rebase to JSS 5.2.0-beta2 --- .gitignore | 1 + jss.spec | 52 ++++++++++++++++++++++++++++++++++++++++++---------- sources | 2 +- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index ca5b012..664530f 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ jss-4.2.6.tar.gz /jss-5.1.0-alpha2.tar.gz /jss-5.1.0.tar.gz /jss-5.2.0-beta1.tar.gz +/jss-5.2.0-beta2.tar.gz diff --git a/jss.spec b/jss.spec index 0ed4ff9..42a9102 100644 --- a/jss.spec +++ b/jss.spec @@ -1,16 +1,31 @@ ################################################################################ -Name: jss +Name: dogtag-jss ################################################################################ +# Upstream version number: +%global major_version 5 +%global minor_version 2 +%global update_version 0 + +# Downstream release number: +# - development/stabilization (unsupported): 0. where n >= 1 +# - GA/update (supported): where n >= 1 +%global release_number 0.3 + +# Development phase: +# - development (unsupported): alpha where n >= 1 +# - stabilization (unsupported): beta where n >= 1 +# - GA/update (supported): +%global phase beta2 + +%undefine timestamp +%undefine commit_id + Summary: Java Security Services (JSS) URL: http://www.dogtagpki.org/wiki/JSS License: MPLv1.1 or GPLv2+ or LGPLv2+ - -# For development (i.e. unsupported) releases, use x.y.z-0.n.. -# For official (i.e. supported) releases, use x.y.z-r where r >=1. -Version: 5.2.0 -Release: 0.2.beta1%{?_timestamp}%{?_commit_id}%{?dist} -%global _phase -beta1 +Version: %{major_version}.%{minor_version}.%{update_version} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -19,7 +34,7 @@ Release: 0.2.beta1%{?_timestamp}%{?_commit_id}%{?dist} # $ git push origin v4.5. # Then go to https://github.com/dogtagpki/jss/releases and download the source # tarball. -Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phase}/%{name}-%{version}%{?_phase}.tar.gz +Source: https://github.com/dogtagpki/jss/archive/v%{version}%{?phase:-}%{?phase}/jss-%{version}%{?phase:-}%{?phase}.tar.gz # To create a patch for all changes since a version tag: # $ git format-patch \ @@ -28,6 +43,9 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +# Java 17 and md2man are not available on i686 +ExcludeArch: i686 + ################################################################################ # Java ################################################################################ @@ -77,6 +95,11 @@ Requires: slf4j Requires: slf4j-jdk14 Requires: apache-commons-lang3 +%if "%{name}" != "jss" +Obsoletes: jss < %{version}-%{release} +Provides: jss = %{version}-%{release} +%endif + Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 Conflicts: tomcatjss < 7.6.0 @@ -95,6 +118,11 @@ This only works with gcj. Other JREs require that JCE providers be signed. Summary: Java Security Services (JSS) Javadocs Requires: jss = %{version}-%{release} +%if "%{name}" != "jss" +Obsoletes: jss-javadoc < %{version}-%{release} +Provides: jss-javadoc = %{version}-%{release} +%endif + %description javadoc This package contains the API documentation for JSS. %endif @@ -103,7 +131,7 @@ This package contains the API documentation for JSS. %prep ################################################################################ -%autosetup -n %{name}-%{version}%{?_phase} -p 1 +%autosetup -n jss-%{version}%{?phase:-}%{?phase} -p 1 ################################################################################ %build @@ -167,11 +195,15 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %defattr(-,root,root,-) -%{_javadocdir}/%{name}/ +%{_javadocdir}/jss/ %endif ################################################################################ %changelog +* Wed Apr 27 2022 Dogtag PKI Team - 5.2.0-0.3.beta2 +- Rebase to JSS 5.2.0-beta2 +- Rename packages to dogtag-jss + * Mon Apr 11 2022 Dogtag PKI Team - 5.2.0-0.2.beta1 - Rebase to JSS 5.2.0-beta1 diff --git a/sources b/sources index b03417d..2711f9e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.2.0-beta1.tar.gz) = be6f4612567676e797bb07a00cbc8e6ebab4e930770e00514152e5c3389a0484dcc3eb959c3c57d33d12ed38fbf160a02c69d1c6d5c7b40b93b9fe90cbf0bbb3 +SHA512 (jss-5.2.0-beta2.tar.gz) = cdb40a65e816972e0eac1055a4bd4bb5a04906dbeddfefb36d099562a7b6b9841d2fdf3b1217179f59deadeaaf5d1be16affe5f713be01f806f06cab00486917 From ced9b084df8933927a8c463ad63d839ba26955c2 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 28 Apr 2022 09:55:23 -0500 Subject: [PATCH 60/89] Add dogtag-jss subpackage --- jss.spec | 30 +++++++++++++++++++----------- sources | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/jss.spec b/jss.spec index 42a9102..fd4940f 100644 --- a/jss.spec +++ b/jss.spec @@ -1,7 +1,9 @@ ################################################################################ -Name: dogtag-jss +Name: jss ################################################################################ +%global product_id dogtag-jss + # Upstream version number: %global major_version 5 %global minor_version 2 @@ -88,6 +90,17 @@ BuildRequires: apache-commons-lang3 BuildRequires: junit +%description +Java Security Services (JSS) is a java native interface which provides a bridge +for java-based applications to use native Network Security Services (NSS). +This only works with gcj. Other JREs require that JCE providers be signed. + +################################################################################ +%package -n %{product_id} +################################################################################ + +Summary: Java Security Services (JSS) + Requires: nss >= 3.66 Requires: %{java_headless} Requires: jpackage-utils @@ -95,35 +108,30 @@ Requires: slf4j Requires: slf4j-jdk14 Requires: apache-commons-lang3 -%if "%{name}" != "jss" Obsoletes: jss < %{version}-%{release} Provides: jss = %{version}-%{release} -%endif Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 Conflicts: tomcatjss < 7.6.0 Conflicts: pki-base < 10.10.0 -%description +%description -n %{product_id} Java Security Services (JSS) is a java native interface which provides a bridge for java-based applications to use native Network Security Services (NSS). This only works with gcj. Other JREs require that JCE providers be signed. %if %{with javadoc} ################################################################################ -%package javadoc +%package -n %{product_id}-javadoc ################################################################################ Summary: Java Security Services (JSS) Javadocs -Requires: jss = %{version}-%{release} -%if "%{name}" != "jss" Obsoletes: jss-javadoc < %{version}-%{release} Provides: jss-javadoc = %{version}-%{release} -%endif -%description javadoc +%description -n %{product_id}-javadoc This package contains the API documentation for JSS. %endif @@ -180,7 +188,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA install ################################################################################ -%files +%files -n %{product_id} ################################################################################ %defattr(-,root,root,-) @@ -191,7 +199,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA %if %{with javadoc} ################################################################################ -%files javadoc +%files -n %{product_id}-javadoc ################################################################################ %defattr(-,root,root,-) diff --git a/sources b/sources index 2711f9e..96f4b70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.2.0-beta2.tar.gz) = cdb40a65e816972e0eac1055a4bd4bb5a04906dbeddfefb36d099562a7b6b9841d2fdf3b1217179f59deadeaaf5d1be16affe5f713be01f806f06cab00486917 +SHA512 (jss-5.2.0-beta2.tar.gz) = da0ff4cd544cb9d339995251f48a4e402f44ab838beacfc96a2d92bb32a6581c81c005bc075fb8cfa5220d2c92e332a946f28b7aa1be61ec2671c396d721e48f From e19c3126fcc52b5c77c837706e0786558e945e19 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 29 Jun 2022 20:06:09 -0500 Subject: [PATCH 61/89] Rebase to JSS 5.2.0 --- .gitignore | 1 + jss.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 664530f..f35bae3 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ jss-4.2.6.tar.gz /jss-5.1.0.tar.gz /jss-5.2.0-beta1.tar.gz /jss-5.2.0-beta2.tar.gz +/jss-5.2.0.tar.gz diff --git a/jss.spec b/jss.spec index fd4940f..823d0ae 100644 --- a/jss.spec +++ b/jss.spec @@ -12,19 +12,19 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 0.3 +%global release_number 1 # Development phase: # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -%global phase beta2 +%undefine phase %undefine timestamp %undefine commit_id Summary: Java Security Services (JSS) -URL: http://www.dogtagpki.org/wiki/JSS +URL: https://github.com/dogtagpki/jss License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: %{major_version}.%{minor_version}.%{update_version} Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} @@ -167,7 +167,7 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA --prefix-dir=%{_prefix} \ --include-dir=%{_includedir} \ --lib-dir=%{_libdir} \ - --sysconfig-dir=%{_sysconfigdir} \ + --sysconf-dir=%{_sysconfdir} \ --share-dir=%{_datadir} \ --cmake=%{__cmake} \ --java-home=%{java_home} \ @@ -208,6 +208,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Wed Jun 29 2022 Dogtag PKI Team - 5.2.0-1 +- Rebase to JSS 5.2.0 + * Wed Apr 27 2022 Dogtag PKI Team - 5.2.0-0.3.beta2 - Rebase to JSS 5.2.0-beta2 - Rename packages to dogtag-jss diff --git a/sources b/sources index 96f4b70..ec3fe03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.2.0-beta2.tar.gz) = da0ff4cd544cb9d339995251f48a4e402f44ab838beacfc96a2d92bb32a6581c81c005bc075fb8cfa5220d2c92e332a946f28b7aa1be61ec2671c396d721e48f +SHA512 (jss-5.2.0.tar.gz) = daddcd424d3de93544485b2442b20ffa97cc3653e1ca82cf1402983f3dd08779157fc65ff240eb4872861fcdb02ed720e09e78e5238d51e664c3875f4bb6f663 From 3d194c83fd40661cc2741601e1e2f3faa413057d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 15:28:13 +0000 Subject: [PATCH 62/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 823d0ae..e299628 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -208,6 +208,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 5.2.0-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 29 2022 Dogtag PKI Team - 5.2.0-1 - Rebase to JSS 5.2.0 From 7aa4dda38d0dd1cc8863009013217f9852645a93 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 13:57:29 +0000 Subject: [PATCH 63/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index e299628..e91b95b 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -208,6 +208,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 5.2.0-1.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 5.2.0-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From fddba91c299f613ee08ea85076908f0c221a0d40 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 7 Feb 2023 12:45:03 -0600 Subject: [PATCH 64/89] Rebase to JSS 5.3.0 --- .gitignore | 1 + jss.spec | 18 ++++++++++++++---- sources | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f35bae3..e93a466 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ jss-4.2.6.tar.gz /jss-5.2.0-beta1.tar.gz /jss-5.2.0-beta2.tar.gz /jss-5.2.0.tar.gz +/jss-5.3.0.tar.gz diff --git a/jss.spec b/jss.spec index e91b95b..881aa45 100644 --- a/jss.spec +++ b/jss.spec @@ -6,7 +6,7 @@ Name: jss # Upstream version number: %global major_version 5 -%global minor_version 2 +%global minor_version 3 %global update_version 0 # Downstream release number: @@ -18,7 +18,7 @@ Name: jss # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -%undefine phase +#global phase %undefine timestamp %undefine commit_id @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPLv1.1 or GPLv2+ or LGPLv2+ Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.2 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -45,8 +45,11 @@ Source: https://github.com/dogtagpki/jss/archive/v%{version}%{?phase:-}% # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -# Java 17 and md2man are not available on i686 +%if 0%{?fedora} && 0%{?fedora} > 35 +ExclusiveArch: %{java_arches} +%else ExcludeArch: i686 +%endif ################################################################################ # Java @@ -110,6 +113,8 @@ Requires: apache-commons-lang3 Obsoletes: jss < %{version}-%{release} Provides: jss = %{version}-%{release} +Provides: jss = %{major_version}.%{minor_version} +Provides: %{product_id} = %{major_version}.%{minor_version} Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 @@ -130,6 +135,8 @@ Summary: Java Security Services (JSS) Javadocs Obsoletes: jss-javadoc < %{version}-%{release} Provides: jss-javadoc = %{version}-%{release} +Provides: jss-javadoc = %{major_version}.%{minor_version} +Provides: %{product_id}-javadoc = %{major_version}.%{minor_version} %description -n %{product_id}-javadoc This package contains the API documentation for JSS. @@ -208,6 +215,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Tue Feb 07 2023 Dogtag PKI Team - 5.3.0-1 +- Rebase to JSS 5.3.0 + * Thu Jan 19 2023 Fedora Release Engineering - 5.2.0-1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index ec3fe03..858c130 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.2.0.tar.gz) = daddcd424d3de93544485b2442b20ffa97cc3653e1ca82cf1402983f3dd08779157fc65ff240eb4872861fcdb02ed720e09e78e5238d51e664c3875f4bb6f663 +SHA512 (jss-5.3.0.tar.gz) = 6918683925f94c9d5dbd71a0106216f0a764b3aacca3fe2bc5b52a53780f5cd0400bd1767368ab96a081e2553f0525dee916a707c634867da933e3d1a59de4be From 8ccdc10274032547f9b6a45e0e6e3eda11e93bff Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 7 Feb 2023 13:16:09 -0600 Subject: [PATCH 65/89] Update version number in JSSConfig.cmake --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 858c130..46e22b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.3.0.tar.gz) = 6918683925f94c9d5dbd71a0106216f0a764b3aacca3fe2bc5b52a53780f5cd0400bd1767368ab96a081e2553f0525dee916a707c634867da933e3d1a59de4be +SHA512 (jss-5.3.0.tar.gz) = 2cf75d3d7d028493ac22e5367035959d120317298d9b276b34ef5824d189c0eb62bfe8c83fce4ae8cf63e140495f0ea725e57a3da7219c05319195dea31e51ce From fdc6d683c010995ff335684af48935da7eb93db6 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 7 Feb 2023 13:24:25 -0600 Subject: [PATCH 66/89] Update spec file --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 881aa45..affdeb5 100644 --- a/jss.spec +++ b/jss.spec @@ -12,7 +12,7 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 1 +%global release_number 2 # Development phase: # - development (unsupported): alpha where n >= 1 @@ -215,6 +215,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Tue Feb 07 2023 Dogtag PKI Team - 5.3.0-2 +- Update version number in JSSConfig.cmake + * Tue Feb 07 2023 Dogtag PKI Team - 5.3.0-1 - Rebase to JSS 5.3.0 From a7851eaff4b1413a51b762bfe4196b507275e91a Mon Sep 17 00:00:00 2001 From: Chris Kelley Date: Tue, 28 Feb 2023 06:40:19 +0000 Subject: [PATCH 67/89] Update to SPDX licence --- jss.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index affdeb5..5b39906 100644 --- a/jss.spec +++ b/jss.spec @@ -25,7 +25,7 @@ Name: jss Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss -License: MPLv1.1 or GPLv2+ or LGPLv2+ +License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later Version: %{major_version}.%{minor_version}.%{update_version} Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} From f8f85c0c8f42c0a704d049f55757eae9709597c2 Mon Sep 17 00:00:00 2001 From: Packit Date: Fri, 16 Jun 2023 11:55:40 +0000 Subject: [PATCH 68/89] [packit] 5.4.2 upstream release Upstream tag: v5.4.2 Upstream commit: 7e99d7e7 --- .gitignore | 1 + .packit.yaml | 30 ++++++++++++++++++++++++++++++ README.packit | 3 +++ jss.spec | 33 +++++++++++++++++++-------------- sources | 2 +- 5 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 .packit.yaml create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index e93a466..1ddcac1 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ jss-4.2.6.tar.gz /jss-5.2.0-beta2.tar.gz /jss-5.2.0.tar.gz /jss-5.3.0.tar.gz +/jss-5.4.2.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..73d2062 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,30 @@ +--- +# See the documentation for more information: +# https://packit.dev/docs/configuration/ +specfile_path: jss.spec + +# add or remove files that should be synced +files_to_sync: + - jss.spec + - .packit.yaml + +# Allow dist git reactions on packit and ckelley commits and PRs +allowed_pr_authors: + - packit + - ckelleyRH +allowed_committers: + - packit + - ckelleyRH + +upstream_package_name: jss +# downstream (Fedora/CentOS) RPM package name +downstream_package_name: jss +# see: https://packit.dev/docs/configuration/#upstream_tag_template +upstream_tag_template: "v{version}" + +jobs: + - job: propose_downstream + trigger: release + dist_git_branches: + - fedora-development +# - centos-stream-9-x86_64 # When Packit integration with CentOS is avaiable, enable this diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..07bc213 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.76.0.post10+g0dcb396. diff --git a/jss.spec b/jss.spec index 5b39906..7f6f32e 100644 --- a/jss.spec +++ b/jss.spec @@ -6,13 +6,13 @@ Name: jss # Upstream version number: %global major_version 5 -%global minor_version 3 -%global update_version 0 +%global minor_version 4 +%global update_version 2 # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 2 +%global release_number 1 # Development phase: # - development (unsupported): alpha where n >= 1 @@ -26,7 +26,7 @@ Name: jss Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later -Version: %{major_version}.%{minor_version}.%{update_version} +Version: 5.4.2 Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: @@ -85,13 +85,13 @@ BuildRequires: unzip BuildRequires: gcc-c++ BuildRequires: nss-devel >= 3.66 BuildRequires: nss-tools >= 3.66 -BuildRequires: %{java_devel} -BuildRequires: jpackage-utils -BuildRequires: slf4j -BuildRequires: slf4j-jdk14 -BuildRequires: apache-commons-lang3 -BuildRequires: junit +BuildRequires: %{java_devel} +BuildRequires: maven-local +BuildRequires: mvn(org.apache.commons:commons-lang3) +BuildRequires: mvn(org.slf4j:slf4j-api) +BuildRequires: mvn(org.slf4j:slf4j-jdk14) +BuildRequires: mvn(junit:junit) %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -105,11 +105,11 @@ This only works with gcj. Other JREs require that JCE providers be signed. Summary: Java Security Services (JSS) Requires: nss >= 3.66 + Requires: %{java_headless} -Requires: jpackage-utils -Requires: slf4j -Requires: slf4j-jdk14 -Requires: apache-commons-lang3 +Requires: mvn(org.apache.commons:commons-lang3) +Requires: mvn(org.slf4j:slf4j-api) +Requires: mvn(org.slf4j:slf4j-jdk14) Obsoletes: jss < %{version}-%{release} Provides: jss = %{version}-%{release} @@ -215,6 +215,11 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Fri Jun 16 2023 Packit - 5.4.2-1 +- Updating version to v5.4.2 (Chris Kelley) +- Upstream spec file changes to reduce diffs (Chris Kelley) +- Introduce Packit configuration for jss (Chris Kelley) + * Tue Feb 07 2023 Dogtag PKI Team - 5.3.0-2 - Update version number in JSSConfig.cmake diff --git a/sources b/sources index 46e22b9..5f64e0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.3.0.tar.gz) = 2cf75d3d7d028493ac22e5367035959d120317298d9b276b34ef5824d189c0eb62bfe8c83fce4ae8cf63e140495f0ea725e57a3da7219c05319195dea31e51ce +SHA512 (jss-5.4.2.tar.gz) = 8e5c0ed93d8bafbfd8a8f822aaeda5d4b60e7609aa24f793eb3c449918a4a23884a55966f40d66d810e9b56114eb7cefb8dfeee565fe680c79ef876bc9acfefa From 33742c45895518e8e7be3ab4f4d71463ab4362a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 08:15:39 +0000 Subject: [PATCH 69/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 7f6f32e..a98c500 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later Version: 5.4.2 -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -215,6 +215,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 5.4.2-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jun 16 2023 Packit - 5.4.2-1 - Updating version to v5.4.2 (Chris Kelley) - Upstream spec file changes to reduce diffs (Chris Kelley) From 419c9333510e5e3175f69551ba875ab05800141b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 23:50:48 +0000 Subject: [PATCH 70/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index a98c500..f5203a7 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later Version: 5.4.2 -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -215,6 +215,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 5.4.2-1.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 5.4.2-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From e722059771135bd087d97816917f1e676af76d60 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 23:30:49 +0000 Subject: [PATCH 71/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index f5203a7..0b3c810 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later Version: 5.4.2 -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.2 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.3 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -215,6 +215,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 5.4.2-1.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 5.4.2-1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 9eff0686ac23054a17d4332384fdb2da483763dc Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 8 Feb 2024 12:15:32 -0500 Subject: [PATCH 72/89] Fix compatibility with NSS 3.97 https://github.com/dogtagpki/jss/pull/992 --- jss-5.4.2-nss-3.97.patch | 40 ++++++++++++++++++++++++++++++++++++++++ jss.spec | 8 +++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 jss-5.4.2-nss-3.97.patch diff --git a/jss-5.4.2-nss-3.97.patch b/jss-5.4.2-nss-3.97.patch new file mode 100644 index 0000000..8b9d64d --- /dev/null +++ b/jss-5.4.2-nss-3.97.patch @@ -0,0 +1,40 @@ +From 130d543f3a7c33196bef386b4ee87ccc4ed53d0b Mon Sep 17 00:00:00 2001 +From: "Endi S. Dewata" +Date: Wed, 7 Feb 2024 14:59:31 -0600 +Subject: [PATCH] Update kea_alg_defs to match NSS 3.97 + +The kea_alg_defs array in SSLCipher.c has been updated to match +the one defined in NSS 3.97. The assertion that compares the size +of the array with ssl_kea_size has also been removed. These +changes will allow JSS to work with the newer NSS 3.97 on Fedora +Rawhide as well as the older NSS versions on other platforms. + +Resolves: https://github.com/dogtagpki/jss/issues/991 +--- + native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c b/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c +index 4f2dacb0b..ea739617a 100644 +--- a/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c ++++ b/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c +@@ -23,7 +23,7 @@ static const CK_MECHANISM_TYPE auth_alg_defs[] = { + }; + PR_STATIC_ASSERT(PR_ARRAY_SIZE(auth_alg_defs) == ssl_auth_size); + +-/* Copied from NSS's ssl3con.c. */ ++/* Copied from NSS 3.97's ssl3con.c. */ + static const CK_MECHANISM_TYPE kea_alg_defs[] = { + CKM_INVALID_MECHANISM, /* ssl_kea_null */ + CKM_RSA_PKCS, /* ssl_kea_rsa */ +@@ -33,8 +33,9 @@ static const CK_MECHANISM_TYPE kea_alg_defs[] = { + CKM_ECDH1_DERIVE, /* ssl_kea_ecdh_psk */ + CKM_DH_PKCS_DERIVE, /* ssl_kea_dh_psk */ + CKM_INVALID_MECHANISM, /* ssl_kea_tls13_any */ ++ CKM_INVALID_MECHANISM, /* ssl_kea_ecdh_hybrid */ ++ CKM_INVALID_MECHANISM, /* ssl_kea_ecdh_hybrid_psk */ + }; +-PR_STATIC_ASSERT(PR_ARRAY_SIZE(kea_alg_defs) == ssl_kea_size); + + #ifdef HAVE_NSS_CIPHER_SUITE_INFO_KDFHASH + /* Not present in ssl3con.c. */ diff --git a/jss.spec b/jss.spec index 0b3c810..a3e30bd 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later Version: 5.4.2 -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.3 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.4 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -45,6 +45,9 @@ Source: https://github.com/dogtagpki/jss/archive/v%{version}%{?phase:-}% # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch +# https://github.com/dogtagpki/jss/pull/992 +Patch: jss-5.4.2-nss-3.97.patch + %if 0%{?fedora} && 0%{?fedora} > 35 ExclusiveArch: %{java_arches} %else @@ -215,6 +218,9 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA ################################################################################ %changelog +* Thu Feb 08 2024 Yaakov Selkowitz - 5.4.2-1.4 +- Fix compatibility with NSS 3.97 + * Wed Jan 24 2024 Fedora Release Engineering - 5.4.2-1.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 18e3b27daba28e3ecb75e6ef298b2dc21c52275a Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 21 Feb 2024 18:08:28 -0600 Subject: [PATCH 73/89] Rebased to JSS 5.5.0 --- .gitignore | 2 + jss.spec | 181 ++++++++++++++++++++++++++++++++++++++++++++++------- sources | 2 +- 3 files changed, 161 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 1ddcac1..25ef8c4 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,5 @@ jss-4.2.6.tar.gz /jss-5.2.0.tar.gz /jss-5.3.0.tar.gz /jss-5.4.2.tar.gz +/jss-5.5.0-alpha2.tar.gz +/jss-5.5.0.tar.gz diff --git a/jss.spec b/jss.spec index a3e30bd..5742bef 100644 --- a/jss.spec +++ b/jss.spec @@ -6,8 +6,8 @@ Name: jss # Upstream version number: %global major_version 5 -%global minor_version 4 -%global update_version 2 +%global minor_version 5 +%global update_version 0 # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 @@ -25,9 +25,9 @@ Name: jss Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss -License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later -Version: 5.4.2 -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.4 +License: (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) and Apache-2.0 +Version: %{major_version}.%{minor_version}.%{update_version} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -45,10 +45,7 @@ Source: https://github.com/dogtagpki/jss/archive/v%{version}%{?phase:-}% # > jss-VERSION-RELEASE.patch # Patch: jss-VERSION-RELEASE.patch -# https://github.com/dogtagpki/jss/pull/992 -Patch: jss-5.4.2-nss-3.97.patch - -%if 0%{?fedora} && 0%{?fedora} > 35 +%if 0%{?java_arches:1} ExclusiveArch: %{java_arches} %else ExcludeArch: i686 @@ -71,10 +68,10 @@ ExcludeArch: i686 %bcond_without javadoc -# By default the build will not execute unit tests unless --with tests -# option is specified. +# By default the tests package will be built and the tests will executed +# unless --without tests option is specified. -%bcond_with tests +%bcond_without tests ################################################################################ # Build Dependencies @@ -94,7 +91,6 @@ BuildRequires: maven-local BuildRequires: mvn(org.apache.commons:commons-lang3) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-jdk14) -BuildRequires: mvn(junit:junit) %description Java Security Services (JSS) is a java native interface which provides a bridge @@ -121,7 +117,6 @@ Provides: %{product_id} = %{major_version}.%{minor_version} Conflicts: ldapjdk < 4.20 Conflicts: idm-console-framework < 1.2 -Conflicts: tomcatjss < 7.6.0 Conflicts: pki-base < 10.10.0 %description -n %{product_id} @@ -129,6 +124,41 @@ Java Security Services (JSS) is a java native interface which provides a bridge for java-based applications to use native Network Security Services (NSS). This only works with gcj. Other JREs require that JCE providers be signed. +################################################################################ +%package -n %{product_id}-tomcat +################################################################################ + +Summary: Java Security Services (JSS) Connector for Tomcat + +# Tomcat +BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 9.0.62 +BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 9.0.62 +BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 9.0.62 + +Requires: %{product_id} = %{version}-%{release} +Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 9.0.62 +Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 9.0.62 +Requires: mvn(org.apache.tomcat:tomcat-juli) >= 9.0.62 + +# Tomcat JSS has been replaced with JSS Connector for Tomcat. +# This will remove installed Tomcat JSS packages. +Obsoletes: tomcatjss <= 8.5 +Conflicts: tomcatjss <= 8.5 +Obsoletes: dogtag-tomcatjss <= 8.5 +Conflicts: dogtag-tomcatjss <= 8.5 + +%if 0%{?rhel} <= 8 +# PKI Servlet Engine has been replaced with Tomcat. +# This will remove installed PKI Servlet Engine packages. +Obsoletes: pki-servlet-engine <= 9.0 +Conflicts: pki-servlet-engine <= 9.0 +%endif + +%description -n %{product_id}-tomcat +JSS Connector for Tomcat is a Java Secure Socket Extension (JSSE) +module for Apache Tomcat that uses Java Security Services (JSS), +a Java interface to Network Security Services (NSS). + %if %{with javadoc} ################################################################################ %package -n %{product_id}-javadoc @@ -145,12 +175,46 @@ Provides: %{product_id}-javadoc = %{major_version}.%{minor_version} This package contains the API documentation for JSS. %endif +%if %{with tests} +################################################################################ +%package -n %{product_id}-tests +################################################################################ + +Summary: Java Security Services (JSS) Tests + +BuildRequires: mvn(org.junit.jupiter:junit-jupiter) +BuildRequires: mvn(org.opentest4j:opentest4j) + +%description -n %{product_id}-tests +This package provides test suite for JSS. + +# with tests +%endif + ################################################################################ %prep ################################################################################ %autosetup -n jss-%{version}%{?phase:-}%{?phase} -p 1 +# disable native modules since they will be built by CMake +%pom_disable_module native +%pom_disable_module symkey + +# do not ship examples +%pom_disable_module examples + +# flatten-maven-plugin is not available in RPM +%pom_remove_plugin org.codehaus.mojo:flatten-maven-plugin + +# specify Maven artifact locations +%mvn_file org.dogtagpki.jss:jss-tomcat jss/jss-tomcat +%mvn_file org.dogtagpki.jss:jss-tomcat-9.0 jss/jss-tomcat-9.0 + +# specify Maven artifact packages +%mvn_package org.dogtagpki.jss:jss-tomcat jss-tomcat +%mvn_package org.dogtagpki.jss:jss-tomcat-9.0 jss-tomcat + ################################################################################ %build ################################################################################ @@ -171,6 +235,38 @@ export CFLAGS # Check if we're in FIPS mode modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1 +# build Java code, run Java tests, and build Javadoc with Maven +%mvn_build %{!?with_tests:-f} %{!?with_javadoc:-j} + +# create links to Maven-built classes for CMake +mkdir -p %{_vpath_builddir}/classes/jss +ln -sf ../../../base/target/classes/org %{_vpath_builddir}/classes/jss +%if %{with tests} +mkdir -p %{_vpath_builddir}/classes/tests +ln -sf ../../../base/target/test-classes/org %{_vpath_builddir}/classes/tests +%endif + +# create links to Maven-built JAR files for CMake +ln -sf ../base/target/jss.jar %{_vpath_builddir} +%if %{with tests} +ln -sf ../base/target/jss-tests.jar %{_vpath_builddir} +%endif + +# create links to Maven-built headers for CMake +mkdir -p %{_vpath_builddir}/include/jss +ln -sf ../../../base/target/include/_jni %{_vpath_builddir}/include/jss/_jni + +# mark Maven-built targets so that CMake will not rebuild them +mkdir -p %{_vpath_builddir}/.targets +touch %{_vpath_builddir}/.targets/finished_generate_java +%if %{with tests} +touch %{_vpath_builddir}/.targets/finished_tests_generate_java +%endif +%if %{with javadoc} +touch %{_vpath_builddir}/.targets/finished_generate_javadocs +%endif + +# build native code and run native tests with CMake ./build.sh \ %{?_verbose:-v} \ --work-dir=%{_vpath_builddir} \ @@ -183,41 +279,80 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA --java-home=%{java_home} \ --jni-dir=%{_jnidir} \ --version=%{version} \ - %{!?with_javadoc:--without-javadoc} \ - %{?with_tests:--with-tests} \ + --without-java \ + --without-javadoc \ + %{!?with_tests:--without-tests} \ dist ################################################################################ %install ################################################################################ +# install Java binaries and Javadoc +%mvn_install + +# install jss.jar +mkdir -p %{buildroot}%{_javadir}/jss +cp base/target/jss.jar %{buildroot}%{_javadir}/jss/jss.jar + +# create links for backward compatibility +mkdir -p %{buildroot}%{_jnidir} +ln -sf ../../..%{_javadir}/jss/jss.jar %{buildroot}%{_jnidir}/jss.jar + +mkdir -p %{buildroot}%{_libdir}/jss +ln -sf ../../..%{_javadir}/jss/jss.jar %{buildroot}%{_libdir}/jss/jss.jar + +# install native binaries ./build.sh \ %{?_verbose:-v} \ --work-dir=%{_vpath_builddir} \ --install-dir=%{buildroot} \ + --without-java \ install +# install tests binaries +%if %{with tests} +mkdir -p %{buildroot}%{_datadir}/jss/tests/lib +cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib +%endif + ################################################################################ -%files -n %{product_id} +%files -n %{product_id} -f .mfiles ################################################################################ -%defattr(-,root,root,-) %doc jss.html %license MPL-1.1.txt gpl.txt lgpl.txt symkey/LICENSE -%{_libdir}/* -%{_jnidir}/* +%{_javadir}/jss/jss.jar +%{_jnidir}/jss.jar +%{_libdir}/jss/jss.jar +%{_libdir}/jss/libjss.so +%{_libdir}/jss/libjss-symkey.so + +################################################################################ +%files -n %{product_id}-tomcat -f .mfiles-jss-tomcat +################################################################################ %if %{with javadoc} ################################################################################ -%files -n %{product_id}-javadoc +%files -n %{product_id}-javadoc -f .mfiles-javadoc +################################################################################ +%endif + +%if %{with tests} +################################################################################ +%files -n %{product_id}-tests ################################################################################ -%defattr(-,root,root,-) -%{_javadocdir}/jss/ +%{_datadir}/jss/tests/ + +# with tests %endif ################################################################################ %changelog +* Wed Feb 21 2024 Dogtag PKI Team 5.5.0-1 +- Rebase to JSS 5.5.0 + * Thu Feb 08 2024 Yaakov Selkowitz - 5.4.2-1.4 - Fix compatibility with NSS 3.97 diff --git a/sources b/sources index 5f64e0c..645ec2a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.4.2.tar.gz) = 8e5c0ed93d8bafbfd8a8f822aaeda5d4b60e7609aa24f793eb3c449918a4a23884a55966f40d66d810e9b56114eb7cefb8dfeee565fe680c79ef876bc9acfefa +SHA512 (jss-5.5.0.tar.gz) = bda0b4df1ef08a264525c9124a29f57945e3a24adadda609b54032d840a1c311d522e34f29bb2246d03d493d108d425a64e4826edcc8a296a2f55b1cdd8a95c0 From d77787f82372d5b7a2707b4bc070d8444b508455 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 27 Feb 2024 16:42:53 +0100 Subject: [PATCH 74/89] Rebuilt for java-21-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java21 --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 5742bef..1defcaa 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) and Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -350,6 +350,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Tue Feb 27 2024 Jiri Vanek - 5.5.0-1.1 +- Rebuilt for java-21-openjdk as system jdk + * Wed Feb 21 2024 Dogtag PKI Team 5.5.0-1 - Rebase to JSS 5.5.0 From bfa1d7c37aa0e8a43b6e6b6b5ea4ff42f6ec23e5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 29 Feb 2024 19:08:28 -0800 Subject: [PATCH 75/89] Really build against java-21 --- jss.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jss.spec b/jss.spec index 1defcaa..3c07d98 100644 --- a/jss.spec +++ b/jss.spec @@ -12,7 +12,7 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 1 +%global release_number 2 # Development phase: # - development (unsupported): alpha where n >= 1 @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) and Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -55,9 +55,9 @@ ExcludeArch: i686 # Java ################################################################################ -%define java_devel java-17-openjdk-devel -%define java_headless java-17-openjdk-headless -%define java_home %{_jvmdir}/jre-17-openjdk +%define java_devel java-21-openjdk-devel +%define java_headless java-21-openjdk-headless +%define java_home %{_jvmdir}/jre-21-openjdk ################################################################################ # Build Options @@ -350,6 +350,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Thu Feb 29 2024 Adam Williamson - 5.5.0-2 +- Really build against java-21 + * Tue Feb 27 2024 Jiri Vanek - 5.5.0-1.1 - Rebuilt for java-21-openjdk as system jdk From ed7d60009d506aa3cbff950370e6a3b7fa641275 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 11:12:28 +0000 Subject: [PATCH 76/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 3c07d98..09a8f92 100644 --- a/jss.spec +++ b/jss.spec @@ -27,7 +27,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) and Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -350,6 +350,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 5.5.0-2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Feb 29 2024 Adam Williamson - 5.5.0-2 - Really build against java-21 From b9d8c115ccead49b38ca09eb9fed43d0a2b786f4 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Tue, 8 Oct 2024 14:20:45 -0700 Subject: [PATCH 77/89] Rebase to 5.5.1, in order to fix rawhide build issue. --- .gitignore | 1 + jss.spec | 6 ++++-- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 25ef8c4..411bfea 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ jss-4.2.6.tar.gz /jss-5.4.2.tar.gz /jss-5.5.0-alpha2.tar.gz /jss-5.5.0.tar.gz +/jss-5.5.1.tar.gz diff --git a/jss.spec b/jss.spec index 09a8f92..a8fc6ce 100644 --- a/jss.spec +++ b/jss.spec @@ -7,12 +7,12 @@ Name: jss # Upstream version number: %global major_version 5 %global minor_version 5 -%global update_version 0 +%global update_version 1 # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 2 +%global release_number 1 # Development phase: # - development (unsupported): alpha where n >= 1 @@ -350,6 +350,8 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Fri Oct 04 2024 Dogtag PKI Team 5.5.1-1 +- Rebase to JSS 5.5.1 * Thu Jul 18 2024 Fedora Release Engineering - 5.5.0-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 645ec2a..353a32d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.5.0.tar.gz) = bda0b4df1ef08a264525c9124a29f57945e3a24adadda609b54032d840a1c311d522e34f29bb2246d03d493d108d425a64e4826edcc8a296a2f55b1cdd8a95c0 +SHA512 (jss-5.5.1.tar.gz) = 182c9b5f8b6c542278ff44e8573be902194a72c0e9621e2bcdb8df8770a165d83ed27d9189c4c8e66b7ed41cdfe7d66124ef6a056ea0be36ef202126cfce8be3 From 1f8ce4dbba00f3552912caf3dcfb120da1a5fecf Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Wed, 20 Nov 2024 18:40:21 +0100 Subject: [PATCH 78/89] Rebase to JSS v5.6.0-alpha1 --- .gitignore | 1 + jss.spec | 44 +++++++++++++++++++++++++++++++++++++------- sources | 2 +- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 411bfea..377c2aa 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ jss-4.2.6.tar.gz /jss-5.5.0-alpha2.tar.gz /jss-5.5.0.tar.gz /jss-5.5.1.tar.gz +/jss-5.6.0-alpha1.tar.gz diff --git a/jss.spec b/jss.spec index a8fc6ce..e4a38ca 100644 --- a/jss.spec +++ b/jss.spec @@ -2,32 +2,33 @@ Name: jss ################################################################################ -%global product_id dogtag-jss +%global vendor_id dogtag +%global product_id %{vendor_id}-jss # Upstream version number: %global major_version 5 -%global minor_version 5 -%global update_version 1 +%global minor_version 6 +%global update_version 0 # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 1 +%global release_number 0.1 # Development phase: # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -#global phase +%global phase alpha1 %undefine timestamp %undefine commit_id Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss -License: (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) and Apache-2.0 +License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -159,6 +160,23 @@ JSS Connector for Tomcat is a Java Secure Socket Extension (JSSE) module for Apache Tomcat that uses Java Security Services (JSS), a Java interface to Network Security Services (NSS). +################################################################################ +%package -n %{product_id}-tools +################################################################################ + +Summary: Java Security Services (JSS) Tools + +Provides: jss-tools = %{version}-%{release} +Provides: jss-tools = %{major_version}.%{minor_version} +Provides: %{product_id}-tools = %{major_version}.%{minor_version} + +# Some PKI tools have been moved into jss-tools. +Conflicts: pki-tools < 11.6 +Conflicts: %{vendor_id}-pki-tools < 11.6 + +%description -n %{product_id}-tools +This package contains JSS tools. + %if %{with javadoc} ################################################################################ %package -n %{product_id}-javadoc @@ -332,6 +350,14 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib %files -n %{product_id}-tomcat -f .mfiles-jss-tomcat ################################################################################ +################################################################################ +%files -n %{product_id}-tools +################################################################################ + +%{_bindir}/p12tool +%{_bindir}/p7tool +%{_bindir}/sslget + %if %{with javadoc} ################################################################################ %files -n %{product_id}-javadoc -f .mfiles-javadoc @@ -350,8 +376,12 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Wed Nov 20 2024 Dogtag PKI Team 5.6.0-1 +- Rebase to JSS 5.6.0-alpha1 + * Fri Oct 04 2024 Dogtag PKI Team 5.5.1-1 - Rebase to JSS 5.5.1 + * Thu Jul 18 2024 Fedora Release Engineering - 5.5.0-2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 353a32d..8d8bc4b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (jss-5.5.1.tar.gz) = 182c9b5f8b6c542278ff44e8573be902194a72c0e9621e2bcdb8df8770a165d83ed27d9189c4c8e66b7ed41cdfe7d66124ef6a056ea0be36ef202126cfce8be3 +SHA512 (jss-5.6.0-alpha1.tar.gz) = 239952d7b1fc9d005760e9234aec84a84a02becefffa525853e9cccd5cfc88e6e0d9d2ea2eea59f43e3b6d1686878081eae1e615ed68d759b3c5aef7397a5472 From 9dfe730fd7da6e9d69c14312f867c6f5ef97f61b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 08:06:05 +0000 Subject: [PATCH 79/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index e4a38ca..155a73d 100644 --- a/jss.spec +++ b/jss.spec @@ -28,7 +28,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -376,6 +376,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 5.6.0-0.1.alpha1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Nov 20 2024 Dogtag PKI Team 5.6.0-1 - Rebase to JSS 5.6.0-alpha1 From 0b7b51984cfc72ea2536039d1a185dc4fd79c792 Mon Sep 17 00:00:00 2001 From: jmagne Date: Wed, 9 Jul 2025 15:20:54 -0700 Subject: [PATCH 80/89] Rebase to JSS 5.8.0-beta1. --- .gitignore | 1 + jss.spec | 54 +++++++++++++++++++++++++++++++++++++----------------- sources | 1 + 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 377c2aa..337a5da 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ jss-4.2.6.tar.gz /jss-5.5.0.tar.gz /jss-5.5.1.tar.gz /jss-5.6.0-alpha1.tar.gz +/jss-5.8.0-beta1.tar.gz diff --git a/jss.spec b/jss.spec index 155a73d..e66dbc6 100644 --- a/jss.spec +++ b/jss.spec @@ -7,7 +7,7 @@ Name: jss # Upstream version number: %global major_version 5 -%global minor_version 6 +%global minor_version 8 %global update_version 0 # Downstream release number: @@ -19,7 +19,7 @@ Name: jss # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -%global phase alpha1 +%global phase beta1 %undefine timestamp %undefine commit_id @@ -28,7 +28,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -56,9 +56,26 @@ ExcludeArch: i686 # Java ################################################################################ +# use Java 17 on Fedora 39 or older and RHEL 9 or older +# otherwise, use Java 21 + +# maven-local is a subpackage of javapackages-tools + +%if 0%{?fedora} && 0%{?fedora} <= 39 || 0%{?rhel} && 0%{?rhel} <= 9 + +%define java_devel java-17-openjdk-devel +%define java_headless java-17-openjdk-headless +%define java_home %{_jvmdir}/jre-17-openjdk +%define maven_local maven-local-openjdk17 + +%else + %define java_devel java-21-openjdk-devel %define java_headless java-21-openjdk-headless %define java_home %{_jvmdir}/jre-21-openjdk +%define maven_local maven-local + +%endif ################################################################################ # Build Options @@ -84,11 +101,11 @@ BuildRequires: zip BuildRequires: unzip BuildRequires: gcc-c++ -BuildRequires: nss-devel >= 3.66 -BuildRequires: nss-tools >= 3.66 +BuildRequires: nss-devel >= 3.101 +BuildRequires: nss-tools >= 3.101 BuildRequires: %{java_devel} -BuildRequires: maven-local +BuildRequires: %{maven_local} BuildRequires: mvn(org.apache.commons:commons-lang3) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-jdk14) @@ -104,7 +121,7 @@ This only works with gcj. Other JREs require that JCE providers be signed. Summary: Java Security Services (JSS) -Requires: nss >= 3.66 +Requires: nss >= 3.101 Requires: %{java_headless} Requires: mvn(org.apache.commons:commons-lang3) @@ -132,21 +149,21 @@ This only works with gcj. Other JREs require that JCE providers be signed. Summary: Java Security Services (JSS) Connector for Tomcat # Tomcat -BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 9.0.62 -BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 9.0.62 -BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 9.0.62 +BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.33 +BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.33 +BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.33 Requires: %{product_id} = %{version}-%{release} -Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 9.0.62 -Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 9.0.62 -Requires: mvn(org.apache.tomcat:tomcat-juli) >= 9.0.62 +Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.33 +Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.33 +Requires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.33 # Tomcat JSS has been replaced with JSS Connector for Tomcat. # This will remove installed Tomcat JSS packages. Obsoletes: tomcatjss <= 8.5 Conflicts: tomcatjss <= 8.5 -Obsoletes: dogtag-tomcatjss <= 8.5 -Conflicts: dogtag-tomcatjss <= 8.5 +Obsoletes: %{vendor_id}-tomcatjss <= 8.5 +Conflicts: %{vendor_id}-tomcatjss <= 8.5 %if 0%{?rhel} <= 8 # PKI Servlet Engine has been replaced with Tomcat. @@ -227,11 +244,11 @@ This package provides test suite for JSS. # specify Maven artifact locations %mvn_file org.dogtagpki.jss:jss-tomcat jss/jss-tomcat -%mvn_file org.dogtagpki.jss:jss-tomcat-9.0 jss/jss-tomcat-9.0 +%mvn_file org.dogtagpki.jss:jss-tomcat-10.1 jss/jss-tomcat-10.1 # specify Maven artifact packages %mvn_package org.dogtagpki.jss:jss-tomcat jss-tomcat -%mvn_package org.dogtagpki.jss:jss-tomcat-9.0 jss-tomcat +%mvn_package org.dogtagpki.jss:jss-tomcat-10.1 jss-tomcat ################################################################################ %build @@ -376,6 +393,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Wed Jul 09 2025 Dogtag PKI Team 5.8.0.1 +- Rebase to JSS 5.8.0-beta1 + * Fri Jan 17 2025 Fedora Release Engineering - 5.6.0-0.1.alpha1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 8d8bc4b..45d1760 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (jss-5.6.0-alpha1.tar.gz) = 239952d7b1fc9d005760e9234aec84a84a02becefffa525853e9cccd5cfc88e6e0d9d2ea2eea59f43e3b6d1686878081eae1e615ed68d759b3c5aef7397a5472 +SHA512 (jss-5.8.0-beta1.tar.gz) = 7890b416218260d215ae80082a05a6c59b3671603ed64afd3ed1e20da20577c34674f53622a075073c568003f3f8dcb05b7b447bd1e32d39292e5e613cbfe894 From 8bbbf53ca8f46fe0c837ad9231ade2504a2d4ac0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 18:07:42 +0000 Subject: [PATCH 81/89] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index e66dbc6..4272d4a 100644 --- a/jss.spec +++ b/jss.spec @@ -28,7 +28,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -393,6 +393,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 5.8.0-0.1.beta1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jul 09 2025 Dogtag PKI Team 5.8.0.1 - Rebase to JSS 5.8.0-beta1 From 40255d963a2044724a3285e8787c303e378dfd1f Mon Sep 17 00:00:00 2001 From: jmagne Date: Mon, 28 Jul 2025 17:27:07 -0700 Subject: [PATCH 82/89] Rebase to JSS 5.8.0-beta3 --- .gitignore | 1 + jss.spec | 19 +++++++++++-------- sources | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 337a5da..129463a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ jss-4.2.6.tar.gz /jss-5.5.1.tar.gz /jss-5.6.0-alpha1.tar.gz /jss-5.8.0-beta1.tar.gz +/jss-5.8.0-beta3.tar.gz diff --git a/jss.spec b/jss.spec index 4272d4a..243725a 100644 --- a/jss.spec +++ b/jss.spec @@ -13,13 +13,13 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 0.1 +%global release_number 0.3 # Development phase: # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -%global phase beta1 +%global phase beta3 %undefine timestamp %undefine commit_id @@ -149,14 +149,14 @@ This only works with gcj. Other JREs require that JCE providers be signed. Summary: Java Security Services (JSS) Connector for Tomcat # Tomcat -BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.33 -BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.33 -BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.33 +BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.43 +BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.43 +BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.43 Requires: %{product_id} = %{version}-%{release} -Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.33 -Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.33 -Requires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.33 +Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.43 +Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.43 +Requires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.43 # Tomcat JSS has been replaced with JSS Connector for Tomcat. # This will remove installed Tomcat JSS packages. @@ -393,6 +393,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Mon Jul 28 2025 Dogtag PKI Team 5.8.0.3 +- Rebase to JSS 5.8.0-beta3 + * Thu Jul 24 2025 Fedora Release Engineering - 5.8.0-0.1.beta1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 45d1760..94e6cfe 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (jss-5.6.0-alpha1.tar.gz) = 239952d7b1fc9d005760e9234aec84a84a02becefffa525853e9cccd5cfc88e6e0d9d2ea2eea59f43e3b6d1686878081eae1e615ed68d759b3c5aef7397a5472 SHA512 (jss-5.8.0-beta1.tar.gz) = 7890b416218260d215ae80082a05a6c59b3671603ed64afd3ed1e20da20577c34674f53622a075073c568003f3f8dcb05b7b447bd1e32d39292e5e613cbfe894 +SHA512 (jss-5.8.0-beta3.tar.gz) = 6647ff938d69e39d2ad5f9bb00e03f7fee25c37ba6e4d13700266bdc6c82770927e87ebe486b6bc3378c3368b25db70481ad9d63fd1dd6c9a76e7affd8a127e6 From 6b95178e1edf7854ddf71f5fbe476db9c8eafcba Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 30 Jul 2025 00:01:21 +0200 Subject: [PATCH 83/89] Rebuilt for java-25-openjdk as preffered jdk https://fedoraproject.org/wiki/Changes/Java25AndNoMoreSystemJdk Note, that since f43, you should be always explicit on what jdk to use. This commit should do exactly that. --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 243725a..6694a9d 100644 --- a/jss.spec +++ b/jss.spec @@ -28,7 +28,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.2 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -393,6 +393,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Tue Jul 29 2025 jiri vanek - 5.8.0-0.3.beta3.2 +- Rebuilt for java-25-openjdk as preffered jdk + * Mon Jul 28 2025 Dogtag PKI Team 5.8.0.3 - Rebase to JSS 5.8.0-beta3 From 574fd4442eaedad7bbf56137edeb22ede75671d1 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 30 Jul 2025 14:08:08 +0200 Subject: [PATCH 84/89] Rrevert to jdk21 during rebuild for https://fedoraproject.org/wiki/Changes/Java25AndNoMoreSystemJdk your package failed to build. Is preemptively reverted back to versioned jdk21 --- jss.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 6694a9d..033f464 100644 --- a/jss.spec +++ b/jss.spec @@ -28,7 +28,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.2 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.3 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -393,6 +393,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Wed Jul 30 2025 jiri vanek - 5.8.0-0.3.beta3.3 +- Rrevert to jdk21 + * Tue Jul 29 2025 jiri vanek - 5.8.0-0.3.beta3.2 - Rebuilt for java-25-openjdk as preffered jdk From 591b9b8293c8071fe86c09529a53e88c209978a9 Mon Sep 17 00:00:00 2001 From: jmagne Date: Mon, 11 Aug 2025 16:01:16 -0700 Subject: [PATCH 85/89] Rebase to JSS 5.8.0-beta4 --- .gitignore | 1 + jss.spec | 39 ++++++++++++++++++++------------------- sources | 1 + 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 129463a..0bac5df 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ jss-4.2.6.tar.gz /jss-5.6.0-alpha1.tar.gz /jss-5.8.0-beta1.tar.gz /jss-5.8.0-beta3.tar.gz +/jss-5.8.0-beta4.tar.gz diff --git a/jss.spec b/jss.spec index 033f464..d31e1f5 100644 --- a/jss.spec +++ b/jss.spec @@ -13,13 +13,17 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 0.3 +%global release_number 0.4 # Development phase: # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -%global phase beta3 +%global phase beta4 + +%if 0%{?rhel} && 0%{?rhel} >= 10 +%global enable_nss_version_pqc_def_flag -DENABLE_NSS_VERSION_PQC_DEF=ON +%endif %undefine timestamp %undefine commit_id @@ -28,7 +32,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.3 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -61,12 +65,12 @@ ExcludeArch: i686 # maven-local is a subpackage of javapackages-tools -%if 0%{?fedora} && 0%{?fedora} <= 39 || 0%{?rhel} && 0%{?rhel} <= 9 +%if 0%{?fedora} && 0%{?fedora} >= 43 -%define java_devel java-17-openjdk-devel -%define java_headless java-17-openjdk-headless -%define java_home %{_jvmdir}/jre-17-openjdk -%define maven_local maven-local-openjdk17 +%define java_devel java-25-openjdk-devel +%define java_headless java-25-openjdk-headless +%define java_home %{_jvmdir}/jre-25-openjdk +%define maven_local maven-local-openjdk25 %else @@ -149,14 +153,14 @@ This only works with gcj. Other JREs require that JCE providers be signed. Summary: Java Security Services (JSS) Connector for Tomcat # Tomcat -BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.43 -BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.43 -BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.43 +BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.36 +BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.36 +BuildRequires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.36 Requires: %{product_id} = %{version}-%{release} -Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.43 -Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.43 -Requires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.43 +Requires: mvn(org.apache.tomcat:tomcat-catalina) >= 10.1.36 +Requires: mvn(org.apache.tomcat:tomcat-coyote) >= 10.1.36 +Requires: mvn(org.apache.tomcat:tomcat-juli) >= 10.1.36 # Tomcat JSS has been replaced with JSS Connector for Tomcat. # This will remove installed Tomcat JSS packages. @@ -393,11 +397,8 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog -* Wed Jul 30 2025 jiri vanek - 5.8.0-0.3.beta3.3 -- Rrevert to jdk21 - -* Tue Jul 29 2025 jiri vanek - 5.8.0-0.3.beta3.2 -- Rebuilt for java-25-openjdk as preffered jdk +* Mon Aug 11 2025 Dogtag PKI Team 5.8.0.4 +- Rebase to JSS 5.8.0-beta4 * Mon Jul 28 2025 Dogtag PKI Team 5.8.0.3 - Rebase to JSS 5.8.0-beta3 diff --git a/sources b/sources index 94e6cfe..fc75bdf 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ SHA512 (jss-5.6.0-alpha1.tar.gz) = 239952d7b1fc9d005760e9234aec84a84a02becefffa525853e9cccd5cfc88e6e0d9d2ea2eea59f43e3b6d1686878081eae1e615ed68d759b3c5aef7397a5472 SHA512 (jss-5.8.0-beta1.tar.gz) = 7890b416218260d215ae80082a05a6c59b3671603ed64afd3ed1e20da20577c34674f53622a075073c568003f3f8dcb05b7b447bd1e32d39292e5e613cbfe894 SHA512 (jss-5.8.0-beta3.tar.gz) = 6647ff938d69e39d2ad5f9bb00e03f7fee25c37ba6e4d13700266bdc6c82770927e87ebe486b6bc3378c3368b25db70481ad9d63fd1dd6c9a76e7affd8a127e6 +SHA512 (jss-5.8.0-beta4.tar.gz) = cec7515c4496926303c3b1835d301174588298c8ef1c1cb2bc8fd95683833765d88de5b77af44e418fa953643d2a2d38cc2bd8888abadfc1bd1553e2b33c6268 From 309eeda6384576295e7d4248aa91564403d1a0ec Mon Sep 17 00:00:00 2001 From: Super User Date: Wed, 20 Aug 2025 14:36:12 +0000 Subject: [PATCH 86/89] Rebuild for Fedora 43 --- jss.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jss.spec b/jss.spec index d31e1f5..c9947c7 100644 --- a/jss.spec +++ b/jss.spec @@ -13,7 +13,7 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 0.4 +%global release_number 0.5 # Development phase: # - development (unsupported): alpha where n >= 1 @@ -32,7 +32,7 @@ Summary: Java Security Services (JSS) URL: https://github.com/dogtagpki/jss License: (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND Apache-2.0 Version: %{major_version}.%{minor_version}.%{update_version} -Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}.1 +Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist} # To generate the source tarball: # $ git clone https://github.com/dogtagpki/jss.git @@ -397,10 +397,13 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog -* Mon Aug 11 2025 Dogtag PKI Team 5.8.0.4 +* Mon Aug 11 2025 Dogtag PKI Team 5.8.0-0.5.beta4 +- Rebuild for Fedora 43 + +* Mon Aug 11 2025 Dogtag PKI Team 5.8.0-0.4.beta4.1 - Rebase to JSS 5.8.0-beta4 -* Mon Jul 28 2025 Dogtag PKI Team 5.8.0.3 +* Mon Jul 28 2025 Dogtag PKI Team 5.8.0-0.3.beta3.1 - Rebase to JSS 5.8.0-beta3 * Thu Jul 24 2025 Fedora Release Engineering - 5.8.0-0.1.beta1.1 From f0361ba6e7debd8efbd65f9bd8643a4f7f878c64 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 22 Aug 2025 00:05:05 -0400 Subject: [PATCH 87/89] Build with Java 25 for ELN ELN (the future RHEL 11) tracks rawhide and includes the relevant change: https://fedoraproject.org/wiki/Changes/Java25AndNoMoreSystemJdk --- jss.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jss.spec b/jss.spec index c9947c7..ac6fed7 100644 --- a/jss.spec +++ b/jss.spec @@ -13,7 +13,7 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 0.5 +%global release_number 0.6 # Development phase: # - development (unsupported): alpha where n >= 1 @@ -65,7 +65,7 @@ ExcludeArch: i686 # maven-local is a subpackage of javapackages-tools -%if 0%{?fedora} && 0%{?fedora} >= 43 +%if 0%{?fedora} && 0%{?fedora} >= 43 || 0%{?rhel} >= 11 %define java_devel java-25-openjdk-devel %define java_headless java-25-openjdk-headless @@ -397,6 +397,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* Fri Aug 22 2025 Yaakov Selkowitz - 5.8.0-0.6.beta4 +- Build with Java 25 for ELN + * Mon Aug 11 2025 Dogtag PKI Team 5.8.0-0.5.beta4 - Rebuild for Fedora 43 From df09f023d4bd3db32e405738b789f8c9a146a949 Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Tue, 4 Nov 2025 10:39:09 +0100 Subject: [PATCH 88/89] Rebase to 5.8.0 --- .gitignore | 1 + jss-5.4.2-nss-3.97.patch | 40 ---------------------------------------- jss.spec | 9 ++++++--- sources | 5 +---- 4 files changed, 8 insertions(+), 47 deletions(-) delete mode 100644 jss-5.4.2-nss-3.97.patch diff --git a/.gitignore b/.gitignore index 0bac5df..edcc16f 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ jss-4.2.6.tar.gz /jss-5.8.0-beta1.tar.gz /jss-5.8.0-beta3.tar.gz /jss-5.8.0-beta4.tar.gz +/jss-5.8.0.tar.gz diff --git a/jss-5.4.2-nss-3.97.patch b/jss-5.4.2-nss-3.97.patch deleted file mode 100644 index 8b9d64d..0000000 --- a/jss-5.4.2-nss-3.97.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 130d543f3a7c33196bef386b4ee87ccc4ed53d0b Mon Sep 17 00:00:00 2001 -From: "Endi S. Dewata" -Date: Wed, 7 Feb 2024 14:59:31 -0600 -Subject: [PATCH] Update kea_alg_defs to match NSS 3.97 - -The kea_alg_defs array in SSLCipher.c has been updated to match -the one defined in NSS 3.97. The assertion that compares the size -of the array with ssl_kea_size has also been removed. These -changes will allow JSS to work with the newer NSS 3.97 on Fedora -Rawhide as well as the older NSS versions on other platforms. - -Resolves: https://github.com/dogtagpki/jss/issues/991 ---- - native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c b/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c -index 4f2dacb0b..ea739617a 100644 ---- a/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c -+++ b/native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c -@@ -23,7 +23,7 @@ static const CK_MECHANISM_TYPE auth_alg_defs[] = { - }; - PR_STATIC_ASSERT(PR_ARRAY_SIZE(auth_alg_defs) == ssl_auth_size); - --/* Copied from NSS's ssl3con.c. */ -+/* Copied from NSS 3.97's ssl3con.c. */ - static const CK_MECHANISM_TYPE kea_alg_defs[] = { - CKM_INVALID_MECHANISM, /* ssl_kea_null */ - CKM_RSA_PKCS, /* ssl_kea_rsa */ -@@ -33,8 +33,9 @@ static const CK_MECHANISM_TYPE kea_alg_defs[] = { - CKM_ECDH1_DERIVE, /* ssl_kea_ecdh_psk */ - CKM_DH_PKCS_DERIVE, /* ssl_kea_dh_psk */ - CKM_INVALID_MECHANISM, /* ssl_kea_tls13_any */ -+ CKM_INVALID_MECHANISM, /* ssl_kea_ecdh_hybrid */ -+ CKM_INVALID_MECHANISM, /* ssl_kea_ecdh_hybrid_psk */ - }; --PR_STATIC_ASSERT(PR_ARRAY_SIZE(kea_alg_defs) == ssl_kea_size); - - #ifdef HAVE_NSS_CIPHER_SUITE_INFO_KDFHASH - /* Not present in ssl3con.c. */ diff --git a/jss.spec b/jss.spec index ac6fed7..3300948 100644 --- a/jss.spec +++ b/jss.spec @@ -13,13 +13,13 @@ Name: jss # Downstream release number: # - development/stabilization (unsupported): 0. where n >= 1 # - GA/update (supported): where n >= 1 -%global release_number 0.6 +%global release_number 1 # Development phase: # - development (unsupported): alpha where n >= 1 # - stabilization (unsupported): beta where n >= 1 # - GA/update (supported): -%global phase beta4 +#global phase %if 0%{?rhel} && 0%{?rhel} >= 10 %global enable_nss_version_pqc_def_flag -DENABLE_NSS_VERSION_PQC_DEF=ON @@ -314,7 +314,7 @@ touch %{_vpath_builddir}/.targets/finished_generate_javadocs --lib-dir=%{_libdir} \ --sysconf-dir=%{_sysconfdir} \ --share-dir=%{_datadir} \ - --cmake=%{__cmake} \ + --cmake="%{__cmake} %{?enable_nss_version_pqc_def_flag}" \ --java-home=%{java_home} \ --jni-dir=%{_jnidir} \ --version=%{version} \ @@ -397,6 +397,9 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog +* TueNov 04 2025 Dogtag PKI Team 5.8.0-1 +- Rebase to JSS 5.8.0-1 + * Fri Aug 22 2025 Yaakov Selkowitz - 5.8.0-0.6.beta4 - Build with Java 25 for ELN diff --git a/sources b/sources index fc75bdf..f69b2ec 100644 --- a/sources +++ b/sources @@ -1,4 +1 @@ -SHA512 (jss-5.6.0-alpha1.tar.gz) = 239952d7b1fc9d005760e9234aec84a84a02becefffa525853e9cccd5cfc88e6e0d9d2ea2eea59f43e3b6d1686878081eae1e615ed68d759b3c5aef7397a5472 -SHA512 (jss-5.8.0-beta1.tar.gz) = 7890b416218260d215ae80082a05a6c59b3671603ed64afd3ed1e20da20577c34674f53622a075073c568003f3f8dcb05b7b447bd1e32d39292e5e613cbfe894 -SHA512 (jss-5.8.0-beta3.tar.gz) = 6647ff938d69e39d2ad5f9bb00e03f7fee25c37ba6e4d13700266bdc6c82770927e87ebe486b6bc3378c3368b25db70481ad9d63fd1dd6c9a76e7affd8a127e6 -SHA512 (jss-5.8.0-beta4.tar.gz) = cec7515c4496926303c3b1835d301174588298c8ef1c1cb2bc8fd95683833765d88de5b77af44e418fa953643d2a2d38cc2bd8888abadfc1bd1553e2b33c6268 +SHA512 (jss-5.8.0.tar.gz) = 10f5727d78f8b466062396e47c25b7fdac4b70c6862e6857f8aef49b633c43c4485c1d3cd535006ecd090e8dfe787000fb40d8748ed381c4ac4d1d39312e6c3d From 6f9dba75c99de8e629ac4488be635e76280f731c Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Tue, 4 Nov 2025 11:08:07 +0100 Subject: [PATCH 89/89] Fix changelog --- jss.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jss.spec b/jss.spec index 3300948..794ee73 100644 --- a/jss.spec +++ b/jss.spec @@ -397,7 +397,7 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib ################################################################################ %changelog -* TueNov 04 2025 Dogtag PKI Team 5.8.0-1 +* Tue Nov 04 2025 Dogtag PKI Team 5.8.0-1 - Rebase to JSS 5.8.0-1 * Fri Aug 22 2025 Yaakov Selkowitz - 5.8.0-0.6.beta4