summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-02-17 18:00:59 +0000
committerschwarze <>2018-02-17 18:00:59 +0000
commitea15e6cfa2317fbe5a3ca54022056e0b8e43ebc5 (patch)
tree4e35d4cefd615e81c03611e9295e6fe00934e785 /src
parent3bbb479de12bd8e6e1b3f23565ef278bafa57d51 (diff)
downloadopenbsd-ea15e6cfa2317fbe5a3ca54022056e0b8e43ebc5.tar.gz
openbsd-ea15e6cfa2317fbe5a3ca54022056e0b8e43ebc5.tar.bz2
openbsd-ea15e6cfa2317fbe5a3ca54022056e0b8e43ebc5.zip
Document OpenSSL_version_num(3) and OpenSSL_version(3) that jsing@
recently provided. Many minor improvements while here, and delete ridiculous text about MS Windows.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3159
1 files changed, 125 insertions, 34 deletions
diff --git a/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 b/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
index 7c792f745a..e5a66c58db 100644
--- a/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
+++ b/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
@@ -1,9 +1,28 @@
1.\" $OpenBSD: OPENSSL_VERSION_NUMBER.3,v 1.3 2016/11/28 14:51:03 schwarze Exp $ 1.\" $OpenBSD: OPENSSL_VERSION_NUMBER.3,v 1.4 2018/02/17 18:00:59 schwarze Exp $
2.\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 2.\" full merge up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org> and 4.\" This file is a derived work.
5.\" Richard Levitte <levitte@openssl.org>. 5.\" The changes are covered by the following Copyright and license:
6.\" Copyright (c) 2000, 2002, 2014 The OpenSSL Project. All rights reserved. 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.
7.\" 26.\"
8.\" Redistribution and use in source and binary forms, with or without 27.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions 28.\" modification, are permitted provided that the following conditions
@@ -49,18 +68,26 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 68.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 69.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 70.\"
52.Dd $Mdocdate: November 28 2016 $ 71.Dd $Mdocdate: February 17 2018 $
53.Dt OPENSSL_VERSION_NUMBER 3 72.Dt OPENSSL_VERSION_NUMBER 3
54.Os 73.Os
55.Sh NAME 74.Sh NAME
56.Nm OPENSSL_VERSION_NUMBER , 75.Nm OPENSSL_VERSION_NUMBER ,
76.Nm OpenSSL_version_num ,
77.Nm OpenSSL_version ,
57.Nm SSLeay , 78.Nm SSLeay ,
58.Nm SSLeay_version 79.Nm SSLeay_version
59.Nd get OpenSSL version number 80.Nd get OpenSSL version number
60.Sh SYNOPSIS 81.Sh SYNOPSIS
61.In openssl/opensslv.h 82.In openssl/opensslv.h
62.Fd #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL 83.Fd #define OPENSSL_VERSION_NUMBER 0x020000000L
63.In openssl/crypto.h 84.In openssl/crypto.h
85.Ft unsigned long
86.Fn OpenSSL_version_num void
87.Ft const char *
88.Fo OpenSSL_version
89.Fa "int t"
90.Fc
64.Ft long 91.Ft long
65.Fn SSLeay void 92.Fn SSLeay void
66.Ft const char * 93.Ft const char *
@@ -70,21 +97,23 @@
70.Sh DESCRIPTION 97.Sh DESCRIPTION
71.Dv OPENSSL_VERSION_NUMBER 98.Dv OPENSSL_VERSION_NUMBER
72is a numeric release version identifier. 99is a numeric release version identifier.
73The first two digits contain the major release number, 100For OpenSSL, the first two digits contain the major release number,
74the third and fourth digits the minor release number, 101the third and fourth digits the minor release number,
75the fifth and sixth digits the fix release number, 102the fifth and sixth digits the fix release number,
76the seventh and eight digits the patch release number. 103the seventh and eight digits the patch release number.
77The final digit is 0 for development, 1 to e for betas 1 to 14, or f 104The final digit is 0 for development, 1 to e for betas 1 to 14, or f
78for release. 105for release.
106For LibreSSL, this number is always 0x020000000.
79.Pp 107.Pp
80For example: 108For example:
81.Bd -literal -offset indent 109.Bd -literal -offset indent
820x000906000 == 0.9.6 dev 1100x000906000 == 0.9.6 dev
830x000906023 == 0.9.6b beta 3 1110x000906023 == 0.9.6b beta 3
840x00090605f == 0.9.6e release 1120x00090605f == 0.9.6e release
1130x020000000 == 2.0.0 for any version of LibreSSL
85.Ed 114.Ed
86.Pp 115.Pp
87Versions prior to 0.9.3 had identifiers < 0x0930. 116OpenSSL versions prior to 0.9.3 had identifiers < 0x0930.
88For versions between 0.9.3 and 0.9.5, 117For versions between 0.9.3 and 0.9.5,
89the seventh digit was 1 for release and 0 otherwise, 118the seventh digit was 1 for release and 0 otherwise,
90and the eighth and ninth digits were the patch release number. 119and the eighth and ninth digits were the patch release number.
@@ -95,45 +124,107 @@ For example:
950x000905000 == 0.9.5 dev 1240x000905000 == 0.9.5 dev
96.Ed 125.Ed
97.Pp 126.Pp
98Version 0.9.5a had an interim interpretation that is like the current 127OpenSSL version 0.9.5a had an interim interpretation that is like the current
99one, except the patch level got the highest bit set, to keep continuity. 128one, except the patch level got the highest bit set, to keep continuity.
100The number was therefore 0x0090581f. 129The number was therefore 0x0090581f.
101.Pp 130.Pp
102For backward compatibility, SSLEAY_VERSION_NUMBER is also defined. 131.Fn OpenSSL_version_num
132returns this version number.
103.Pp 133.Pp
104.Fn SSLeay 134.Fn OpenSSL_version
105returns this number.
106The return value can be compared to the macro to make sure that the
107correct version of the library has been loaded, especially when using
108DLLs on Windows systems.
109.Pp
110.Fn SSLeay_version
111returns different strings depending on 135returns different strings depending on
112.Fa t : 136.Fa t :
113.Bl -tag -width Ds 137.Bl -tag -width Ds
114.It Dv SSLEAY_VERSION 138.It Dv OPENSSL_VERSION
115The text variant of the version number and the release date. 139The text variant of the version number.
116For example, "OpenSSL 0.9.5a 1 Apr 2000". 140For OpenSSL, it is followed by the release date.
117.It Dv SSLEAY_CFLAGS 141For example,
142.Qq OpenSSL 0.9.5a 1 Apr 2000
143or
144.Qq LibreSSL 2.7.0 .
145.It Dv OPENSSL_CFLAGS
118The compiler flags set for the compilation process in the form 146The compiler flags set for the compilation process in the form
119"compiler: ..." if available or "compiler: information not available" 147.Qq compiler: ...
148if available or
149.Qq compiler: information not available
150otherwise.
151LibreSSL never provides compiler information.
152.It Dv OPENSSL_BUILT_ON
153The date of the build process in the form
154.Qq built on: ...
155if available or
156.Qq built on: date not available
157otherwise.
158LibreSSL never provides information on the build date.
159.It Dv OPENSSL_PLATFORM
160The Configure target of the library build in the form
161.Qq platform: ...
162if available or
163.Qq platform: information not available
164otherwise.
165LibreSSL never provides platform information.
166.It Dv OPENSSL_DIR
167The
168.Dv OPENSSLDIR
169setting of the library build in the form
170.Qq OPENSSLDIR: Qq ...
171if available or
172.Qq OPENSSLDIR: N/A
173otherwise.
174For LibreSSL, the default is
175.Qq OPENSSLDIR: Qq /etc/ssl .
176.It Dv OPENSSL_ENGINES_DIR
177The
178.Dv ENGINESDIR
179setting of the library build in the form
180.Qq ENGINESDIR: Qq ...
181if available or
182.Qq ENGINESDIR: N/A
120otherwise. 183otherwise.
121.It Dv SSLEAY_BUILT_ON 184LibreSSL never provides or uses an
122The date of the build process in the form "built on: ..." if available 185.Dv ENGINESDIR .
123or "built on: date not available" otherwise.
124.It Dv SSLEAY_PLATFORM
125The "Configure" target of the library build in the form "platform: ..."
126if available or "platform: information not available" otherwise.
127.It Dv SSLEAY_DIR
128The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR:
129"..."" if available or "OPENSSLDIR: N/A" otherwise.
130.El 186.El
131.Pp 187.Pp
132For an unknown 188For an unknown
133.Fa t , 189.Fa t ,
134the text "not available" is returned. 190the text
191.Qq not available
192is returned.
193.Pp
194For backward compatibility,
195.Dv SSLEAY_VERSION_NUMBER
196is an alias for
197.Dv OPENSSL_VERSION_NUMBER
198and
199.Fn SSLeay
200for
201.Dv OpenSSL_version_num .
202The legacy function
203.Fn SSLeay_version
204is similar to
205.Fn OpenSSL_version
206except that it takes arguments
207.Dv SSLEAY_VERSION ,
208.Dv SSLEAY_CFLAGS ,
209.Dv SSLEAY_BUILT_ON ,
210.Dv SSLEAY_PLATFORM ,
211and
212.Dv SSLEAY_DIR
213which expand to
214.Em other
215numerical values than the corresponding
216.Dv OPENSSL_*
217macros.
135.Sh RETURN VALUES 218.Sh RETURN VALUES
136The version number. 219.Fn OpenSSL_version_num
220and
221.Fn SSLeay
222return a constant version number.
223.Pp
224.Fn OpenSSL_version
225and
226.Fn SSLeay_version
227return pointers to static strings.
137.Sh SEE ALSO 228.Sh SEE ALSO
138.Xr crypto 3 229.Xr crypto 3
139.Sh HISTORY 230.Sh HISTORY