159191Skris=pod
259191Skris
359191Skris=head1 NAME
459191Skris
5100928SnectarOPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
659191Skris
759191Skris=head1 SYNOPSIS
859191Skris
959191Skris #include <openssl/opensslv.h>
1059191Skris #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL
1159191Skris
1259191Skris #include <openssl/crypto.h>
1359191Skris long SSLeay(void);
14100928Snectar const char *SSLeay_version(int t);
1559191Skris
1659191Skris=head1 DESCRIPTION
1759191Skris
1859191SkrisOPENSSL_VERSION_NUMBER is a numeric release version identifier:
1959191Skris
2068651Skris MMNNFFPPS: major minor fix patch status
2168651Skris
2268651SkrisThe status nibble has one of the values 0 for development, 1 to e for betas
2368651Skris1 to 14, and f for release.
2468651Skris
2568651Skrisfor example
2668651Skris
2768651Skris 0x000906000 == 0.9.6 dev
2868651Skris 0x000906023 == 0.9.6b beta 3
2968651Skris 0x00090605f == 0.9.6e release
3068651Skris
3168651SkrisVersions prior to 0.9.3 have identifiers E<lt> 0x0930.
3268651SkrisVersions between 0.9.3 and 0.9.5 had a version identifier with this
3368651Skrisinterpretation:
3468651Skris
3559191Skris MMNNFFRBB major minor fix final beta/patch
3659191Skris
3759191Skrisfor example
3859191Skris
3959191Skris 0x000904100 == 0.9.4 release
4059191Skris 0x000905000 == 0.9.5 dev
4159191Skris
4268651SkrisVersion 0.9.5a had an interim interpretation that is like the current one,
4368651Skrisexcept the patch level got the highest bit set, to keep continuity.  The
4468651Skrisnumber was therefore 0x0090581f.
4568651Skris
4668651Skris
4759191SkrisFor backward compatibility, SSLEAY_VERSION_NUMBER is also defined.
4859191Skris
4959191SkrisSSLeay() returns this number. The return value can be compared to the
5059191Skrismacro to make sure that the correct version of the library has been
5159191Skrisloaded, especially when using DLLs on Windows systems.
5259191Skris
5368651SkrisSSLeay_version() returns different strings depending on B<t>:
5468651Skris
5568651Skris=over 4
5668651Skris
5768651Skris=item SSLEAY_VERSION
58100928Snectar
5968651SkrisThe text variant of the version number and the release date.  For example,
6068651Skris"OpenSSL 0.9.5a 1 Apr 2000".
6168651Skris
6268651Skris=item SSLEAY_CFLAGS
6368651Skris
64100928SnectarThe compiler flags set for the compilation process in the form
65100928Snectar"compiler: ..."  if available or "compiler: information not available"
66100928Snectarotherwise.
67100928Snectar
68100928Snectar=item SSLEAY_BUILT_ON
69100928Snectar
70100928SnectarThe date of the build process in the form "built on: ..." if available
71100928Snectaror "built on: date not available" otherwise.
72100928Snectar
7368651Skris=item SSLEAY_PLATFORM
7468651Skris
75100928SnectarThe "Configure" target of the library build in the form "platform: ..."
76100928Snectarif available or "platform: information not available" otherwise.
77100928Snectar
78109998Smarkm=item SSLEAY_DIR
79109998Smarkm
80109998SmarkmThe "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
81109998Smarkmif available or "OPENSSLDIR: N/A" otherwise.
82109998Smarkm
8368651Skris=back
8468651Skris
8568651SkrisFor an unknown B<t>, the text "not available" is returned.
8668651Skris
8759191Skris=head1 RETURN VALUE
8859191Skris
8959191SkrisThe version number.
9059191Skris
9159191Skris=head1 SEE ALSO
9259191Skris
9359191SkrisL<crypto(3)|crypto(3)>
9459191Skris
9559191Skris=head1 HISTORY
9659191Skris
9759191SkrisSSLeay() and SSLEAY_VERSION_NUMBER are available in all versions of SSLeay and OpenSSL.
9859191SkrisOPENSSL_VERSION_NUMBER is available in all versions of OpenSSL.
99109998SmarkmB<SSLEAY_DIR> was added in OpenSSL 0.9.7.
10059191Skris
10159191Skris=cut
102