Blame SOURCES/openssl-1.0.2a-version.patch

cfec1a
diff -up openssl-1.0.2a/crypto/cversion.c.version openssl-1.0.2a/crypto/cversion.c
cfec1a
--- openssl-1.0.2a/crypto/cversion.c.version	2015-03-19 14:30:36.000000000 +0100
cfec1a
+++ openssl-1.0.2a/crypto/cversion.c	2015-04-21 16:48:56.285535316 +0200
a5ef24
@@ -62,7 +62,7 @@
cfec1a
 # include "buildinf.h"
a5ef24
 #endif
a5ef24
 
a5ef24
-const char *SSLeay_version(int t)
a5ef24
+const char *_current_SSLeay_version(int t)
cfec1a
 {
cfec1a
     if (t == SSLEAY_VERSION)
cfec1a
         return OPENSSL_VERSION_TEXT;
cfec1a
@@ -101,7 +101,40 @@ const char *SSLeay_version(int t)
cfec1a
     return ("not available");
cfec1a
 }
a5ef24
 
a5ef24
-unsigned long SSLeay(void)
a5ef24
+const char *_original_SSLeay_version(int t)
cfec1a
+{
cfec1a
+    if (t == SSLEAY_VERSION)
cfec1a
+        return "OpenSSL 1.0.0-fips 29 Mar 2010";
cfec1a
+    else
cfec1a
+        return _current_SSLeay_version(t);
cfec1a
+}
cfec1a
+
cfec1a
+const char *_original101_SSLeay_version(int t)
cfec1a
+{
cfec1a
+    if (t == SSLEAY_VERSION)
cfec1a
+        return "OpenSSL 1.0.1e-fips 11 Feb 2013";
cfec1a
+    else
cfec1a
+        return _current_SSLeay_version(t);
cfec1a
+}
a5ef24
+
a5ef24
+unsigned long _original_SSLeay(void)
cfec1a
+{
cfec1a
+    return (0x10000003L);
cfec1a
+}
cfec1a
+
cfec1a
+unsigned long _original101_SSLeay(void)
cfec1a
+{
cfec1a
+    return (0x1000105fL);
cfec1a
+}
a5ef24
+
a5ef24
+unsigned long _current_SSLeay(void)
cfec1a
 {
cfec1a
     return (SSLEAY_VERSION_NUMBER);
cfec1a
 }
cfec1a
+
a5ef24
+__asm__(".symver _original_SSLeay,SSLeay@");
a5ef24
+__asm__(".symver _original_SSLeay_version,SSLeay_version@");
cfec1a
+__asm__(".symver _original101_SSLeay,SSLeay@OPENSSL_1.0.1");
cfec1a
+__asm__(".symver _original101_SSLeay_version,SSLeay_version@OPENSSL_1.0.1");
cfec1a
+__asm__(".symver _current_SSLeay,SSLeay@@OPENSSL_1.0.2");
cfec1a
+__asm__(".symver _current_SSLeay_version,SSLeay_version@@OPENSSL_1.0.2");
cfec1a
diff -up openssl-1.0.2a/Makefile.shared.version openssl-1.0.2a/Makefile.shared
cfec1a
--- openssl-1.0.2a/Makefile.shared.version	2015-04-21 16:43:02.624170648 +0200
cfec1a
+++ openssl-1.0.2a/Makefile.shared	2015-04-21 16:43:02.676171879 +0200
a5ef24
@@ -151,7 +151,7 @@ DO_GNU_SO=$(CALC_VERSIONS); \
a5ef24
 	SHLIB_SUFFIX=; \
a5ef24
 	ALLSYMSFLAGS='-Wl,--whole-archive'; \
a5ef24
 	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
a5ef24
-	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
a5ef24
+	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--default-symver,--version-script=version.map -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
a5ef24
 
a5ef24
 DO_GNU_APP=LDFLAGS="$(CFLAGS)"
a5ef24
 
cfec1a
diff -up openssl-1.0.2a/version.map.version openssl-1.0.2a/version.map
cfec1a
--- openssl-1.0.2a/version.map.version	2015-04-21 16:43:02.676171879 +0200
cfec1a
+++ openssl-1.0.2a/version.map	2015-04-21 16:51:49.621630589 +0200
cfec1a
@@ -0,0 +1,13 @@
a5ef24
+OPENSSL_1.0.1 {
a5ef24
+    global:
a5ef24
+	    SSLeay;
a5ef24
+	    SSLeay_version;
a5ef24
+    local:
a5ef24
+	    _original*;
a5ef24
+	    _current*;
a5ef24
+};
cfec1a
+OPENSSL_1.0.2 {
cfec1a
+    global:
cfec1a
+	    SSLeay;
cfec1a
+	    SSLeay_version;
cfec1a
+} OPENSSL_1.0.1;