Skip to content

Commit 18d3953

Browse files
committed
Revert "Initial KeysInUse Integration (#3182)"
This reverts commit 7de96f6.
1 parent ebf2793 commit 18d3953

File tree

11 files changed

+30
-211
lines changed

11 files changed

+30
-211
lines changed

SPECS/KeysInUse-OpenSSL/KeysInUse-OpenSSL.signatures.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

SPECS/KeysInUse-OpenSSL/KeysInUse-OpenSSL.spec

Lines changed: 0 additions & 83 deletions
This file was deleted.

SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

SPECS/LICENSES-AND-NOTICES/data/licenses.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,6 @@
19901990
"jx",
19911991
"keda",
19921992
"kernel-signed",
1993-
"KeysInUse-OpenSSL",
19941993
"kpatch",
19951994
"kubernetes-1.18.14",
19961995
"kubernetes-1.18.17",

SPECS/openssl/openssl-1.1.1-load-default-engines.patch renamed to SPECS/openssl/openssl-1.1.1-fips-SymCrypt.patch

Lines changed: 5 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
1-
diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
2-
index b675ed7892..b7abf3d61f 100644
3-
--- a/crypto/engine/eng_all.c
4-
+++ b/crypto/engine/eng_all.c
5-
@@ -10,6 +10,12 @@
6-
#include "internal/cryptlib.h"
7-
#include "eng_local.h"
8-
9-
+ __attribute__((constructor))
10-
+void ENGINE_static_initializer(void)
11-
+{
12-
+ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL);
13-
+}
14-
+
15-
void ENGINE_load_builtin_engines(void)
16-
{
17-
/* Some ENGINEs need this */
181
diff --git a/crypto/init.c b/crypto/init.c
19-
index 1b0d523bea..86e31c193e 100644
2+
index 1b0d523bea..9482633c9b 100644
203
--- a/crypto/init.c
214
+++ b/crypto/init.c
22-
@@ -402,6 +402,128 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_afalg)
5+
@@ -402,6 +402,67 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_afalg)
236
}
247
# endif
258
# endif
@@ -47,7 +30,7 @@ index 1b0d523bea..86e31c193e 100644
4730
+ dynamic = ENGINE_by_id("dynamic");
4831
+ if (!dynamic)
4932
+ goto err;
50-
+
33+
+
5134
+ // Add the engines directory to the list of directories to load from and specify that loading
5235
+ // from the directory list is mandatory (via DIR_LOAD = 2). Otherwise OpenSSL will try to load
5336
+ // the engine from the default ld search path, fail, and skip loading from the engines dir.
@@ -72,7 +55,6 @@ index 1b0d523bea..86e31c193e 100644
7255
+ if (!ENGINE_set_default_string(symcrypt, "ALL"))
7356
+ goto err;
7457
+
75-
+ ret = 1;
7658
+err:
7759
+ ENGINE_free(symcrypt);
7860
+ ENGINE_free(dynamic);
@@ -84,71 +66,11 @@ index 1b0d523bea..86e31c193e 100644
8466
+
8567
+ return ret;
8668
+}
87-
+# endif
88-
+
89-
+#ifndef OPENSSL_NO_KEYSINUSE_ENGINE
90-
+static CRYPTO_ONCE engine_keysinuse = CRYPTO_ONCE_STATIC_INIT;
91-
+DEFINE_RUN_ONCE_STATIC(ossl_init_engine_keysinuse)
92-
+{
93-
+ int ret = 0;
94-
+
95-
+ ENGINE *dynamic = NULL;
96-
+ ENGINE *keysinuse = NULL;
97-
+
98-
+ dynamic = ENGINE_by_id("dynamic");
99-
+ if (!dynamic)
100-
+ goto err;
101-
+
102-
+ // Get the default engine directory from the environment - may be NULL
103-
+ char *load_dir = ossl_safe_getenv("OPENSSL_ENGINES");
104-
+
105-
+ # ifdef ENGINESDIR
106-
+ // Use the default engines directory, if defined
107-
+ if (load_dir == NULL)
108-
+ {
109-
+ load_dir = ENGINESDIR;
110-
+ }
111-
+ # endif
112-
+
113-
+ if (!ENGINE_ctrl_cmd_string(dynamic, "DIR_ADD", load_dir, 0))
114-
+ goto err;
115-
+ if (!ENGINE_ctrl_cmd_string(dynamic, "DIR_LOAD", "2", 0))
116-
+ goto err;
117-
+ if (!ENGINE_ctrl_cmd_string(dynamic, "SO_PATH", "keysinuse.so", 0))
118-
+ goto err;
119-
+ if (!ENGINE_ctrl_cmd_string(dynamic, "ID", "keysinuse", 0))
120-
+ goto err;
121-
+ if (!ENGINE_ctrl_cmd_string(dynamic, "LIST_ADD", "2", 0))
122-
+ goto err;
123-
+ if (!ENGINE_ctrl_cmd_string(dynamic, "LOAD", NULL, 0))
124-
+ goto err;
125-
+
126-
+ // Pass config values to keysinuse engine
127-
+ keysinuse = ENGINE_by_id("keysinuse");
128-
+ if (!keysinuse)
129-
+ goto err;
130-
+
131-
+ // Make KeysInUse the default engine for RSA and EC algorithms
132-
+ if (!ENGINE_set_default_string(keysinuse, "RSA,EC"))
133-
+ goto err;
134-
+
135-
+ ret = 1;
136-
+err:
137-
+ ENGINE_free(keysinuse);
138-
+ ENGINE_free(dynamic);
139-
+
140-
+# ifdef OPENSSL_INIT_DEBUG
141-
+ fprintf(stderr, "OPENSSL_INIT: ossl_init_engine_keysinuse: %d \n",
142-
+ ret);
143-
+# endif
144-
+
145-
+ return ret;
146-
+}
14769
+# endif
14870
#endif
14971

