155714Skris#ifndef HEADER_OPENSSLV_H
2280304Sjkim# define HEADER_OPENSSLV_H
355714Skris
4273149Sjkim#ifdef  __cplusplus
5273149Sjkimextern "C" {
6273149Sjkim#endif
7273149Sjkim
8280304Sjkim/*-
9280304Sjkim * Numeric release version identifier:
1079998Skris * MNNFFPPS: major minor fix patch status
1159191Skris * The status nibble has one of the values 0 for development, 1 to e for betas
1259191Skris * 1 to 14, and f for release.  The patch level is exactly that.
1355714Skris * For example:
14280304Sjkim * 0.9.3-dev      0x00903000
15280304Sjkim * 0.9.3-beta1    0x00903001
1659191Skris * 0.9.3-beta2-dev 0x00903002
1759191Skris * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
18280304Sjkim * 0.9.3          0x0090300f
19280304Sjkim * 0.9.3a         0x0090301f
20280304Sjkim * 0.9.4          0x0090400f
21280304Sjkim * 1.2.3z         0x102031af
2259191Skris *
2359191Skris * For continuity reasons (because 0.9.5 is already out, and is coded
2459191Skris * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
2559191Skris * part is slightly different, by setting the highest bit.  This means
2659191Skris * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
2759191Skris * with 0x0090600S...
2859191Skris *
2955714Skris * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
3059191Skris * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
3159191Skris *  major minor fix final patch/beta)
3255714Skris */
33296317Sdelphij# define OPENSSL_VERSION_NUMBER  0x1000113fL
34280304Sjkim# ifdef OPENSSL_FIPS
35296317Sdelphij#  define OPENSSL_VERSION_TEXT    "OpenSSL 1.0.1s-fips  1 Mar 2016"
36280304Sjkim# else
37296317Sdelphij#  define OPENSSL_VERSION_TEXT    "OpenSSL 1.0.1s-freebsd  1 Mar 2016"
38280304Sjkim# endif
39280304Sjkim# define OPENSSL_VERSION_PTEXT   " part of " OPENSSL_VERSION_TEXT
4055714Skris
41280304Sjkim/*-
42280304Sjkim * The macros below are to be used for shared library (.so, .dll, ...)
4368651Skris * versioning.  That kind of versioning works a bit differently between
4468651Skris * operating systems.  The most usual scheme is to set a major and a minor
4568651Skris * number, and have the runtime loader check that the major number is equal
4668651Skris * to what it was at application link time, while the minor number has to
4768651Skris * be greater or equal to what it was at application link time.  With this
4868651Skris * scheme, the version number is usually part of the file name, like this:
4968651Skris *
50280304Sjkim *      libcrypto.so.0.9
5168651Skris *
5268651Skris * Some unixen also make a softlink with the major verson number only:
5368651Skris *
54280304Sjkim *      libcrypto.so.0
5568651Skris *
5689837Skris * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
5789837Skris * shared library version is stored in the file, and is actually a series
5889837Skris * of versions, separated by colons.  The rightmost version present in the
5989837Skris * library when linking an application is stored in the application to be
6089837Skris * matched at run time.  When the application is run, a check is done to
6189837Skris * see if the library version stored in the application matches any of the
6289837Skris * versions in the version string of the library itself.
6368651Skris * This version string can be constructed in any way, depending on what
6468651Skris * kind of matching is desired.  However, to implement the same scheme as
6568651Skris * the one used in the other unixen, all compatible versions, from lowest
6668651Skris * to highest, should be part of the string.  Consecutive builds would
6768651Skris * give the following versions strings:
6868651Skris *
69280304Sjkim *      3.0
70280304Sjkim *      3.0:3.1
71280304Sjkim *      3.0:3.1:3.2
72280304Sjkim *      4.0
73280304Sjkim *      4.0:4.1
7468651Skris *
7568651Skris * Notice how version 4 is completely incompatible with version, and
7668651Skris * therefore give the breach you can see.
7768651Skris *
7868651Skris * There may be other schemes as well that I haven't yet discovered.
7968651Skris *
8068651Skris * So, here's the way it works here: first of all, the library version
8168651Skris * number doesn't need at all to match the overall OpenSSL version.
8268651Skris * However, it's nice and more understandable if it actually does.
8368651Skris * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
8468651Skris * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
8589837Skris * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
8668651Skris * we need to keep a history of version numbers, which is done in the
8768651Skris * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
8868651Skris * should only keep the versions that are binary compatible with the current.
8968651Skris */
90280304Sjkim# define SHLIB_VERSION_HISTORY ""
91280304Sjkim# define SHLIB_VERSION_NUMBER "7"
9268651Skris
9368651Skris
94273149Sjkim#ifdef  __cplusplus
95273149Sjkim}
96273149Sjkim#endif
97280304Sjkim#endif                          /* HEADER_OPENSSLV_H */
98