xref: /onnv-gate/usr/src/common/openssl/crypto/opensslv.h (revision 8545:a1b3fd5884fd)
10Sstevel@tonic-gate #ifndef HEADER_OPENSSLV_H
20Sstevel@tonic-gate #define HEADER_OPENSSLV_H
30Sstevel@tonic-gate 
40Sstevel@tonic-gate /* Numeric release version identifier:
50Sstevel@tonic-gate  * MNNFFPPS: major minor fix patch status
60Sstevel@tonic-gate  * The status nibble has one of the values 0 for development, 1 to e for betas
70Sstevel@tonic-gate  * 1 to 14, and f for release.  The patch level is exactly that.
80Sstevel@tonic-gate  * For example:
90Sstevel@tonic-gate  * 0.9.3-dev	  0x00903000
100Sstevel@tonic-gate  * 0.9.3-beta1	  0x00903001
110Sstevel@tonic-gate  * 0.9.3-beta2-dev 0x00903002
120Sstevel@tonic-gate  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
130Sstevel@tonic-gate  * 0.9.3	  0x0090300f
140Sstevel@tonic-gate  * 0.9.3a	  0x0090301f
152139Sjp161948  * 0.9.4	  0x0090400f
160Sstevel@tonic-gate  * 1.2.3z	  0x102031af
170Sstevel@tonic-gate  *
180Sstevel@tonic-gate  * For continuity reasons (because 0.9.5 is already out, and is coded
190Sstevel@tonic-gate  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
200Sstevel@tonic-gate  * part is slightly different, by setting the highest bit.  This means
210Sstevel@tonic-gate  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
220Sstevel@tonic-gate  * with 0x0090600S...
230Sstevel@tonic-gate  *
240Sstevel@tonic-gate  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
250Sstevel@tonic-gate  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
260Sstevel@tonic-gate  *  major minor fix final patch/beta)
270Sstevel@tonic-gate  */
282139Sjp161948 #define OPENSSL_VERSION_NUMBER	0x0090801fL
292139Sjp161948 #ifdef OPENSSL_FIPS
302139Sjp161948 #define OPENSSL_VERSION_TEXT	"OpenSSL 0.9.8a-fips 11 Oct 2005"
312139Sjp161948 #else
32*8545SJan.Pechanec@Sun.COM #define OPENSSL_VERSION_TEXT	"OpenSSL 0.9.8a 11 Oct 2005 " \
33*8545SJan.Pechanec@Sun.COM     "(+ security fixes for:" \
34*8545SJan.Pechanec@Sun.COM     " CVE-2006-2937" \
35*8545SJan.Pechanec@Sun.COM     " CVE-2006-2940" \
36*8545SJan.Pechanec@Sun.COM     " CVE-2006-3738" \
37*8545SJan.Pechanec@Sun.COM     " CVE-2006-4339" \
38*8545SJan.Pechanec@Sun.COM     " CVE-2006-4343" \
39*8545SJan.Pechanec@Sun.COM     " CVE-2007-3108" \
40*8545SJan.Pechanec@Sun.COM     " CVE-2007-4995" \
41*8545SJan.Pechanec@Sun.COM     " CVE-2007-5135" \
42*8545SJan.Pechanec@Sun.COM     " CVE-2008-5077" \
43*8545SJan.Pechanec@Sun.COM     ")"
44*8545SJan.Pechanec@Sun.COM 
452139Sjp161948 #endif
460Sstevel@tonic-gate #define OPENSSL_VERSION_PTEXT	" part of " OPENSSL_VERSION_TEXT
470Sstevel@tonic-gate 
480Sstevel@tonic-gate 
490Sstevel@tonic-gate /* The macros below are to be used for shared library (.so, .dll, ...)
500Sstevel@tonic-gate  * versioning.  That kind of versioning works a bit differently between
510Sstevel@tonic-gate  * operating systems.  The most usual scheme is to set a major and a minor
520Sstevel@tonic-gate  * number, and have the runtime loader check that the major number is equal
530Sstevel@tonic-gate  * to what it was at application link time, while the minor number has to
540Sstevel@tonic-gate  * be greater or equal to what it was at application link time.  With this
550Sstevel@tonic-gate  * scheme, the version number is usually part of the file name, like this:
560Sstevel@tonic-gate  *
570Sstevel@tonic-gate  *	libcrypto.so.0.9
580Sstevel@tonic-gate  *
590Sstevel@tonic-gate  * Some unixen also make a softlink with the major verson number only:
600Sstevel@tonic-gate  *
610Sstevel@tonic-gate  *	libcrypto.so.0
620Sstevel@tonic-gate  *
630Sstevel@tonic-gate  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
640Sstevel@tonic-gate  * shared library version is stored in the file, and is actually a series
650Sstevel@tonic-gate  * of versions, separated by colons.  The rightmost version present in the
660Sstevel@tonic-gate  * library when linking an application is stored in the application to be
670Sstevel@tonic-gate  * matched at run time.  When the application is run, a check is done to
680Sstevel@tonic-gate  * see if the library version stored in the application matches any of the
690Sstevel@tonic-gate  * versions in the version string of the library itself.
700Sstevel@tonic-gate  * This version string can be constructed in any way, depending on what
710Sstevel@tonic-gate  * kind of matching is desired.  However, to implement the same scheme as
720Sstevel@tonic-gate  * the one used in the other unixen, all compatible versions, from lowest
730Sstevel@tonic-gate  * to highest, should be part of the string.  Consecutive builds would
740Sstevel@tonic-gate  * give the following versions strings:
750Sstevel@tonic-gate  *
760Sstevel@tonic-gate  *	3.0
770Sstevel@tonic-gate  *	3.0:3.1
780Sstevel@tonic-gate  *	3.0:3.1:3.2
790Sstevel@tonic-gate  *	4.0
800Sstevel@tonic-gate  *	4.0:4.1
810Sstevel@tonic-gate  *
820Sstevel@tonic-gate  * Notice how version 4 is completely incompatible with version, and
830Sstevel@tonic-gate  * therefore give the breach you can see.
840Sstevel@tonic-gate  *
850Sstevel@tonic-gate  * There may be other schemes as well that I haven't yet discovered.
860Sstevel@tonic-gate  *
870Sstevel@tonic-gate  * So, here's the way it works here: first of all, the library version
880Sstevel@tonic-gate  * number doesn't need at all to match the overall OpenSSL version.
890Sstevel@tonic-gate  * However, it's nice and more understandable if it actually does.
900Sstevel@tonic-gate  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
910Sstevel@tonic-gate  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
920Sstevel@tonic-gate  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
930Sstevel@tonic-gate  * we need to keep a history of version numbers, which is done in the
940Sstevel@tonic-gate  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
950Sstevel@tonic-gate  * should only keep the versions that are binary compatible with the current.
960Sstevel@tonic-gate  */
970Sstevel@tonic-gate #define SHLIB_VERSION_HISTORY ""
982139Sjp161948 #define SHLIB_VERSION_NUMBER "0.9.8"
990Sstevel@tonic-gate 
1000Sstevel@tonic-gate 
1010Sstevel@tonic-gate #endif /* HEADER_OPENSSLV_H */
102