summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authordjm <djm>2002-01-22 12:09:22 +0000
committerdjm <djm>2002-01-22 12:09:22 +0000
commit29a88c5bb55927a7d8ca53a5b5089f7474765bc6 (patch)
treed06b1746d357f3f90ba9255aa3343ffaed26b650 /authfile.c
parent35fc43990c0cf8c3e28afed01d1f7d1cd942d540 (diff)
downloadopenssh-29a88c5bb55927a7d8ca53a5b5089f7474765bc6.tar.gz
- markus@cvs.openbsd.org 2001/12/27 18:22:16
[auth1.c authfile.c auth-rsa.c dh.c kexdh.c kexgex.c key.c rsa.c scard.c ssh-agent.c sshconnect1.c sshd.c ssh-dss.c] call fatal() for openssl allocation failures
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/authfile.c b/authfile.c
index 3bfca4ac..cd600362 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.42 2001/12/19 17:16:13 stevesk Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.43 2001/12/27 18:22:16 markus Exp $");
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -316,8 +316,6 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase,
char *cp;
CipherContext ciphercontext;
Cipher *cipher;
- BN_CTX *ctx;
- BIGNUM *aux;
Key *prv = NULL;
len = lseek(fd, (off_t) 0, SEEK_END);
@@ -406,17 +404,7 @@ key_load_private_rsa1(int fd, const char *filename, const char *passphrase,
buffer_get_bignum(&decrypted, prv->rsa->p); /* q */
/* calculate p-1 and q-1 */
- ctx = BN_CTX_new();
- aux = BN_new();
-
- BN_sub(aux, prv->rsa->q, BN_value_one());
- BN_mod(prv->rsa->dmq1, prv->rsa->d, aux, ctx);
-
- BN_sub(aux, prv->rsa->p, BN_value_one());
- BN_mod(prv->rsa->dmp1, prv->rsa->d, aux, ctx);
-
- BN_clear_free(aux);
- BN_CTX_free(ctx);
+ rsa_generate_additional_parameters(prv->rsa);
buffer_free(&decrypted);
close(fd);