update libressl to v2.7.4
[unleashed.git] / lib / libcrypto / man / OPENSSL_VERSION_NUMBER.3
blob46f8083ab32cc2b2f8b888914d8eb326b10aab6c
1 .\" $OpenBSD: OPENSSL_VERSION_NUMBER.3,v 1.9 2018/03/23 23:18:17 schwarze Exp $
2 .\" full merge up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
3 .\"
4 .\" This file is a derived work.
5 .\" The changes are covered by the following Copyright and license:
6 .\"
7 .\" Copyright (c) 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
8 .\"
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.
12 .\"
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.
20 .\"
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.
26 .\"
27 .\" Redistribution and use in source and binary forms, with or without
28 .\" modification, are permitted provided that the following conditions
29 .\" are met:
30 .\"
31 .\" 1. Redistributions of source code must retain the above copyright
32 .\"    notice, this list of conditions and the following disclaimer.
33 .\"
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
37 .\"    distribution.
38 .\"
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/)"
43 .\"
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.
48 .\"
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.
52 .\"
53 .\" 6. Redistributions of any form whatsoever must retain the following
54 .\"    acknowledgment:
55 .\"    "This product includes software developed by the OpenSSL Project
56 .\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
57 .\"
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.
70 .\"
71 .Dd $Mdocdate: March 23 2018 $
72 .Dt OPENSSL_VERSION_NUMBER 3
73 .Os
74 .Sh NAME
75 .Nm OPENSSL_VERSION_NUMBER ,
76 .Nm LIBRESSL_VERSION_NUMBER ,
77 .Nm LIBRESSL_VERSION_TEXT ,
78 .Nm OpenSSL_version_num ,
79 .Nm OpenSSL_version ,
80 .Nm SSLeay ,
81 .Nm SSLeay_version
82 .Nd get OpenSSL version number
83 .Sh SYNOPSIS
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
88 .In openssl/crypto.h
89 .Ft unsigned long
90 .Fn OpenSSL_version_num void
91 .Ft const char *
92 .Fo OpenSSL_version
93 .Fa "int t"
94 .Fc
95 .Ft long
96 .Fn SSLeay void
97 .Ft const char *
98 .Fo SSLeay_version
99 .Fa "int t"
101 .Sh DESCRIPTION
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
111 for release.
112 For LibreSSL,
113 .Dv OPENSSL_VERSION_NUMBER
114 is always 0x020000000,
116 .Dv LIBRESSL_VERSION_NUMBER
117 always ends with 00f.
119 For example:
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.
136 For example:
137 .Bd -literal
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
147 returns
148 .Dv OPENSSL_VERSION_NUMBER .
150 .Fn OpenSSL_version
151 returns different strings depending on
152 .Fa t :
153 .Bl -tag -width Ds
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 .
158 For LibreSSL,
159 .Dv LIBRESSL_VERSION_TEXT
160 is returned.
161 .It Dv OPENSSL_CFLAGS
162 The compiler flags set for the compilation process in the form
163 .Qq compiler: ...
164 if available or
165 .Qq compiler: information not available
166 otherwise.
167 LibreSSL never provides compiler information.
168 .It Dv OPENSSL_BUILT_ON
169 The date of the build process in the form
170 .Qq built on: ...
171 if available or
172 .Qq built on: date not available
173 otherwise.
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
177 .Qq platform: ...
178 if available or
179 .Qq platform: information not available
180 otherwise.
181 LibreSSL never provides platform information.
182 .It Dv OPENSSL_DIR
184 .Dv OPENSSLDIR
185 setting of the library build in the form
186 .Qq OPENSSLDIR: Qq ...
187 if available or
188 .Qq OPENSSLDIR: N/A
189 otherwise.
190 For LibreSSL, the default is
191 .Qq OPENSSLDIR: Qq /etc/ssl .
192 .It Dv OPENSSL_ENGINES_DIR
194 .Dv ENGINESDIR
195 setting of the library build in the form
196 .Qq ENGINESDIR: Qq ...
197 if available or
198 .Qq ENGINESDIR: N/A
199 otherwise.
200 LibreSSL never provides or uses an
201 .Dv ENGINESDIR .
204 For an unknown
205 .Fa t ,
206 the text
207 .Qq not available
208 is returned.
210 For backward compatibility,
211 .Dv SSLEAY_VERSION_NUMBER
212 is an alias for
213 .Dv OPENSSL_VERSION_NUMBER
215 .Fn SSLeay
217 .Dv OpenSSL_version_num .
218 The legacy function
219 .Fn SSLeay_version
220 is similar to
221 .Fn OpenSSL_version
222 except that it takes arguments
223 .Dv SSLEAY_VERSION ,
224 .Dv SSLEAY_CFLAGS ,
225 .Dv SSLEAY_BUILT_ON ,
226 .Dv SSLEAY_PLATFORM ,
228 .Dv SSLEAY_DIR
229 which expand to
230 .Em other
231 numerical values than the corresponding
232 .Dv OPENSSL_*
233 macros.
234 .Sh RETURN VALUES
235 .Fn OpenSSL_version_num
237 .Fn SSLeay
238 return a constant version number.
240 .Fn OpenSSL_version
242 .Fn SSLeay_version
243 return pointers to static strings.
244 .Sh SEE ALSO
245 .Xr crypto 3
246 .Sh HISTORY
247 .Fn SSLeay ,
248 .Fn SSLeay_version ,
250 .Dv SSLEAY_VERSION_NUMBER
251 appeared in SSLeay 0.8.1b or earlier and have been available since
252 .Ox 2.4 .
254 .Dv OPENSSL_VERSION_NUMBER
255 first appeared in the first OpenSSL release, OpenSSL 0.9.1c,
256 and has been available since
257 .Ox 2.6 .
259 .Dv SSLEAY_DIR
260 was added in OpenSSL 0.9.7.
262 .Dv LIBRESSL_VERSION_NUMBER
263 first appeared in LibreSSL 2.0.0 and
264 .Ox 5.6
265 and got its final format in LibreSSL 2.3.2 and
266 .Ox 5.9 .
267 .Dv LIBRESSL_VERSION_TEXT
268 first appeared in LibreSSL 2.2.2 and
269 .Ox 5.8 .
271 .Fn OpenSSL_version_num
273 .Fn OpenSSL_version
274 first appeared in OpenSSL 1.1.0
275 and have been available since LibreSSL 2.7.1 and
276 .Ox 6.3 .