aboutsummaryrefslogtreecommitdiff
path: root/sand-leek.c
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-04-27 14:57:25 +1200
committerDavid Phillips <david@sighup.nz>2017-04-27 14:57:25 +1200
commitbdc7b9ff596cd72cccfb4e5bbf476e22a0008b7f (patch)
treeb413437ca9e90d59d9538b272a6ac4b4a4fe2cda /sand-leek.c
parent15cbf32453607a0b5ade99b7af028149ab10713a (diff)
downloadsand-leek-bdc7b9ff596cd72cccfb4e5bbf476e22a0008b7f.tar.xz
Put correct exponent value into eported key
Diffstat (limited to 'sand-leek.c')
-rw-r--r--sand-leek.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sand-leek.c b/sand-leek.c
index 7cf0df1..642a057 100644
--- a/sand-leek.c
+++ b/sand-leek.c
@@ -103,6 +103,11 @@ work(void *arg) {
b32[16] = '\0';
if(strncmp(b32, search, search_len) == 0) {
printf("Found %s.onion\n", b32);
+
+ /* update the BN e with working e */
+ BN_set_word(be, e);
+ RSA_set0_key(rsa_key, NULL, be, NULL);
+
EVP_PKEY *evp_key = EVP_PKEY_new();
if (!EVP_PKEY_assign_RSA(evp_key, rsa_key)) {
fprintf(stderr, "EVP_PKEY assignment failed\n");