|
| 1 | +--- a/SPECS/openssl.spec 2024-02-20 10:19:41 |
| 2 | ++++ b/SPECS/openssl.spec 2024-02-23 11:38:58 |
| 3 | +@@ -87,6 +87,10 @@ |
| 4 | + Patch84: openssl-1.1.1-cve-2022-1292.patch |
| 5 | + Patch85: openssl-1.1.1-cve-2022-2068.patch |
| 6 | + Patch86: openssl-1.1.1-cve-2022-2097.patch |
| 7 | ++Patch100: openssl-1.1.1-force-fips-on-init.patch |
| 8 | ++Patch101: openssl-1.1.1-openssl-cnf-fips-mode.patch |
| 9 | ++Patch102: openssl-1.1.1-remove-env-check.patch |
| 10 | ++Patch103: openssl-1.1.1l-sm2-plaintext.patch |
| 11 | + |
| 12 | + License: OpenSSL and ASL 2.0 |
| 13 | + URL: http://www.openssl.org/ |
| 14 | +@@ -212,6 +216,10 @@ |
| 15 | + %patch84 -p1 -b .cve-2022-1292 |
| 16 | + %patch85 -p1 -b .cve-2022-2068 |
| 17 | + %patch86 -p1 -b .cve-2022-2097 |
| 18 | ++%patch100 -p1 -b .force-fips-on-init |
| 19 | ++%patch101 -p1 -b .openssl-cnf-fips-mode |
| 20 | ++%patch102 -p1 -b .remove-env-check |
| 21 | ++%patch103 -p1 -b .sm2-plaintext |
| 22 | + |
| 23 | + %build |
| 24 | + # Figure out which flags we want to use. |
| 25 | +@@ -220,7 +228,7 @@ |
| 26 | + %ifarch %ix86 |
| 27 | + sslarch=linux-elf |
| 28 | + if ! echo %{_target} | grep -q i686 ; then |
| 29 | +- sslflags="no-asm 386" |
| 30 | ++ sslflags="no-asm 386" |
| 31 | + fi |
| 32 | + %endif |
| 33 | + %ifarch x86_64 |
| 34 | +@@ -286,13 +294,13 @@ |
| 35 | + # usable on all platforms. The Configure script already knows to use -fPIC and |
| 36 | + # RPM_OPT_FLAGS, so we can skip specifiying them here. |
| 37 | + ./Configure \ |
| 38 | +- --prefix=%{_prefix} --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \ |
| 39 | +- --system-ciphers-file=%{_sysconfdir}/crypto-policies/back-ends/openssl.config \ |
| 40 | +- zlib enable-camellia enable-seed enable-rfc3779 enable-sctp \ |
| 41 | +- enable-cms enable-md2 enable-rc5\ |
| 42 | +- enable-weak-ssl-ciphers \ |
| 43 | +- no-mdc2 no-ec2m no-sm2 no-sm4 \ |
| 44 | +- shared ${sslarch} $RPM_OPT_FLAGS '-DDEVRANDOM="\"/dev/urandom\""' |
| 45 | ++ --prefix=%{_prefix} --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \ |
| 46 | ++ --system-ciphers-file=%{_sysconfdir}/crypto-policies/back-ends/openssl.config \ |
| 47 | ++ zlib enable-camellia enable-seed enable-rfc3779 enable-sctp \ |
| 48 | ++ enable-cms enable-md2 enable-rc5\ |
| 49 | ++ enable-weak-ssl-ciphers \ |
| 50 | ++ no-mdc2 no-ec2m no-sm2 no-sm4 \ |
| 51 | ++ shared ${sslarch} $RPM_OPT_FLAGS '-DDEVRANDOM="\"/dev/urandom\""' |
| 52 | + |
| 53 | + # Do not run this in a production package the FIPS symbols must be patched-in |
| 54 | + #util/mkdef.pl crypto update |
| 55 | +@@ -352,9 +360,9 @@ |
| 56 | + make DESTDIR=$RPM_BUILD_ROOT install |
| 57 | + rename so.%{soversion} so.%{version} $RPM_BUILD_ROOT%{_libdir}/*.so.%{soversion} |
| 58 | + for lib in $RPM_BUILD_ROOT%{_libdir}/*.so.%{version} ; do |
| 59 | +- chmod 755 ${lib} |
| 60 | +- ln -s -f `basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}` |
| 61 | +- ln -s -f `basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}`.%{soversion} |
| 62 | ++ chmod 755 ${lib} |
| 63 | ++ ln -s -f `basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}` |
| 64 | ++ ln -s -f `basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}`.%{soversion} |
| 65 | + done |
| 66 | + |
| 67 | + # Install a makefile for generating keys and self-signed certs, and a script |
| 68 | +@@ -375,21 +383,21 @@ |
| 69 | + pushd $RPM_BUILD_ROOT%{_mandir} |
| 70 | + ln -s -f config.5 man5/openssl.cnf.5 |
| 71 | + for manpage in man*/* ; do |
| 72 | +- if [ -L ${manpage} ]; then |
| 73 | +- TARGET=`ls -l ${manpage} | awk '{ print $NF }'` |
| 74 | +- ln -snf ${TARGET}ssl ${manpage}ssl |
| 75 | +- rm -f ${manpage} |
| 76 | +- else |
| 77 | +- mv ${manpage} ${manpage}ssl |
| 78 | +- fi |
| 79 | ++ if [ -L ${manpage} ]; then |
| 80 | ++ TARGET=`ls -l ${manpage} | awk '{ print $NF }'` |
| 81 | ++ ln -snf ${TARGET}ssl ${manpage}ssl |
| 82 | ++ rm -f ${manpage} |
| 83 | ++ else |
| 84 | ++ mv ${manpage} ${manpage}ssl |
| 85 | ++ fi |
| 86 | + done |
| 87 | + for conflict in passwd rand ; do |
| 88 | +- rename ${conflict} ssl${conflict} man*/${conflict}* |
| 89 | ++ rename ${conflict} ssl${conflict} man*/${conflict}* |
| 90 | + # Fix dangling symlinks |
| 91 | +- manpage=man1/openssl-${conflict}.* |
| 92 | +- if [ -L ${manpage} ] ; then |
| 93 | +- ln -snf ssl${conflict}.1ssl ${manpage} |
| 94 | +- fi |
| 95 | ++ manpage=man1/openssl-${conflict}.* |
| 96 | ++ if [ -L ${manpage} ] ; then |
| 97 | ++ ln -snf ssl${conflict}.1ssl ${manpage} |
| 98 | ++ fi |
| 99 | + done |
| 100 | + popd |
| 101 | + |
| 102 | +@@ -424,11 +432,11 @@ |
| 103 | + # can have both a 32- and 64-bit version of the library, and they each need |
| 104 | + # their own correct-but-different versions of opensslconf.h to be usable. |
| 105 | + install -m644 %{SOURCE10} \ |
| 106 | +- $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf-${basearch}.h |
| 107 | ++ $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf-${basearch}.h |
| 108 | + cat $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf.h >> \ |
| 109 | +- $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf-${basearch}.h |
| 110 | ++ $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf-${basearch}.h |
| 111 | + install -m644 %{SOURCE9} \ |
| 112 | +- $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf.h |
| 113 | ++ $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf.h |
| 114 | + %endif |
| 115 | + LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
| 116 | + export LD_LIBRARY_PATH |
0 commit comments