summaryrefslogtreecommitdiff
path: root/openbsd-compat/openssl-compat.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2011-01-22 09:37:01 +1100
committerDarren Tucker <dtucker@zip.com.au>2011-01-22 09:37:01 +1100
commit79241377df7fdd34a05d0565c7c5fb48ef6492a5 (patch)
treee1126a9f3a12d12694e091da49be472a71cd4f2f /openbsd-compat/openssl-compat.c
parente323ebc250bb25c51a27be4b34190bf5a371f50b (diff)
- (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add
RSA_get_default_method() for the benefit of openssl versions that don't have it (at least openssl-engine-0.9.6b). Found and tested by Kevin Brott, ok djm@.
Diffstat (limited to 'openbsd-compat/openssl-compat.c')
-rw-r--r--openbsd-compat/openssl-compat.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index eb5ae7f8..b617fdf1 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
-/* $Id: openssl-compat.c,v 1.12 2010/12/04 21:46:05 dtucker Exp $ */
+/* $Id: openssl-compat.c,v 1.13 2011/01/21 22:37:06 dtucker Exp $ */
/*
* Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -26,6 +26,10 @@
# include <openssl/conf.h>
#endif
+#ifndef HAVE_RSA_GET_DEFAULT_METHOD
+# include <openssl/rsa.h>
+#endif
+
#include "log.h"
#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS
@@ -120,6 +124,14 @@ DSA_generate_parameters_ex(DSA *dsa, int bits, const unsigned char *seed,
}
#endif
+#ifndef HAVE_RSA_GET_DEFAULT_METHOD
+RSA_METHOD *
+RSA_get_default_method(void)
+{
+ return RSA_PKCS1_SSLeay();
+}
+#endif
+
#ifdef USE_OPENSSL_ENGINE
void
ssh_SSLeay_add_all_algorithms(void)