
#use wml::openssl-macros area=docs page=OPENSSL_VERSION_NUMBER

<title>Documents, OPENSSL_VERSION_NUMBER(3)</title>

<h1>OPENSSL_VERSION_NUMBER(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#RETURN_VALUE">RETURN VALUE</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/opensslv.h&gt;
 \#define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL
</PRE>
<PRE> #include &lt;openssl/crypto.h&gt;
 long SSLeay(void);
 const char *SSLeay_version(int t);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
OPENSSL_VERSION_NUMBER is a numeric release version identifier:

</P>
<PRE> MMNNFFPPS: major minor fix patch status
</PRE>
<P>
The status nibble has one of the values 0 for development, 1 to e for betas
1 to 14, and f for release.

</P>
<P>
for example

</P>
<PRE> 0x000906000 == 0.9.6 dev
 0x000906023 == 0.9.6b beta 3
 0x00090605f == 0.9.6e release
</PRE>
<P>
Versions prior to 0.9.3 have identifiers &lt; 0x0930. Versions between 0.9.3 and 0.9.5 had a version identifier with this
interpretation:

</P>
<PRE> MMNNFFRBB major minor fix final beta/patch
</PRE>
<P>
for example

</P>
<PRE> 0x000904100 == 0.9.4 release
 0x000905000 == 0.9.5 dev
</PRE>
<P>
Version 0.9.5a had an interim interpretation that is like the current one,
except the patch level got the highest bit set, to keep continuity. The
number was therefore 0x0090581f.

</P>
<P>
For backward compatibility, SSLEAY_VERSION_NUMBER is also defined.

</P>
<P>
<CODE>SSLeay()</CODE> returns this number. The return value can be compared
to the macro to make sure that the correct version of the library has been
loaded, especially when using DLLs on Windows systems.

</P>
<P>
<CODE>SSLeay_version()</CODE> returns different strings depending on <STRONG>t</STRONG>:

</P>
<DL>
<DT><STRONG><A NAME="item_SSLEAY_VERSION">SSLEAY_VERSION</A></STRONG><DD>
<P>
The text variant of the version number and the release date. For example,
``OpenSSL 0.9.5a 1 Apr 2000''.

</P>
<DT><STRONG><A NAME="item_SSLEAY_CFLAGS">SSLEAY_CFLAGS</A></STRONG><DD>
<P>
The compiler flags set for the compilation process in the form ``compiler:
...'' if available or ``compiler: information not available'' otherwise.

</P>
<DT><STRONG><A NAME="item_SSLEAY_BUILT_ON">SSLEAY_BUILT_ON</A></STRONG><DD>
<P>
The date of the build process in the form ``built on: ...'' if available or
``built on: date not available'' otherwise.

</P>
<DT><STRONG><A NAME="item_SSLEAY_PLATFORM">SSLEAY_PLATFORM</A></STRONG><DD>
<P>
The ``Configure'' target of the library build in the form ``platform: ...''
if available or ``platform: information not available'' otherwise.

</P>
<DT><STRONG><A NAME="item_SSLEAY_DIR">SSLEAY_DIR</A></STRONG><DD>
<P>
The ``OPENSSLDIR'' setting of the library build in the form ``OPENSSLDIR:
''...``'' if available or ``OPENSSLDIR: N/A'' otherwise.

</P>
</DL>
<P>
For an unknown <STRONG>t</STRONG>, the text ``not available'' is returned.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUE">RETURN VALUE</A></H1>
<P>
The version number.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/crypto.html#">crypto(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>SSLeay()</CODE> and SSLEAY_VERSION_NUMBER are available in all
versions of SSLeay and OpenSSL. OPENSSL_VERSION_NUMBER is available in all
versions of OpenSSL.
<STRONG>SSLEAY_DIR</STRONG> was added in OpenSSL 0.9.7.

</P>
:}