15072
#ifndef OPENSSL_NO_COMP
151-
@@ -723,9 +845,14 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
73+
@@ -723,9 +784,13 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
15274
&& !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
15375
return 0;
15476
# endif
@@ -159,9 +81,8 @@ index 1b0d523bea..86e31c193e 100644
15981
+ {
16082
+ if (!RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
16183
+ return 0;
162-
+
84+
+
16385
+ RUN_ONCE(&engine_symcrypt, ossl_init_engine_symcrypt);
164-
+ RUN_ONCE(&engine_keysinuse, ossl_init_engine_keysinuse);
16586
+ }
16687
# ifndef OPENSSL_NO_STATIC_ENGINE
16788
# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)

SPECS/openssl/openssl.spec

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Summary: Utilities from the general purpose cryptography library with TLS implementation
55
Name: openssl
66
Version: 1.1.1k
7-
Release: 18%{?dist}
7+
Release: 17%{?dist}
88
License: OpenSSL
99
Vendor: Microsoft Corporation
1010
Distribution: Mariner
@@ -42,7 +42,7 @@ Patch18: openssl-1.1.1-fips-curves.patch
4242
Patch19: openssl-1.1.1-sp80056arev3.patch
4343
Patch20: openssl-1.1.1-jitterentropy.patch
4444
Patch21: openssl-1.1.1-drbg-seed.patch
45-
Patch22: openssl-1.1.1-load-default-engines.patch
45+
Patch22: openssl-1.1.1-fips-SymCrypt.patch
4646
Patch23: CVE-2021-3711.patch
4747
Patch24: CVE-2021-3712.patch
4848
Patch25: CVE-2022-0778.patch
@@ -339,9 +339,6 @@ rm -f %{buildroot}%{_sysconfdir}/pki/tls/ct_log_list.cnf.dist
339339
%postun libs -p /sbin/ldconfig
340340

341341
%changelog
342-
* Tue Jul 05 2022 Maxwell Moyer-McKee <[email protected]> - 1.1.1k-18
343-
- Add optional patch to use KeysInUse as default engine
344-
345342
* Wed Jun 22 2022 Henry Beberman <[email protected]> - 1.1.1k-17
346343
- Add patch for CVE-2022-2068
347344

cgmanifest.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7326,16 +7326,6 @@
73267326
}
73277327
}
73287328
},
7329-
{
7330-
"component": {
7331-
"type": "other",
7332-
"other": {
7333-
"name": "KeysInUse-OpenSSL",
7334-
"version": "0.3.1",
7335-
"downloadUrl": "https://github.com/microsoft/KeysInUse-OpenSSL/archive/v0.3.1.tar.gz"
7336-
}
7337-
}
7338-
},
73397329
{
73407330
"component": {
73417331
"type": "other",

toolkit/resources/manifests/package/pkggen_core_aarch64.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ texinfo-6.8-1.cm2.aarch64.rpm
165165
gtk-doc-1.33.2-1.cm2.noarch.rpm
166166
autoconf-2.71-3.cm2.noarch.rpm
167167
automake-1.16.5-1.cm2.noarch.rpm
168-
openssl-1.1.1k-18.cm2.aarch64.rpm
169-
openssl-devel-1.1.1k-18.cm2.aarch64.rpm
170-
openssl-libs-1.1.1k-18.cm2.aarch64.rpm
171-
openssl-perl-1.1.1k-18.cm2.aarch64.rpm
172-
openssl-static-1.1.1k-18.cm2.aarch64.rpm
168+
openssl-1.1.1k-17.cm2.aarch64.rpm
169+
openssl-devel-1.1.1k-17.cm2.aarch64.rpm
170+
openssl-libs-1.1.1k-17.cm2.aarch64.rpm
171+
openssl-perl-1.1.1k-17.cm2.aarch64.rpm
172+
openssl-static-1.1.1k-17.cm2.aarch64.rpm
173173
libcap-2.60-1.cm2.aarch64.rpm
174174
libcap-devel-2.60-1.cm2.aarch64.rpm
175175
debugedit-5.0-1.cm2.aarch64.rpm

toolkit/resources/manifests/package/pkggen_core_x86_64.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ texinfo-6.8-1.cm2.x86_64.rpm
165165
gtk-doc-1.33.2-1.cm2.noarch.rpm
166166
autoconf-2.71-3.cm2.noarch.rpm
167167
automake-1.16.5-1.cm2.noarch.rpm
168-
openssl-1.1.1k-18.cm2.x86_64.rpm
169-
openssl-devel-1.1.1k-18.cm2.x86_64.rpm
170-
openssl-libs-1.1.1k-18.cm2.x86_64.rpm
171-
openssl-perl-1.1.1k-18.cm2.x86_64.rpm
172-
openssl-static-1.1.1k-18.cm2.x86_64.rpm
168+
openssl-1.1.1k-17.cm2.x86_64.rpm
169+
openssl-devel-1.1.1k-17.cm2.x86_64.rpm
170+
openssl-libs-1.1.1k-17.cm2.x86_64.rpm
171+
openssl-perl-1.1.1k-17.cm2.x86_64.rpm
172+
openssl-static-1.1.1k-17.cm2.x86_64.rpm
173173
libcap-2.60-1.cm2.x86_64.rpm
174174
libcap-devel-2.60-1.cm2.x86_64.rpm
175175
debugedit-5.0-1.cm2.x86_64.rpm

toolkit/resources/manifests/package/toolchain_aarch64.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ npth-1.6-4.cm2.aarch64.rpm
259259
npth-debuginfo-1.6-4.cm2.aarch64.rpm
260260
npth-devel-1.6-4.cm2.aarch64.rpm
261261
ntsysv-1.20-3.cm2.aarch64.rpm
262-
openssl-1.1.1k-18.cm2.aarch64.rpm
263-
openssl-debuginfo-1.1.1k-18.cm2.aarch64.rpm
264-
openssl-devel-1.1.1k-18.cm2.aarch64.rpm
265-
openssl-libs-1.1.1k-18.cm2.aarch64.rpm
266-
openssl-perl-1.1.1k-18.cm2.aarch64.rpm
267-
openssl-static-1.1.1k-18.cm2.aarch64.rpm
262+
openssl-1.1.1k-17.cm2.aarch64.rpm
263+
openssl-debuginfo-1.1.1k-17.cm2.aarch64.rpm
264+
openssl-devel-1.1.1k-17.cm2.aarch64.rpm
265+
openssl-libs-1.1.1k-17.cm2.aarch64.rpm
266+
openssl-perl-1.1.1k-17.cm2.aarch64.rpm
267+
openssl-static-1.1.1k-17.cm2.aarch64.rpm
268268
p11-kit-0.24.1-1.cm2.aarch64.rpm
269269
p11-kit-debuginfo-0.24.1-1.cm2.aarch64.rpm
270270
p11-kit-devel-0.24.1-1.cm2.aarch64.rpm

0 commit comments

Comments
 (0)