Blame SOURCES/nss-3.66-restore-old-pkcs12-default.patch

b31f4f
diff -up ./cmd/pk12util/pk12util.c.orig ./cmd/pk12util/pk12util.c
b31f4f
--- ./cmd/pk12util/pk12util.c.orig	2021-05-28 02:50:43.000000000 -0700
b31f4f
+++ ./cmd/pk12util/pk12util.c	2021-06-15 17:05:37.200262345 -0700
b31f4f
@@ -1031,9 +1031,11 @@ main(int argc, char **argv)
b31f4f
     char *export_file = NULL;
b31f4f
     char *dbprefix = "";
b31f4f
     SECStatus rv;
b31f4f
-    SECOidTag cipher = SEC_OID_AES_256_CBC;
b31f4f
-    SECOidTag hash = SEC_OID_SHA256;
b31f4f
-    SECOidTag certCipher = SEC_OID_AES_128_CBC;
b31f4f
+    SECOidTag cipher = 
b31f4f
+        SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC;
b31f4f
+    SECOidTag hash = SEC_OID_SHA1;
b31f4f
+    SECOidTag certCipher = 
b31f4f
+        SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC;
b31f4f
     int keyLen = 0;
b31f4f
     int certKeyLen = 0;
b31f4f
     secuCommand pk12util;
b31f4f
@@ -1147,6 +1149,9 @@ main(int argc, char **argv)
b31f4f
         }
b31f4f
     }
b31f4f
 
b31f4f
+    if (PK11_IsFIPS()) {
b31f4f
+        certCipher =  SEC_OID_UNKNOWN;
b31f4f
+    }
b31f4f
     if (pk12util.options[opt_CertCipher].activated) {
b31f4f
         char *cipherString = pk12util.options[opt_CertCipher].arg;
b31f4f
 
b31f4f
diff -up ./tests/tools/tools.sh.orig ./tests/tools/tools.sh
b31f4f
--- ./tests/tools/tools.sh.orig	2021-06-15 17:06:27.650564449 -0700
b31f4f
+++ ./tests/tools/tools.sh	2021-06-15 17:07:59.934117192 -0700
b31f4f
@@ -47,9 +47,9 @@
b31f4f
 "PKCS #5 Password Based Encryption with SHA-1 and DES-CBC"
b31f4f
 
b31f4f
   # if we change the defaults in pk12util, update these variables
b31f4f
-  export CERT_ENCRYPTION_DEFAULT="AES-128-CBC"
b31f4f
-  export KEY_ENCRYPTION_DEFAULT="AES-256-CBC"
b31f4f
-  export HASH_DEFAULT="SHA-256"
b31f4f
+  export CERT_ENCRYPTION_DEFAULT=${pkcs12v2pbeWithSha1And40BitRc2Cbc}
b31f4f
+  export KEY_ENCRYPTION_DEFAULT=${pkcs12v2pbeWithSha1AndTripleDESCBC}
b31f4f
+  export HASH_DEFAULT="SHA-1"
b31f4f
 
b31f4f
   export PKCS5v1_PBE_CIPHERS="${pkcs5pbeWithMD2AndDEScbc},\
b31f4f
 ${pkcs5pbeWithMD5AndDEScbc},\