summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh-rsa.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2006-09-30 13:29:51 +0000
committerdes <des@FreeBSD.org>2006-09-30 13:29:51 +0000
commit2f35ce4773442329d7798ccfecd8db9dcdce89bf (patch)
treebba6f2fe7855d7b0095f9dc7720dc27bea4d1fdf /crypto/openssh/ssh-rsa.c
parent03ef9d989bf2619956d8c703362439e9be9257ca (diff)
downloadFreeBSD-src-2f35ce4773442329d7798ccfecd8db9dcdce89bf.zip
FreeBSD-src-2f35ce4773442329d7798ccfecd8db9dcdce89bf.tar.gz
Vendor import of OpenSSH 4.4p1.
Diffstat (limited to 'crypto/openssh/ssh-rsa.c')
-rw-r--r--crypto/openssh/ssh-rsa.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/crypto/openssh/ssh-rsa.c b/crypto/openssh/ssh-rsa.c
index eb422d0..0e16ff8 100644
--- a/crypto/openssh/ssh-rsa.c
+++ b/crypto/openssh/ssh-rsa.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: ssh-rsa.c,v 1.39 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>
*
@@ -13,16 +14,20 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+
#include "includes.h"
-RCSID("$OpenBSD: ssh-rsa.c,v 1.32 2005/06/17 02:44:33 djm Exp $");
+
+#include <sys/types.h>
#include <openssl/evp.h>
#include <openssl/err.h>
+#include <stdarg.h>
+#include <string.h>
+
#include "xmalloc.h"
#include "log.h"
#include "buffer.h"
-#include "bufaux.h"
#include "key.h"
#include "compat.h"
#include "ssh.h"
@@ -62,6 +67,7 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp,
if (ok != 1) {
int ecode = ERR_get_error();
+
error("ssh_rsa_sign: RSA_sign failed: %s",
ERR_error_string(ecode, NULL));
xfree(sig);
@@ -144,7 +150,7 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen,
u_int diff = modlen - len;
debug("ssh_rsa_verify: add padding: modlen %u > len %u",
modlen, len);
- sigblob = xrealloc(sigblob, modlen);
+ sigblob = xrealloc(sigblob, 1, modlen);
memmove(sigblob + diff, sigblob, len);
memset(sigblob, 0, diff);
len = modlen;
@@ -220,7 +226,6 @@ openssh_RSA_verify(int type, u_char *hash, u_int hashlen,
break;
default:
goto done;
- break;
}
if (hashlen != hlen) {
error("bad hashlen");
OpenPOWER on IntegriCloud