diff options
author | jlam <jlam> | 2000-08-11 05:37:09 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-08-11 05:37:09 +0000 |
commit | 2a3f9ce9aec855cc0867ea1ea720553846de5c6e (patch) | |
tree | 42e333b49fd5611a3738120dea7507635e271889 /security/openssh | |
parent | 7b67dacc128e6d61eabfd4005e3f44a69530e578 (diff) | |
download | pkgsrc-2a3f9ce9aec855cc0867ea1ea720553846de5c6e.tar.gz |
When looking for -lcrypto, test linking with:
-lcrypto NetBSD-1.5*
-lcrypto -lrsaref OpenSSL and USE_RSAREF2=NO
-lcrypto -lRSAglue -lrsaref OpenSSL and USE_RSAREF2=YES
and use the first set of libraries which work.
Closes the following PRs: 9820, 10268, 10681.
Diffstat (limited to 'security/openssh')
-rw-r--r-- | security/openssh/files/patch-sum | 3 | ||||
-rw-r--r-- | security/openssh/patches/patch-aa | 74 |
2 files changed, 76 insertions, 1 deletions
diff --git a/security/openssh/files/patch-sum b/security/openssh/files/patch-sum index 7dbb44d9f41..e8eebb4bf4c 100644 --- a/security/openssh/files/patch-sum +++ b/security/openssh/files/patch-sum @@ -1,5 +1,6 @@ -$NetBSD: patch-sum,v 1.16 2000/08/11 05:19:44 jlam Exp $ +$NetBSD: patch-sum,v 1.17 2000/08/11 05:37:09 jlam Exp $ +MD5 (patch-aa) = 62c8080b999943e9a5fffb32ef38ee74 MD5 (patch-ae) = 62afcf06805bd3ae1337e4f9cf15fd93 MD5 (patch-ah) = 4259ece36472f4c21a6344ce61e6b344 MD5 (patch-aj) = 5397d9fbfe54544fd186831cfe979329 diff --git a/security/openssh/patches/patch-aa b/security/openssh/patches/patch-aa new file mode 100644 index 00000000000..89d99b0c176 --- /dev/null +++ b/security/openssh/patches/patch-aa @@ -0,0 +1,74 @@ +$NetBSD: patch-aa,v 1.10 2000/08/11 05:37:10 jlam Exp $ + +--- configure.in.orig Sat Jul 15 00:59:14 2000 ++++ configure.in Fri Aug 11 00:38:43 2000 +@@ -319,6 +319,7 @@ + saved_LIBS="$LIBS" + saved_LDFLAGS="$LDFLAGS" + saved_CFLAGS="$CFLAGS" ++crypto_LIBS="" + if test "x$prefix" != "xNONE" ; then + tryssldir="$tryssldir $prefix" + fi +@@ -335,12 +336,25 @@ + LDFLAGS="$saved_LDFLAGS" + fi + +- LIBS="$saved_LIBS -lcrypto" +- +- # Basic test to check for compatible version and correct linking +- # *does not* test for RSA - that comes later. +- AC_TRY_RUN( +- [ ++ # Some ELF systems can't resolve all the symbols in libcrypto ++ # if libcrypto was linked against RSAREF, and fail to link the ++ # test program correctly, even though a correct installation ++ # of OpenSSL exists. So we test the linking three times in ++ # case the RSAREF libraries are needed right away. We'll test ++ # for them explicitly later on. ++ # ++ for libcrypto in \ ++ "-lcrypto" \ ++ "-lcrypto -lrsaref" \ ++ "-lcrypto -lRSAglue -lrsaref" ++ do ++ LIBS="$saved_LIBS $libcrypto" ++ ++ # Basic test to check for compatible version and ++ # correct linking *does not* test for RSA - that comes ++ # later. ++ AC_TRY_RUN( ++ [ + #include <string.h> + #include <openssl/rand.h> + int main(void) +@@ -350,12 +364,14 @@ + RAND_add(a, sizeof(a), sizeof(a)); + return(RAND_status() <= 0); + } +- ], +- [ +- found_crypto=1 +- break; +- ], [] +- ) ++ ], ++ [ ++ found_crypto=1 ++ crypto_LIBS=$libcrypto ++ break; ++ ], [] ++ ) ++ done + + if test ! -z "$found_crypto" ; then + break; +@@ -385,7 +401,7 @@ + blibpath="$blibpath:$ssldir:$ssldir/lib" + fi + fi +-LIBS="$saved_LIBS -lcrypto" ++LIBS="$saved_LIBS $crypto_LIBS" + + # Now test RSA support + saved_LIBS="$LIBS" |