1 .\" $OpenBSD: OPENSSL_VERSION_NUMBER.3,v 1.10 2018/03/27 17:35:50 schwarze Exp $
2 .\" full merge up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
4 .\" This file is a derived work.
5 .\" The changes are covered by the following Copyright and license:
7 .\" Copyright (c) 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
9 .\" Permission to use, copy, modify, and distribute this software for any
10 .\" purpose with or without fee is hereby granted, provided that the above
11 .\" copyright notice and this permission notice appear in all copies.
13 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 .\" The original file was written by Ulf Moeller <ulf@openssl.org>,
22 .\" Richard Levitte <levitte@openssl.org>, and
23 .\" Bodo Moeller <bodo@openssl.org>.
24 .\" Copyright (c) 2000, 2002, 2015, 2016, 2017 The OpenSSL Project.
25 .\" All rights reserved.
27 .\" Redistribution and use in source and binary forms, with or without
28 .\" modification, are permitted provided that the following conditions
31 .\" 1. Redistributions of source code must retain the above copyright
32 .\" notice, this list of conditions and the following disclaimer.
34 .\" 2. Redistributions in binary form must reproduce the above copyright
35 .\" notice, this list of conditions and the following disclaimer in
36 .\" the documentation and/or other materials provided with the
39 .\" 3. All advertising materials mentioning features or use of this
40 .\" software must display the following acknowledgment:
41 .\" "This product includes software developed by the OpenSSL Project
42 .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
44 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
45 .\" endorse or promote products derived from this software without
46 .\" prior written permission. For written permission, please contact
47 .\" openssl-core@openssl.org.
49 .\" 5. Products derived from this software may not be called "OpenSSL"
50 .\" nor may "OpenSSL" appear in their names without prior written
51 .\" permission of the OpenSSL Project.
53 .\" 6. Redistributions of any form whatsoever must retain the following
55 .\" "This product includes software developed by the OpenSSL Project
56 .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
58 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
59 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
61 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
62 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
63 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
64 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
65 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
66 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
67 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
68 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
69 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
71 .Dd $Mdocdate: March 27 2018 $
72 .Dt OPENSSL_VERSION_NUMBER 3
75 .Nm OPENSSL_VERSION_NUMBER ,
76 .Nm LIBRESSL_VERSION_NUMBER ,
77 .Nm LIBRESSL_VERSION_TEXT ,
78 .Nm OpenSSL_version_num ,
82 .Nd get OpenSSL version number
84 .In openssl/opensslv.h
85 .Fd #define OPENSSL_VERSION_NUMBER 0x020000000L
86 .Fd #define LIBRESSL_VERSION_NUMBER 0x02nnnn00fL
87 .Fd #define LIBRESSL_VERSION_TEXT \(dqLibreSSL 2.n.n\(dq
90 .Fn OpenSSL_version_num void
102 .Dv OPENSSL_VERSION_NUMBER
104 .Dv LIBRESSL_VERSION_NUMBER
105 are numeric release version identifiers.
106 The first two digits contain the major release number,
107 the third and fourth digits the minor release number,
108 and the fifth and sixth digits the fix release number.
109 For OpenSSL, the seventh and eight digits contain the patch release number
110 and the final digit is 0 for development, 1 to e for betas 1 to 14, or f
113 .Dv OPENSSL_VERSION_NUMBER
114 is always 0x020000000,
116 .Dv LIBRESSL_VERSION_NUMBER
117 always ends with 00f.
120 .Bd -literal -offset indent
121 OPENSSL_VERSION_NUMBER:
122 0x000906000 == 0.9.6 dev
123 0x000906023 == 0.9.6b beta 3
124 0x00090605f == 0.9.6e release
125 0x020000000 == 2.0.0 for any version of LibreSSL
127 LIBRESSL_VERSION_NUMBER:
128 0x02070000f == LibreSSL 2.7.0
131 OpenSSL versions prior to 0.9.3 had identifiers < 0x0930.
132 For versions between 0.9.3 and 0.9.5,
133 the seventh digit was 1 for release and 0 otherwise,
134 and the eighth and ninth digits were the patch release number.
138 0x000904100 == 0.9.4 release
139 0x000905000 == 0.9.5 dev
142 OpenSSL version 0.9.5a had an interim interpretation that is like the current
143 one, except the patch level got the highest bit set, to keep continuity.
144 The number was therefore 0x0090581f.
146 .Fn OpenSSL_version_num
148 .Dv OPENSSL_VERSION_NUMBER .
151 returns different strings depending on
154 .It Dv OPENSSL_VERSION
155 The text variant of the version number.
156 For OpenSSL, it is followed by the release date, for example
157 .Qq OpenSSL 0.9.5a 1 Apr 2000 .
159 .Dv LIBRESSL_VERSION_TEXT
161 .It Dv OPENSSL_CFLAGS
162 The compiler flags set for the compilation process in the form
165 .Qq compiler: information not available
167 LibreSSL never provides compiler information.
168 .It Dv OPENSSL_BUILT_ON
169 The date of the build process in the form
172 .Qq built on: date not available
174 LibreSSL never provides information on the build date.
175 .It Dv OPENSSL_PLATFORM
176 The Configure target of the library build in the form
179 .Qq platform: information not available
181 LibreSSL never provides platform information.
185 setting of the library build in the form
186 .Qq OPENSSLDIR: Qq ...
190 For LibreSSL, the default is
191 .Qq OPENSSLDIR: Qq /etc/ssl .
192 .It Dv OPENSSL_ENGINES_DIR
195 setting of the library build in the form
196 .Qq ENGINESDIR: Qq ...
200 LibreSSL never provides or uses an
210 For backward compatibility,
211 .Dv SSLEAY_VERSION_NUMBER
213 .Dv OPENSSL_VERSION_NUMBER
217 .Dv OpenSSL_version_num .
222 except that it takes arguments
225 .Dv SSLEAY_BUILT_ON ,
226 .Dv SSLEAY_PLATFORM ,
231 numerical values than the corresponding
235 .Fn OpenSSL_version_num
238 return a constant version number.
243 return pointers to static strings.
250 .Dv SSLEAY_VERSION_NUMBER
251 first appeared in SSLeay 0.6.0 and have been available since
254 .Dv OPENSSL_VERSION_NUMBER
255 first appeared in the first OpenSSL release, OpenSSL 0.9.1c,
256 and has been available since
260 first appeared in OpenSSL 0.9.7 and have been available since
263 .Dv LIBRESSL_VERSION_NUMBER
264 first appeared in LibreSSL 2.0.0 and
266 and got its final format in LibreSSL 2.3.2 and
268 .Dv LIBRESSL_VERSION_TEXT
269 first appeared in LibreSSL 2.2.2 and
272 .Fn OpenSSL_version_num
275 first appeared in OpenSSL 1.1.0
276 and have been available since LibreSSL 2.7.1 and