diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2003-03-14 15:49:37 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2003-03-14 15:49:37 +0000 |
commit | d9c008dba06b930e9456c6736e488ec94623c54b (patch) | |
tree | c17860b48dccf8ab05a368002e020914364035c5 /lib/libkeynote/signature.c | |
parent | b322e96a0084beb6e07da63eb2b588a633185888 (diff) |
RSA blinding on private keys. angelos@ ok.
Diffstat (limited to 'lib/libkeynote/signature.c')
-rw-r--r-- | lib/libkeynote/signature.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libkeynote/signature.c b/lib/libkeynote/signature.c index 45d2b5c1afe..1ea58b5fe44 100644 --- a/lib/libkeynote/signature.c +++ b/lib/libkeynote/signature.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signature.c,v 1.14 2002/06/17 19:39:20 angelos Exp $ */ +/* $OpenBSD: signature.c,v 1.15 2003/03/14 15:49:36 ho Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) * @@ -565,6 +565,14 @@ kn_decode_key(struct keynote_deckey *dc, char *key, int keytype) keynote_errno = ERROR_SYNTAX; /* Could be a memory error */ return -1; } + if (RSA_blinding_on ((RSA *) kk, NULL) != 1) + { + if (ptr != (unsigned char *) NULL) + free(ptr); + RSA_free(kk); + keynote_errno = ERROR_MEMORY; + return -1; + } } else { |