diff options
author | David Phillips <david@sighup.nz> | 2017-04-27 18:01:06 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-04-27 18:01:06 +1200 |
commit | 086da63ee2f47957ae13110674fef82049ec2d03 (patch) | |
tree | 84d13cb85f55fde5daa65f0e7318da60545419c9 | |
parent | ba2a790092786cd520e00c0ac1d551259ee91b0f (diff) | |
download | sand-leek-086da63ee2f47957ae13110674fef82049ec2d03.tar.xz |
Add compat for openssl < 1.1
-rw-r--r-- | sand-leek.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sand-leek.c b/sand-leek.c index 20a545c..8a6b14a 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -110,9 +110,13 @@ work(void *arg) { if(strncmp(b32, search, search_len) == 0) { printf("Found %s.onion\n", b32); +#if OPENSSL_VERSION >= 0x10100000L /* update the BN e with working e */ BN_set_word(be, e); RSA_set0_key(rsa_key, NULL, be, NULL); +#else + BN_set_word(rsa_key->e, e); +#endif EVP_PKEY *evp_key = EVP_PKEY_new(); if (!EVP_PKEY_assign_RSA(evp_key, rsa_key)) { |