diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-11-07 21:40:22 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-11-07 21:40:22 +0000 |
commit | 56d6e8bacefe690d9c27fccebdebbc1caafa6bf0 (patch) | |
tree | 5a300dafc3106f7f42dee11b2448abf0f41a2111 /usr.bin | |
parent | 3acaf22e6e221b07e2aed4cacc43765a4e16030c (diff) |
ssh_rsa_sign/verify: SSH_BUG_SIGBLOB not supported
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh-rsa.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-rsa.c b/usr.bin/ssh/ssh-rsa.c index 15ce5e977f0..27a6c5a533f 100644 --- a/usr.bin/ssh/ssh-rsa.c +++ b/usr.bin/ssh/ssh-rsa.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-rsa.c,v 1.10 2001/09/17 19:27:15 stevesk Exp $"); +RCSID("$OpenBSD: ssh-rsa.c,v 1.11 2001/11/07 21:40:21 markus Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -54,6 +54,10 @@ ssh_rsa_sign( error("ssh_rsa_sign: no RSA key"); return -1; } + if (datafellows & SSH_BUG_SIGBLOB) { + error("ssh_rsa_sign: SSH_BUG_SIGBLOB not supported"); + return -1; + } nid = (datafellows & SSH_BUG_RSASIGMD5) ? NID_md5 : NID_sha1; if ((evp_md = EVP_get_digestbynid(nid)) == NULL) { error("ssh_rsa_sign: EVP_get_digestbynid %d failed", nid); @@ -124,6 +128,10 @@ ssh_rsa_verify( error("ssh_rsa_verify: no RSA key"); return -1; } + if (datafellows & SSH_BUG_SIGBLOB) { + error("ssh_rsa_verify: SSH_BUG_SIGBLOB not supported"); + return -1; + } if (BN_num_bits(key->rsa->n) < 768) { error("ssh_rsa_verify: n too small: %d bits", BN_num_bits(key->rsa->n)); |