[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[5a5bbbf] | 7 | <!ENTITY openssl-download-http "http://www.openssl.org/source/openssl-&openssl-version;.tar.gz">
|
---|
[0c4916c] | 8 | <!ENTITY openssl-download-ftp "ftp://ftp.openssl.org/source/openssl-&openssl-version;.tar.gz">
|
---|
[a1813d08] | 9 | <!ENTITY openssl-md5sum "104deb3b7e6820cae6de3f49ba0ff2b0">
|
---|
| 10 | <!ENTITY openssl-size "3.9 MB">
|
---|
[462878e4] | 11 | <!ENTITY ca-bundle-download "http://anduin.linuxfromscratch.org/files/BLFS/BLFS-ca-bundle-&ca-bundle-version;.tar.bz2">
|
---|
[a1813d08] | 12 | <!ENTITY ca-bundle-size "196 KB">
|
---|
| 13 | <!ENTITY ca-bundle-md5sum "da705ed29e5abcb42d498bcc86d1e62e">
|
---|
| 14 | <!ENTITY openssl-buildsize "54 MB">
|
---|
| 15 | <!ENTITY openssl-time "1.2 SBU (additional 0.4 SBU to run the test suite)">
|
---|
[52d29f7] | 16 | ]>
|
---|
| 17 |
|
---|
[cef3a2f] | 18 | <sect1 id="openssl" xreflabel="OpenSSL-&openssl-version;">
|
---|
[5a5bbbf] | 19 | <?dbhtml filename="openssl.html"?>
|
---|
| 20 |
|
---|
| 21 | <sect1info>
|
---|
| 22 | <othername>$LastChangedBy$</othername>
|
---|
| 23 | <date>$Date$</date>
|
---|
| 24 | </sect1info>
|
---|
| 25 |
|
---|
| 26 | <title>OpenSSL-&openssl-version;</title>
|
---|
| 27 |
|
---|
| 28 | <indexterm zone="openssl">
|
---|
| 29 | <primary sortas="a-OpenSSL">OpenSSL</primary>
|
---|
| 30 | </indexterm>
|
---|
| 31 |
|
---|
| 32 | <sect2 role="package">
|
---|
| 33 | <title>Introduction to OpenSSL</title>
|
---|
| 34 |
|
---|
| 35 | <para>The <application>OpenSSL</application> package contains management
|
---|
| 36 | tools and libraries relating to cryptography. These are useful for
|
---|
| 37 | providing cryptography functions to other packages, notably
|
---|
| 38 | <application>OpenSSH</application>, email applications and web browsers
|
---|
| 39 | (for accessing HTTPS sites).</para>
|
---|
| 40 |
|
---|
[aafcfb8] | 41 | &lfs65_checked;
|
---|
| 42 |
|
---|
[5a5bbbf] | 43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 44 | <itemizedlist spacing="compact">
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download (HTTP): <ulink url="&openssl-download-http;"/></para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download (FTP): <ulink url="&openssl-download-ftp;"/></para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download MD5 sum: &openssl-md5sum;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download size: &openssl-size;</para>
|
---|
| 56 | </listitem>
|
---|
[462878e4] | 57 | <listitem>
|
---|
| 58 | <para>CA Bundle Download: <ulink url="&ca-bundle-download;"/></para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>CA Bundle size: &ca-bundle-size;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>CA Bundle MD5 sum: &ca-bundle-md5sum;</para>
|
---|
| 65 | </listitem>
|
---|
[5a5bbbf] | 66 | <listitem>
|
---|
| 67 | <para>Estimated disk space required: &openssl-buildsize;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>Estimated build time: &openssl-time;</para>
|
---|
| 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 73 |
|
---|
| 74 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 75 | <itemizedlist spacing='compact'>
|
---|
| 76 | <listitem>
|
---|
[a1813d08] | 77 | <para>Required patches: <ulink
|
---|
| 78 | url="&patch-root;/openssl-&openssl-version;-fix_manpages-1.patch"/> and
|
---|
| 79 | <ulink url="&patch-root;/openssl-&openssl-version;-fix_testsuite-1.patch"/></para>
|
---|
[5a5bbbf] | 80 | </listitem>
|
---|
| 81 | </itemizedlist>
|
---|
| 82 |
|
---|
| 83 | <bridgehead renderas="sect3">OpenSSL Dependencies</bridgehead>
|
---|
| 84 |
|
---|
| 85 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[a181baeb] | 86 | <para role="optional"><xref linkend="mitkrb"/> or
|
---|
[a1813d08] | 87 | <xref linkend="heimdal"/>, and <xref linkend="bc"/> (required for full
|
---|
| 88 | coverage by the test suite during the build)</para>
|
---|
[5a5bbbf] | 89 |
|
---|
[ad16af6] | 90 | <para condition="html" role="usernotes">User Notes:
|
---|
[1663c2b5] | 91 | <ulink url='&blfs-wiki;/OpenSSL'/></para>
|
---|
[6473e74] | 92 |
|
---|
[5a5bbbf] | 93 | </sect2>
|
---|
| 94 |
|
---|
| 95 | <sect2 role="installation">
|
---|
| 96 | <title>Installation of OpenSSL</title>
|
---|
| 97 |
|
---|
| 98 | <para>Install <application>OpenSSL</application> by running
|
---|
| 99 | the following commands:</para>
|
---|
| 100 |
|
---|
| 101 | <screen><userinput>patch -Np1 -i ../openssl-&openssl-version;-fix_manpages-1.patch &&
|
---|
[a1813d08] | 102 | patch -Np1 -i ../openssl-&openssl-version;-fix_testsuite-1.patch &&
|
---|
[462878e4] | 103 | tar -vxf ../BLFS-ca-bundle-&ca-bundle-version;.tar.bz2 &&
|
---|
[ae7796d] | 104 |
|
---|
[a181baeb] | 105 | ./config --prefix=/usr \
|
---|
| 106 | --openssldir=/etc/ssl \
|
---|
| 107 | shared \
|
---|
| 108 | zlib-dynamic &&
|
---|
| 109 | make</userinput></screen>
|
---|
| 110 |
|
---|
| 111 | <para>To test the results, issue: <command>make test</command>.</para>
|
---|
[5a5bbbf] | 112 |
|
---|
[a181baeb] | 113 | <!-- <para>To test the results, issue: <command>make test</command>. Note that the
|
---|
[4b4f93ac] | 114 | test results/output depend on the availability of /etc/ssl/openssl.cnf. If
|
---|
[a41f643] | 115 | running the tests for the first time run the following as the
|
---|
[4b4f93ac] | 116 | <systemitem class="username">root</systemitem> user before running the
|
---|
| 117 | tests:</para>
|
---|
| 118 |
|
---|
[a181baeb] | 119 | <screen role="root"><userinput>install -v -m755 d /etc/ssl &&
|
---|
| 120 | install -v ./apps/openssl.cnf /etc/ssl/</userinput></screen> -->
|
---|
[5a5bbbf] | 121 |
|
---|
| 122 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 123 |
|
---|
[a181baeb] | 124 | <screen role="root"><userinput>make MANDIR=/usr/share/man install &&
|
---|
| 125 | cp -v -r certs /etc/ssl &&
|
---|
[635cb25] | 126 | install -v -d -m755 /usr/share/doc/openssl-&openssl-version; &&
|
---|
[1d89a17] | 127 | cp -v -r doc/{HOWTO,README,*.{txt,html,gif}} \
|
---|
| 128 | /usr/share/doc/openssl-&openssl-version;</userinput></screen>
|
---|
[5a5bbbf] | 129 |
|
---|
[462878e4] | 130 | <para>While still the <systemitem class="username">root</systemitem> user,
|
---|
| 131 | create a single file that contains all of the installed certificates:</para>
|
---|
| 132 |
|
---|
| 133 | <screen role="root"><userinput>for pem in /etc/ssl/certs/*.pem
|
---|
| 134 | do
|
---|
| 135 | cat $pem
|
---|
| 136 | echo ""
|
---|
| 137 | done > /etc/ssl/ca-bundle.crt</userinput></screen>
|
---|
| 138 |
|
---|
[5a5bbbf] | 139 | </sect2>
|
---|
| 140 |
|
---|
| 141 | <sect2 role="commands">
|
---|
| 142 | <title>Command Explanations</title>
|
---|
| 143 |
|
---|
[462878e4] | 144 | <para>
|
---|
| 145 | <command>tar -vxf ../BLFS-ca-bundle-&ca-bundle-version;.tar.bz2</command>:
|
---|
[a41f643] | 146 | <application>OpenSSL</application> no longer includes any root certificates.
|
---|
[d284bee] | 147 | This package adds root certificates as provided by mozilla.org.</para>
|
---|
[462878e4] | 148 |
|
---|
[a181baeb] | 149 | <para><parameter>shared</parameter>: This parameter forces the creation of
|
---|
| 150 | shared libraries along with the static libraries.</para>
|
---|
| 151 |
|
---|
| 152 | <para><parameter>zlib-dynamic</parameter>: This parameter adds
|
---|
| 153 | compression/decompression functionality using the
|
---|
| 154 | <filename class="libraryfile">libz</filename> library.</para>
|
---|
| 155 |
|
---|
[5a5bbbf] | 156 | <para><option>no-rc5 no-idea</option>: When added to the
|
---|
| 157 | <command>./config</command> command, this will eliminate the building
|
---|
| 158 | of those encryption methods. Patent licenses may be needed for you to
|
---|
| 159 | utilize either of those methods in your projects.</para>
|
---|
| 160 |
|
---|
[a181baeb] | 161 | <para><command>make MANDIR=/usr/share/man install</command>: This command
|
---|
| 162 | installs <application>OpenSSL</application> with the man pages in
|
---|
| 163 | <filename class='directory'>/usr/share/man</filename> instead of
|
---|
| 164 | <filename class='directory'>/etc/ssl/man</filename>.</para>
|
---|
| 165 |
|
---|
| 166 | <!-- <para><option>enable-tlsext</option>: When added to the
|
---|
[3c1f587] | 167 | <command>./config</command> command, this switch will enable TLS
|
---|
| 168 | Extensions. Currently this is only RFC 3546 and 4507bis for Server Name
|
---|
| 169 | Indication. This allows the use of multiple SSL certificates with multiple
|
---|
| 170 | virtual hosts in Apache, while using only one IP address and one port for
|
---|
[a181baeb] | 171 | all virtual hosts.</para> -->
|
---|
[aab209d8] | 172 |
|
---|
[a181baeb] | 173 | <!-- <para><option>zlib-dynamic</option>: When added to the
|
---|
[a41f643] | 174 | <command>./config</command> command, this switch will enable
|
---|
[a181baeb] | 175 | use of <filename>libz.so</filename> for compression/decompression.</para> -->
|
---|
[5a5bbbf] | 176 |
|
---|
[462878e4] | 177 | <para><command>cp -v -r certs /etc/ssl</command>: This installs both the
|
---|
[d284bee] | 178 | sample certificates and documentation included with
|
---|
| 179 | <application>OpenSSL</application>, and the certificates that were extracted
|
---|
| 180 | from the BLFS-ca-bundle-&ca-bundle-version; package.</para>
|
---|
[462878e4] | 181 |
|
---|
| 182 | <para><command>for pem in /etc/ssl/certs/*.pem...</command>: This group of
|
---|
[a41f643] | 183 | commands creates a single-file certificate bundle
|
---|
[462878e4] | 184 | (<filename>/etc/ssl/ca-bundle.crt</filename>) that is usable by many
|
---|
| 185 | other software packages. <filename>ca-bundle.crt</filename> should be
|
---|
[1d89a17] | 186 | recreated every time a new or updated certificate is added to
|
---|
[462878e4] | 187 | <filename class="directory">/etc/ssl/certs</filename>.</para>
|
---|
[5a5bbbf] | 188 |
|
---|
| 189 | </sect2>
|
---|
| 190 |
|
---|
| 191 | <sect2 role="configuration">
|
---|
| 192 | <title>Configuring OpenSSL</title>
|
---|
| 193 |
|
---|
| 194 | <sect3 id="openssl-config">
|
---|
| 195 | <title>Config Files</title>
|
---|
| 196 |
|
---|
| 197 | <para><filename>/etc/ssl/openssl.cnf</filename></para>
|
---|
| 198 |
|
---|
| 199 | <indexterm zone="openssl openssl-config">
|
---|
| 200 | <primary sortas="e-etc-ssl-openssl.cnf">/etc/ssl/openssl.cnf</primary>
|
---|
| 201 | </indexterm>
|
---|
| 202 |
|
---|
| 203 | </sect3>
|
---|
| 204 |
|
---|
| 205 | <sect3>
|
---|
| 206 | <title>Configuration Information</title>
|
---|
| 207 |
|
---|
| 208 | <para>Most people who just want to use <application>OpenSSL</application>
|
---|
| 209 | for providing functions to other programs such as
|
---|
| 210 | <application>OpenSSH</application> and web browsers won't need to worry
|
---|
| 211 | about configuring <application>OpenSSL</application>. Configuring
|
---|
| 212 | <application>OpenSSL</application> is an advanced topic and so those
|
---|
| 213 | who do would normally be expected to either know how to do it or to be
|
---|
| 214 | able to find out how to do it.</para>
|
---|
| 215 |
|
---|
| 216 | </sect3>
|
---|
| 217 |
|
---|
| 218 | </sect2>
|
---|
| 219 |
|
---|
| 220 | <sect2 role="content">
|
---|
| 221 | <title>Contents</title>
|
---|
| 222 |
|
---|
| 223 | <segmentedlist>
|
---|
| 224 | <segtitle>Installed Programs</segtitle>
|
---|
| 225 | <segtitle>Installed Libraries</segtitle>
|
---|
| 226 | <segtitle>Installed Directories</segtitle>
|
---|
| 227 |
|
---|
| 228 | <seglistitem>
|
---|
[635cb25] | 229 | <seg>c_rehash and openssl</seg>
|
---|
[8a284147] | 230 | <seg>libcrypto.{so,a}, libssl.{so,a}, and additional encryption
|
---|
| 231 | libraries in /usr/lib/engines/ (lib4758cca.so, libaep.so,
|
---|
[a1813d08] | 232 | libatalla.so, libcapi.so, libchil.so, libcswift.so, libgmp.so,
|
---|
| 233 | libgost.so, libnuron.so, libpadlock.so, libsureware.so, and
|
---|
| 234 | libubsec.so)</seg>
|
---|
| 235 | <seg>/etc/ssl, /usr/include/openssl, /usr/lib/engines
|
---|
[7cfb497] | 236 | and /usr/share/doc/openssl-&openssl-version;</seg>
|
---|
[5a5bbbf] | 237 | </seglistitem>
|
---|
| 238 | </segmentedlist>
|
---|
| 239 |
|
---|
| 240 | <variablelist>
|
---|
| 241 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 242 | <?dbfo list-presentation="list"?>
|
---|
| 243 | <?dbhtml list-presentation="table"?>
|
---|
| 244 |
|
---|
| 245 | <varlistentry id="c_rehash">
|
---|
| 246 | <term><command>c_rehash</command></term>
|
---|
| 247 | <listitem>
|
---|
| 248 | <para>is a <application>Perl</application> script that scans
|
---|
| 249 | all files in a directory and adds symbolic links to their hash
|
---|
| 250 | values.</para>
|
---|
| 251 | <indexterm zone="openssl c_rehash">
|
---|
| 252 | <primary sortas="b-c_rehash">c_rehash</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
| 257 | <varlistentry id="openssl-prog">
|
---|
| 258 | <term><command>openssl</command></term>
|
---|
| 259 | <listitem>
|
---|
| 260 | <para>is a command-line tool for using the various cryptography
|
---|
| 261 | functions of <application>OpenSSL</application>'s crypto
|
---|
| 262 | library from the shell. It can be used for various functions which are
|
---|
| 263 | documented in <command>man 1 openssl</command>.</para>
|
---|
| 264 | <indexterm zone="openssl openssl-prog">
|
---|
| 265 | <primary sortas="b-openssl">openssl</primary>
|
---|
| 266 | </indexterm>
|
---|
| 267 | </listitem>
|
---|
| 268 | </varlistentry>
|
---|
| 269 |
|
---|
| 270 | <varlistentry id="libcrypto">
|
---|
[3597eb6] | 271 | <term><filename class='libraryfile'>libcrypto.{so,a}</filename></term>
|
---|
[5a5bbbf] | 272 | <listitem>
|
---|
| 273 | <para>implements a wide range of cryptographic algorithms used in
|
---|
| 274 | various Internet standards. The services provided by this library
|
---|
| 275 | are used by the <application>OpenSSL</application> implementations of
|
---|
| 276 | SSL, TLS and S/MIME, and they have also been used to implement
|
---|
| 277 | <application>OpenSSH</application>, <application>OpenPGP</application>,
|
---|
| 278 | and other cryptographic standards.</para>
|
---|
| 279 | <indexterm zone="openssl libcrypto">
|
---|
[3597eb6] | 280 | <primary sortas="c-libcrypto">libcrypto.{so,a}</primary>
|
---|
[5a5bbbf] | 281 | </indexterm>
|
---|
| 282 | </listitem>
|
---|
| 283 | </varlistentry>
|
---|
| 284 |
|
---|
| 285 | <varlistentry id="libssl">
|
---|
[3597eb6] | 286 | <term><filename class='libraryfile'>libssl.{so,a}</filename></term>
|
---|
[5a5bbbf] | 287 | <listitem>
|
---|
| 288 | <para>implements the Secure Sockets Layer (SSL v2/v3) and Transport
|
---|
| 289 | Layer Security (TLS v1) protocols. It provides a rich API, documentation
|
---|
| 290 | on which can be found by running <command>man 3 ssl</command>.</para>
|
---|
| 291 | <indexterm zone="openssl libssl">
|
---|
[3597eb6] | 292 | <primary sortas="c-libssl">libssl.{so,a}</primary>
|
---|
[5a5bbbf] | 293 | </indexterm>
|
---|
| 294 | </listitem>
|
---|
| 295 | </varlistentry>
|
---|
| 296 |
|
---|
| 297 | </variablelist>
|
---|
| 298 |
|
---|
| 299 | </sect2>
|
---|
[f45b1953] | 300 |
|
---|
| 301 | </sect1>
|
---|