+/* $OpenBSD: ssh-rsa.c,v 1.39 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>
*
* 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"
if (ok != 1) {
int ecode = ERR_get_error();
+
error("ssh_rsa_sign: RSA_sign failed: %s",
ERR_error_string(ecode, NULL));
xfree(sig);
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;
break;
default:
goto done;
- break;
}
if (hashlen != hlen) {
error("bad hashlen");