diff options
author | jsorg71 <jsorg71> | 2007-07-03 01:14:59 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2007-07-03 01:14:59 +0000 |
commit | 76a8cf16898e296047a9f1214fbc7dfa279dcf10 (patch) | |
tree | 00b89ca020a78944aee5fd2909839ef78bf9f285 /common/ssl_calls.c | |
parent | 0a604248541bb76785de4ff83104f0114cbce574 (diff) | |
download | xrdp-proprietary-76a8cf16898e296047a9f1214fbc7dfa279dcf10.tar.gz xrdp-proprietary-76a8cf16898e296047a9f1214fbc7dfa279dcf10.zip |
check for old openssl library for key gen
Diffstat (limited to 'common/ssl_calls.c')
-rw-r--r-- | common/ssl_calls.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/ssl_calls.c b/common/ssl_calls.c index 4d6414a3..1ab0f132 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -31,6 +31,11 @@ #include "arch.h" #include "ssl_calls.h" +#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090800f) +#else +#define OLD_RSA_GEN1 +#endif + /* rc4 stuff */ /*****************************************************************************/ @@ -240,7 +245,11 @@ ssl_gen_key_xrdp1(int key_size_in_bits, char* exp, int exp_len, my_e = BN_new(); BN_bin2bn((unsigned char*)lexp, exp_len, my_e); my_key = RSA_new(); +#if defined(OLD_RSA_GEN1) + error = 1; +#else error = RSA_generate_key_ex(my_key, key_size_in_bits, my_e, 0) == 0; +#endif if (error == 0) { len = BN_num_bytes(my_key->n); |