Blob Blame History Raw
diff -up openssl-1.0.1e/crypto/cversion.c.version openssl-1.0.1e/crypto/cversion.c
--- openssl-1.0.1e/crypto/cversion.c.version	2013-02-11 16:02:47.000000000 +0100
+++ openssl-1.0.1e/crypto/cversion.c	2013-07-26 12:28:12.739161925 +0200
@@ -62,7 +62,7 @@
 #include "buildinf.h"
 #endif
 
-const char *SSLeay_version(int t)
+const char *_current_SSLeay_version(int t)
 	{
 	if (t == SSLEAY_VERSION)
 		return OPENSSL_VERSION_TEXT;
@@ -110,8 +110,25 @@ const char *SSLeay_version(int t)
 	return("not available");
 	}
 
-unsigned long SSLeay(void)
+const char *_original_SSLeay_version(int t)
+	{
+	if (t == SSLEAY_VERSION)
+		return "OpenSSL 1.0.0-fips 29 Mar 2010";
+	else
+		return _current_SSLeay_version(t);
+	}
+
+unsigned long _original_SSLeay(void)
+	{
+	return(0x10000003);
+	}
+
+unsigned long _current_SSLeay(void)
 	{
 	return(SSLEAY_VERSION_NUMBER);
 	}
 
+__asm__(".symver _original_SSLeay,SSLeay@");
+__asm__(".symver _original_SSLeay_version,SSLeay_version@");
+__asm__(".symver _current_SSLeay,SSLeay@@OPENSSL_1.0.1");
+__asm__(".symver _current_SSLeay_version,SSLeay_version@@OPENSSL_1.0.1");
diff -up openssl-1.0.1e/Makefile.shared.version openssl-1.0.1e/Makefile.shared
--- openssl-1.0.1e/Makefile.shared.version	2013-07-26 12:23:43.615545603 +0200
+++ openssl-1.0.1e/Makefile.shared	2013-07-26 12:23:43.701547398 +0200
@@ -151,7 +151,7 @@ DO_GNU_SO=$(CALC_VERSIONS); \
 	SHLIB_SUFFIX=; \
 	ALLSYMSFLAGS='-Wl,--whole-archive'; \
 	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--default-symver,--version-script=version.map -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
 
 DO_GNU_APP=LDFLAGS="$(CFLAGS)"
 
diff -up openssl-1.0.1e/version.map.version openssl-1.0.1e/version.map
--- openssl-1.0.1e/version.map.version	2013-07-26 12:23:43.701547398 +0200
+++ openssl-1.0.1e/version.map	2013-07-26 12:29:10.698371472 +0200
@@ -0,0 +1,8 @@
+OPENSSL_1.0.1 {
+    global:
+	    SSLeay;
+	    SSLeay_version;
+    local:
+	    _original*;
+	    _current*;
+};