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 eb5ae7f85..b617fdf19 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.c,v 1.12 2010/12/04 21:46:05 dtucker Exp $ */ 1/* $Id: openssl-compat.c,v 1.13 2011/01/21 22:37:06 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -26,6 +26,10 @@
26# include <openssl/conf.h> 26# include <openssl/conf.h>
27#endif 27#endif
28 28
29#ifndef HAVE_RSA_GET_DEFAULT_METHOD
30# include <openssl/rsa.h>
31#endif
32
29#include "log.h" 33#include "log.h"
30 34
31#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS 35#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS
@@ -120,6 +124,14 @@ DSA_generate_parameters_ex(DSA *dsa, int bits, const unsigned char *seed,
120} 124}
121#endif 125#endif
122 126
127#ifndef HAVE_RSA_GET_DEFAULT_METHOD
128RSA_METHOD *
129RSA_get_default_method(void)
130{
131 return RSA_PKCS1_SSLeay();
132}
133#endif
134
123#ifdef USE_OPENSSL_ENGINE 135#ifdef USE_OPENSSL_ENGINE
124void 136void
125ssh_SSLeay_add_all_algorithms(void) 137ssh_SSLeay_add_all_algorithms(void)