opensslv.h revision 296465
1139825Simp#ifndef HEADER_OPENSSLV_H
21541Srgrimes# define HEADER_OPENSSLV_H
31541Srgrimes
41541Srgrimes/*-
51541Srgrimes * Numeric release version identifier:
61541Srgrimes * MNNFFPPS: major minor fix patch status
71541Srgrimes * The status nibble has one of the values 0 for development, 1 to e for betas
81541Srgrimes * 1 to 14, and f for release.  The patch level is exactly that.
91541Srgrimes * For example:
101541Srgrimes * 0.9.3-dev      0x00903000
111541Srgrimes * 0.9.3-beta1    0x00903001
121541Srgrimes * 0.9.3-beta2-dev 0x00903002
131541Srgrimes * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
141541Srgrimes * 0.9.3          0x0090300f
151541Srgrimes * 0.9.3a         0x0090301f
161541Srgrimes * 0.9.4          0x0090400f
171541Srgrimes * 1.2.3z         0x102031af
181541Srgrimes *
191541Srgrimes * For continuity reasons (because 0.9.5 is already out, and is coded
201541Srgrimes * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
211541Srgrimes * part is slightly different, by setting the highest bit.  This means
221541Srgrimes * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
231541Srgrimes * with 0x0090600S...
241541Srgrimes *
251541Srgrimes * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
261541Srgrimes * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
271541Srgrimes *  major minor fix final patch/beta)
281541Srgrimes */
291541Srgrimes# define OPENSSL_VERSION_NUMBER  0x0090821fL
3050477Speter# ifdef OPENSSL_FIPS
311541Srgrimes#  define OPENSSL_VERSION_TEXT    "OpenSSL 0.9.8zh-fips 3 Dec 2015"
321541Srgrimes# else
331541Srgrimes#  define OPENSSL_VERSION_TEXT    "OpenSSL 0.9.8zh-freebsd 3 Dec 2015"
341541Srgrimes# endif
351541Srgrimes# define OPENSSL_VERSION_PTEXT   " part of " OPENSSL_VERSION_TEXT
36103731Swollman
3734319Sdufault/*-
38103731Swollman * The macros below are to be used for shared library (.so, .dll, ...)
39103731Swollman * versioning.  That kind of versioning works a bit differently between
40103731Swollman * operating systems.  The most usual scheme is to set a major and a minor
41103731Swollman * number, and have the runtime loader check that the major number is equal
42103731Swollman * to what it was at application link time, while the minor number has to
43103731Swollman * be greater or equal to what it was at application link time.  With this
44103731Swollman * scheme, the version number is usually part of the file name, like this:
45103731Swollman *
46103731Swollman *      libcrypto.so.0.9
47103731Swollman *
48103731Swollman * Some unixen also make a softlink with the major verson number only:
49103731Swollman *
50103731Swollman *      libcrypto.so.0
51103731Swollman *
52103731Swollman * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
53103731Swollman * shared library version is stored in the file, and is actually a series
54103731Swollman * of versions, separated by colons.  The rightmost version present in the
55103731Swollman * library when linking an application is stored in the application to be
56103731Swollman * matched at run time.  When the application is run, a check is done to
57103731Swollman * see if the library version stored in the application matches any of the
58106055Swollman * versions in the version string of the library itself.
59103731Swollman * This version string can be constructed in any way, depending on what
60103731Swollman * kind of matching is desired.  However, to implement the same scheme as
61103731Swollman * the one used in the other unixen, all compatible versions, from lowest
62103731Swollman * to highest, should be part of the string.  Consecutive builds would
63103731Swollman * give the following versions strings:
64103731Swollman *
65103731Swollman *      3.0
66103731Swollman *      3.0:3.1
67103731Swollman *      3.0:3.1:3.2
68103731Swollman *      4.0
69103731Swollman *      4.0:4.1
70103731Swollman *
71103731Swollman * Notice how version 4 is completely incompatible with version, and
72103731Swollman * therefore give the breach you can see.
73103731Swollman *
74103731Swollman * There may be other schemes as well that I haven't yet discovered.
75103731Swollman *
76103731Swollman * So, here's the way it works here: first of all, the library version
77103731Swollman * number doesn't need at all to match the overall OpenSSL version.
781541Srgrimes * However, it's nice and more understandable if it actually does.
79103731Swollman * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
80103731Swollman * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
81103731Swollman * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
82103731Swollman * we need to keep a history of version numbers, which is done in the
83103731Swollman * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
841541Srgrimes * should only keep the versions that are binary compatible with the current.
8520640Sbde */
8620640Sbde# define SHLIB_VERSION_HISTORY ""
8720640Sbde# define SHLIB_VERSION_NUMBER "6"
88103731Swollman
89103731Swollman#endif                          /* HEADER_OPENSSLV_H */
901541Srgrimes