diff options
author | David Phillips <david@sighup.nz> | 2017-05-01 15:13:58 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-05-01 15:13:58 +1200 |
commit | 8ca8230a72bd72ae1ae2b522df15d12c8fd7aa60 (patch) | |
tree | a85bf852c59ad7e9bc3d64379699a3456c669621 | |
parent | 3537d499b464b0f775e720ea7a297f760b3a9523 (diff) | |
download | sand-leek-8ca8230a72bd72ae1ae2b522df15d12c8fd7aa60.tar.xz |
Bail on error updating d in key
-rw-r--r-- | sand-leek.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sand-leek.c b/sand-leek.c index 04bc304..690da62 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -194,8 +194,10 @@ work(void *arg) { /* much tidier to be honest */ BN_set_word(rsa_key->e, e); #endif - /* FIXME check for errors */ - key_update_d(rsa_key); + if (key_update_d(rsa_key)) { + printf("Error updating d component of RSA key, stop.\n"); + goto STOP; + } if (RSA_check_key(rsa_key) == 1) { fprintf(stderr, "Key valid\n"); |