summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh-pkcs11-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/ssh-pkcs11-helper.c')
-rw-r--r--crypto/openssh/ssh-pkcs11-helper.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/openssh/ssh-pkcs11-helper.c b/crypto/openssh/ssh-pkcs11-helper.c
index b7c52be..f2d5863 100644
--- a/crypto/openssh/ssh-pkcs11-helper.c
+++ b/crypto/openssh/ssh-pkcs11-helper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11-helper.c,v 1.7 2013/12/02 02:56:17 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11-helper.c,v 1.11 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
*
@@ -169,7 +169,7 @@ process_sign(void)
{
u_char *blob, *data, *signature = NULL;
u_int blen, dlen, slen = 0;
- int ok = -1, ret;
+ int ok = -1;
Key *key, *found;
Buffer msg;
@@ -179,6 +179,9 @@ process_sign(void)
if ((key = key_from_blob(blob, blen)) != NULL) {
if ((found = lookup_key(key)) != NULL) {
+#ifdef WITH_OPENSSL
+ int ret;
+
slen = RSA_size(key->rsa);
signature = xmalloc(slen);
if ((ret = RSA_private_encrypt(dlen, data, signature,
@@ -186,6 +189,7 @@ process_sign(void)
slen = ret;
ok = 0;
}
+#endif /* WITH_OPENSSL */
}
key_free(key);
}
@@ -297,8 +301,8 @@ main(int argc, char **argv)
buffer_init(&oqueue);
set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
- rset = (fd_set *)xmalloc(set_size);
- wset = (fd_set *)xmalloc(set_size);
+ rset = xmalloc(set_size);
+ wset = xmalloc(set_size);
for (;;) {
memset(rset, 0, set_size);
OpenPOWER on IntegriCloud