test libressl, step 1

This commit is contained in:
Mikhail Novosyolov 2019-12-01 02:03:15 +03:00
parent c9df52aa4c
commit cd6077c83d

View file

@ -11,7 +11,7 @@
%define sublevel 11 %define sublevel 11
# Release number. Increase this before a rebuild. # Release number. Increase this before a rebuild.
%define rpmrel 5 %define rpmrel 6
%define fullrpmrel %{rpmrel} %define fullrpmrel %{rpmrel}
%define rpmtag %{disttag} %define rpmtag %{disttag}
@ -252,8 +252,11 @@ BuildRequires: pkgconfig(libcrypto)
%endif %endif
%if %{enhanced_security} %if %{enhanced_security}
# To generate keys # (To generate keys)
BuildRequires: openssl # LibreSSL has GOST support without making additional configuration that
# OpenSSL requires and which is not possible to be done inside a spec file
# because editing /etc/pki/tls/openssl.cnf is not possible.
BuildRequires: libressl
# To verify signatures (find, xargs, hexdump) # To verify signatures (find, xargs, hexdump)
BuildRequires: findutils util-linux BuildRequires: findutils util-linux
%endif %endif
@ -795,7 +798,7 @@ echo CONFIG_MODULE_SIG_FORCE=n >> .config
echo CONFIG_MODULE_SIG_ALL=y >> .config echo CONFIG_MODULE_SIG_ALL=y >> .config
# Use SHA-512 algo # Use SHA-512 algo
echo CONFIG_MODULE_SIG_SHA512=y >> .config echo CONFIG_MODULE_SIG_SHA512=y >> .config
# Set path to the key that will be generated later by openssl # Set path to the key that will be generated later by openssl/libressl
echo CONFIG_MODULE_SIG_KEY=\"%{certs_signing_key_rnd}\" >> .config echo CONFIG_MODULE_SIG_KEY=\"%{certs_signing_key_rnd}\" >> .config
# Set path to one PEM file with all keys that the kernel must trust # Set path to one PEM file with all keys that the kernel must trust
sed -i '/CONFIG_SYSTEM_TRUSTED_KEYS/d' .config sed -i '/CONFIG_SYSTEM_TRUSTED_KEYS/d' .config
@ -923,7 +926,7 @@ authorityKeyIdentifier=keyid
EOF EOF
cat "%{certs_key_config_rnd}" cat "%{certs_key_config_rnd}"
openssl req -new -nodes -utf8 -batch -x509 \ libressl req -new -nodes -utf8 -batch -x509 \
-days 109500 \ -days 109500 \
-config "%{certs_key_config_rnd}" \ -config "%{certs_key_config_rnd}" \
-outform PEM \ -outform PEM \