summaryrefslogtreecommitdiff
path: root/ssh-rsa.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-06-18 20:29:01 +1000
committerDamien Miller <djm@mindrot.org>2003-06-18 20:29:01 +1000
commit8c1d2e3926c483551c5a2b0e356d300ad2908d9e (patch)
treec8e5e281131acfe4f70880f146f219f3ed239809 /ssh-rsa.c
parent56a0bb07c47285fe78268c95650032ab0ea667cd (diff)
- markus@cvs.openbsd.org 2003/06/16 08:22:35
[ssh-rsa.c] make sure the signature has at least the expected length (don't insist on len == hlen + oidlen, since this breaks some smartcards) bugzilla #592; ok djm@
Diffstat (limited to 'ssh-rsa.c')
-rw-r--r--ssh-rsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-rsa.c b/ssh-rsa.c
index efbc9e664..db8e5e359 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-rsa.c,v 1.28 2003/02/12 09:33:04 markus Exp $"); 26RCSID("$OpenBSD: ssh-rsa.c,v 1.29 2003/06/16 08:22:35 markus Exp $");
27 27
28#include <openssl/evp.h> 28#include <openssl/evp.h>
29#include <openssl/err.h> 29#include <openssl/err.h>
@@ -247,8 +247,8 @@ openssh_RSA_verify(int type, u_char *hash, u_int hashlen,
247 ERR_error_string(ERR_get_error(), NULL)); 247 ERR_error_string(ERR_get_error(), NULL));
248 goto done; 248 goto done;
249 } 249 }
250 if (len != hlen + oidlen) { 250 if (len < hlen + oidlen) {
251 error("bad decrypted len: %d != %d + %d", len, hlen, oidlen); 251 error("bad decrypted len: %d < %d + %d", len, hlen, oidlen);
252 goto done; 252 goto done;
253 } 253 }
254 if (memcmp(decrypted, oid, oidlen) != 0) { 254 if (memcmp(decrypted, oid, oidlen) != 0) {