[ssh-rsa.c]
     ssh_rsa_sign/verify: SSH_BUG_SIGBLOB not supported
This commit is contained in:
Damien Miller 2001-11-12 11:03:16 +11:00
parent 9f64390f41
commit 9af8c3c226
2 changed files with 13 additions and 2 deletions

View File

@ -27,6 +27,9 @@
[packet.c packet.h sshconnect2.c]
pad using the padding field from the ssh2 packet instead of sending
extra ignore messages. tested against several other ssh servers.
- markus@cvs.openbsd.org 2001/11/07 21:40:21
[ssh-rsa.c]
ssh_rsa_sign/verify: SSH_BUG_SIGBLOB not supported
20011109
- (stevesk) auth-pam.c: use do_pam_authenticate(PAM_DISALLOW_NULL_AUTHTOK)
@ -6836,4 +6839,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.1642 2001/11/12 00:02:52 djm Exp $
$Id: ChangeLog,v 1.1643 2001/11/12 00:03:16 djm Exp $

View File

@ -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));