1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
6*2175Sjp161948
7*2175Sjp161948=head1 SYNOPSIS
8*2175Sjp161948
9*2175Sjp161948 #include <openssl/opensslv.h>
10*2175Sjp161948 #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL
11*2175Sjp161948
12*2175Sjp161948 #include <openssl/crypto.h>
13*2175Sjp161948 long SSLeay(void);
14*2175Sjp161948 const char *SSLeay_version(int t);
15*2175Sjp161948
16*2175Sjp161948=head1 DESCRIPTION
17*2175Sjp161948
18*2175Sjp161948OPENSSL_VERSION_NUMBER is a numeric release version identifier:
19*2175Sjp161948
20*2175Sjp161948 MMNNFFPPS: major minor fix patch status
21*2175Sjp161948
22*2175Sjp161948The status nibble has one of the values 0 for development, 1 to e for betas
23*2175Sjp1619481 to 14, and f for release.
24*2175Sjp161948
25*2175Sjp161948for example
26*2175Sjp161948
27*2175Sjp161948 0x000906000 == 0.9.6 dev
28*2175Sjp161948 0x000906023 == 0.9.6b beta 3
29*2175Sjp161948 0x00090605f == 0.9.6e release
30*2175Sjp161948
31*2175Sjp161948Versions prior to 0.9.3 have identifiers E<lt> 0x0930.
32*2175Sjp161948Versions between 0.9.3 and 0.9.5 had a version identifier with this
33*2175Sjp161948interpretation:
34*2175Sjp161948
35*2175Sjp161948 MMNNFFRBB major minor fix final beta/patch
36*2175Sjp161948
37*2175Sjp161948for example
38*2175Sjp161948
39*2175Sjp161948 0x000904100 == 0.9.4 release
40*2175Sjp161948 0x000905000 == 0.9.5 dev
41*2175Sjp161948
42*2175Sjp161948Version 0.9.5a had an interim interpretation that is like the current one,
43*2175Sjp161948except the patch level got the highest bit set, to keep continuity.  The
44*2175Sjp161948number was therefore 0x0090581f.
45*2175Sjp161948
46*2175Sjp161948
47*2175Sjp161948For backward compatibility, SSLEAY_VERSION_NUMBER is also defined.
48*2175Sjp161948
49*2175Sjp161948SSLeay() returns this number. The return value can be compared to the
50*2175Sjp161948macro to make sure that the correct version of the library has been
51*2175Sjp161948loaded, especially when using DLLs on Windows systems.
52*2175Sjp161948
53*2175Sjp161948SSLeay_version() returns different strings depending on B<t>:
54*2175Sjp161948
55*2175Sjp161948=over 4
56*2175Sjp161948
57*2175Sjp161948=item SSLEAY_VERSION
58*2175Sjp161948
59*2175Sjp161948The text variant of the version number and the release date.  For example,
60*2175Sjp161948"OpenSSL 0.9.5a 1 Apr 2000".
61*2175Sjp161948
62*2175Sjp161948=item SSLEAY_CFLAGS
63*2175Sjp161948
64*2175Sjp161948The compiler flags set for the compilation process in the form
65*2175Sjp161948"compiler: ..."  if available or "compiler: information not available"
66*2175Sjp161948otherwise.
67*2175Sjp161948
68*2175Sjp161948=item SSLEAY_BUILT_ON
69*2175Sjp161948
70*2175Sjp161948The date of the build process in the form "built on: ..." if available
71*2175Sjp161948or "built on: date not available" otherwise.
72*2175Sjp161948
73*2175Sjp161948=item SSLEAY_PLATFORM
74*2175Sjp161948
75*2175Sjp161948The "Configure" target of the library build in the form "platform: ..."
76*2175Sjp161948if available or "platform: information not available" otherwise.
77*2175Sjp161948
78*2175Sjp161948=item SSLEAY_DIR
79*2175Sjp161948
80*2175Sjp161948The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
81*2175Sjp161948if available or "OPENSSLDIR: N/A" otherwise.
82*2175Sjp161948
83*2175Sjp161948=back
84*2175Sjp161948
85*2175Sjp161948For an unknown B<t>, the text "not available" is returned.
86*2175Sjp161948
87*2175Sjp161948=head1 RETURN VALUE
88*2175Sjp161948
89*2175Sjp161948The version number.
90*2175Sjp161948
91*2175Sjp161948=head1 SEE ALSO
92*2175Sjp161948
93*2175Sjp161948L<crypto(3)|crypto(3)>
94*2175Sjp161948
95*2175Sjp161948=head1 HISTORY
96*2175Sjp161948
97*2175Sjp161948SSLeay() and SSLEAY_VERSION_NUMBER are available in all versions of SSLeay and OpenSSL.
98*2175Sjp161948OPENSSL_VERSION_NUMBER is available in all versions of OpenSSL.
99*2175Sjp161948B<SSLEAY_DIR> was added in OpenSSL 0.9.7.
100*2175Sjp161948
101*2175Sjp161948=cut
102