blob: c39ac35e78ae60702e916dc9c51674b0a4049ece [file] [log] [blame]
Ulf Möller9f7b1b22000-02-20 21:00:22 +00001=pod
2
3=head1 NAME
4
Lutz Jänicke5256b022002-01-04 15:05:51 +00005OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
Ulf Möller9f7b1b22000-02-20 21:00:22 +00006
7=head1 SYNOPSIS
8
9 #include <openssl/opensslv.h>
10 #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL
11
12 #include <openssl/crypto.h>
13 long SSLeay(void);
Lutz Jänicke5256b022002-01-04 15:05:51 +000014 const char *SSLeay_version(int t);
Ulf Möller9f7b1b22000-02-20 21:00:22 +000015
16=head1 DESCRIPTION
17
18OPENSSL_VERSION_NUMBER is a numeric release version identifier:
19
Richard Levittee65c84a2000-09-14 21:22:19 +000020 MMNNFFPPS: major minor fix patch status
21
22The status nibble has one of the values 0 for development, 1 to e for betas
231 to 14, and f for release.
24
25for example
26
27 0x000906000 == 0.9.6 dev
28 0x000906023 == 0.9.6b beta 3
29 0x00090605f == 0.9.6e release
30
31Versions prior to 0.9.3 have identifiers E<lt> 0x0930.
32Versions between 0.9.3 and 0.9.5 had a version identifier with this
33interpretation:
34
Ulf Möller9f7b1b22000-02-20 21:00:22 +000035 MMNNFFRBB major minor fix final beta/patch
36
37for example
38
39 0x000904100 == 0.9.4 release
40 0x000905000 == 0.9.5 dev
41
Ulf Möllerc8973692000-09-20 03:24:36 +000042Version 0.9.5a had an interim interpretation that is like the current one,
Richard Levittee65c84a2000-09-14 21:22:19 +000043except the patch level got the highest bit set, to keep continuity. The
44number was therefore 0x0090581f.
45
46
Ulf Möller9f7b1b22000-02-20 21:00:22 +000047For backward compatibility, SSLEAY_VERSION_NUMBER is also defined.
48
49SSLeay() returns this number. The return value can be compared to the
50macro to make sure that the correct version of the library has been
51loaded, especially when using DLLs on Windows systems.
52
Richard Levittee65c84a2000-09-14 21:22:19 +000053SSLeay_version() returns different strings depending on B<t>:
54
55=over 4
56
57=item SSLEAY_VERSION
Bodo Möllerdc4ddcd2002-01-04 15:17:09 +000058
Richard Levittee65c84a2000-09-14 21:22:19 +000059The text variant of the version number and the release date. For example,
60"OpenSSL 0.9.5a 1 Apr 2000".
61
62=item SSLEAY_CFLAGS
Bodo Möllerdc4ddcd2002-01-04 15:17:09 +000063
64The compiler flags set for the compilation process in the form
65"compiler: ..." if available or "compiler: information not available"
66otherwise.
67
68=item SSLEAY_BUILT_ON
69
70The date of the build process in the form "built on: ..." if available
71or "built on: date not available" otherwise.
Richard Levittee65c84a2000-09-14 21:22:19 +000072
73=item SSLEAY_PLATFORM
Bodo Möllerdc4ddcd2002-01-04 15:17:09 +000074
75The "Configure" target of the library build in the form "platform: ..."
76if available or "platform: information not available" otherwise.
77
78=item SSLEAY_DIR
79
80The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
81if available or "OPENSSLDIR: N/A" otherwise.
Richard Levittee65c84a2000-09-14 21:22:19 +000082
83=back
84
Bodo Möller31cafe52002-01-04 15:22:40 +000085For an unknown B<t>, the text "not available" is returned.
86
Ulf Möller9f7b1b22000-02-20 21:00:22 +000087=head1 RETURN VALUE
88
89The version number.
90
91=head1 SEE ALSO
92
93L<crypto(3)|crypto(3)>
94
95=head1 HISTORY
96
97SSLeay() and SSLEAY_VERSION_NUMBER are available in all versions of SSLeay and OpenSSL.
98OPENSSL_VERSION_NUMBER is available in all versions of OpenSSL.
Bodo Möllerdc4ddcd2002-01-04 15:17:09 +000099B<SSLEAY_DIR> was added in OpenSSL 0.9.7.
Ulf Möller9f7b1b22000-02-20 21:00:22 +0000100
101=cut