source: chapter08/openssl.xml@ 6be4bf1

xry111/loongarch xry111/loongarch-12.1
Last change on this file since 6be4bf1 was 6be4bf1, checked in by Xi Ruoyao <xry111@…>, 5 months ago

loongarch: openssl: Apply upstream fixes for runtime issues on LoongArch

  • Property mode set to 100644
File size: 7.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-openssl" role="wrap">
9 <?dbhtml filename="openssl.html"?>
10
11 <sect1info condition="script">
12 <productname>openssl</productname>
13 <productnumber>&openssl-version;</productnumber>
14 <address>&openssl-url;</address>
15 </sect1info>
16
17 <title>OpenSSL-&openssl-version;</title>
18
19 <indexterm zone="ch-system-openssl">
20 <primary sortas="a-OpenSSL">OpenSSL</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The OpenSSL package contains management tools and libraries relating
27 to cryptography. These are useful for providing cryptographic functions
28 to other packages, such as OpenSSH, email applications, and web browsers
29 (for accessing HTTPS sites). </para>
30
31 <segmentedlist>
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
34
35 <seglistitem>
36 <seg>&openssl-fin-sbu;</seg>
37 <seg>&openssl-fin-du;</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of OpenSSL</title>
45<!--
46 <para>First fix a problem with some advanced architectures with avx512
47 capability:</para>
48
49 <screen><userinput remap="pre">sed -e '/bn_reduce.*m1/i\ factor_size /= sizeof(BN_ULONG) * 8;' \
50 -i crypto/bn/rsaz_exp_x2.c</userinput></screen>
51-->
52
53 <para>First apply a patch to fix various runtime issues on
54 LoongArch:</para>
55
56<screen><userinput remap="pre">patch -Np1 -i ../&openssl-loongarch-patch;</userinput></screen>
57
58 <para>Prepare OpenSSL for compilation:</para>
59
60<screen><userinput remap="configure">./config --prefix=/usr \
61 --openssldir=/etc/ssl \
62 --libdir=lib \
63 linux64-loongarch64 \
64 shared \
65 zlib-dynamic</userinput></screen>
66
67 <para>Compile the package:</para>
68
69<screen><userinput remap="make">make</userinput></screen>
70
71 <para>To test the results, issue:</para>
72
73<screen><userinput remap="test">HARNESS_JOBS=<replaceable>$(nproc)</replaceable> make test</userinput></screen>
74
75 <para>One test, 30-test_afalg.t, is known to fail if the host kernel
76 does not have <option>CONFIG_CRYPTO_USER_API_SKCIPHER</option> enabled,
77 or does not have any options providing an AES with CBC implementation
78 (for example, the combination of <option>CONFIG_CRYPTO_AES</option>
79 and <option>CONFIG_CRYPTO_CBC</option>, or
80 <option>CONFIG_CRYPTO_AES_NI_INTEL</option> if the CPU supports AES-NI)
81 enabled. If it fails, it can safely be ignored.</para>
82
83 <para>Install the package:</para>
84
85<screen><userinput remap="install">sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
86make MANSUFFIX=ssl install</userinput></screen>
87
88 <para>Add the version to the documentation directory name, to be
89 consistent with other packages:</para>
90
91<screen><userinput remap="install">mv -v /usr/share/doc/openssl /usr/share/doc/openssl-&openssl-version;</userinput></screen>
92
93 <para>If desired, install some additional documentation:</para>
94
95<screen><userinput remap="install">cp -vfr doc/* /usr/share/doc/openssl-&openssl-version;</userinput></screen>
96
97 <note>
98 <para>
99 You should update OpenSSL when a new version which fixes vulnerabilities
100 is announced. Since OpenSSL 3.0.0, the OpenSSL versioning scheme
101 follows the MAJOR.MINOR.PATCH format. API/ABI compatibility
102 is guaranteed for the same MAJOR version number. Because LFS
103 installs only the shared libraries, there is no need to recompile
104 packages which link to
105 <filename class="libraryfile">libcrypto.so</filename> or
106 <filename class="libraryfile">libssl.so</filename>
107 <emphasis>when upgrading to a version with the same MAJOR version
108 number</emphasis>.
109 </para>
110
111 <para>
112 However, any running programs linked to those libraries need to be stopped
113 and restarted. Read the related entries in
114 <xref linkend='pkgmgmt-upgrade-issues'/> for details.
115 </para>
116
117 </note>
118
119 </sect2>
120
121 <sect2 id="contents-openssl" role="content">
122 <title>Contents of OpenSSL</title>
123
124 <segmentedlist>
125 <segtitle>Installed programs</segtitle>
126 <segtitle>Installed libraries</segtitle>
127 <segtitle>Installed directories</segtitle>
128
129 <seglistitem>
130 <seg>
131 c_rehash and openssl
132 </seg>
133 <seg>
134 libcrypto.so and libssl.so
135 </seg>
136 <seg>
137 /etc/ssl,
138 /usr/include/openssl,
139 /usr/lib/engines and
140 /usr/share/doc/openssl-&openssl-version;
141 </seg>
142 </seglistitem>
143 </segmentedlist>
144
145 <variablelist>
146 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
147 <?dbfo list-presentation="list"?>
148 <?dbhtml list-presentation="table"?>
149
150 <varlistentry id="c_rehash">
151 <term><command>c_rehash</command></term>
152 <listitem>
153 <para>
154 is a <application>Perl</application> script that
155 scans all files in a directory and adds symbolic links to their
156 hash values. Use of <command>c_rehash</command> is considered
157 obsolete and should be replaced by
158 <command>openssl rehash</command> command
159 </para>
160 <indexterm zone="ch-system-openssl c_rehash">
161 <primary sortas="b-c_rehash">c_rehash</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry id="openssl-prog">
167 <term><command>openssl</command></term>
168 <listitem>
169 <para>
170 is a command-line tool for using the various cryptography functions
171 of <application>OpenSSL</application>'s crypto library from the
172 shell. It can be used for various functions which are documented in
173 <filename>openssl(1)</filename>
174 </para>
175 <indexterm zone="ch-system-openssl openssl-prog">
176 <primary sortas="b-openssl">openssl</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="libcrypto">
182 <term><filename class="libraryfile">libcrypto.so</filename></term>
183 <listitem>
184 <para>
185 implements a wide range of cryptographic algorithms used in various
186 Internet standards. The services provided by this library are used
187 by the <application>OpenSSL</application> implementations of SSL,
188 TLS and S/MIME, and they have also been used to implement
189 <application>OpenSSH</application>,
190 <application>OpenPGP</application>, and other cryptographic
191 standards
192 </para>
193 <indexterm zone="ch-system-openssl libcrypto">
194 <primary sortas="c-libcrypto">libcrypto.so</primary>
195 </indexterm>
196 </listitem>
197 </varlistentry>
198
199 <varlistentry id="libssl">
200 <term><filename class="libraryfile">libssl.so</filename></term>
201 <listitem>
202 <para>
203 implements the Transport Layer Security (TLS v1) protocol.
204 It provides a rich API, documentation
205 on which can be found in <filename>ssl(7)</filename>
206 </para>
207 <indexterm zone="ch-system-openssl libssl">
208 <primary sortas="c-libssl">libssl.so</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 </variablelist>
214
215 </sect2>
216
217</sect1>
Note: See TracBrowser for help on using the repository browser.