[perl-openssl-defaults] 03/04: OpenSSL <1.1 source compatibility

ntyni at debian.org ntyni at debian.org
Thu Dec 22 13:31:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository perl-openssl-defaults.

commit bf9c949414fa152e8b1666bc7115d8d57b1443bb
Author: Niko Tyni <ntyni at debian.org>
Date:   Thu Dec 22 13:56:49 2016 +0200

    OpenSSL <1.1 source compatibility
    
    SSLeay_version() was renamed to OpenSSL_version() in 1.1,
    support both for now.
---
 openssl-version.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/openssl-version.c b/openssl-version.c
index 971d597..35ee19a 100644
--- a/openssl-version.c
+++ b/openssl-version.c
@@ -4,5 +4,11 @@
 /* trivial program for linking against OpenSSL */
 
 int main (void) {
-    printf("%s\n", OpenSSL_version(OPENSSL_VERSION));
+    const char *version;
+  #if OPENSSL_API_COMPAT < 0x10100000L
+    version = SSLeay_version(SSLEAY_VERSION);
+  #else
+    version = OpenSSL_version(OPENSSL_VERSION);
+  #endif
+    printf("%s\n", version);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/perl-openssl-defaults.git



More information about the Pkg-perl-cvs-commits mailing list