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