summaryrefslogtreecommitdiff
path: root/ssh-pkcs11-helper.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-09-06 05:23:55 +0000
committerDamien Miller <djm@mindrot.org>2019-09-06 17:54:21 +1000
commit670104b923dd97b1c06c0659aef7c3e52af571b2 (patch)
tree28f189b92f2b56d071535b13e969050c7465fc58 /ssh-pkcs11-helper.c
parentbe02d7cbde3d211ec2ed2320a1f7d86b2339d758 (diff)
upstream: fixes for !WITH_OPENSSL compilation; ok dtucker@
OpenBSD-Commit-ID: 7fd68eaa9e0f7482b5d4c7e8d740aed4770a839f
Diffstat (limited to 'ssh-pkcs11-helper.c')
-rw-r--r--ssh-pkcs11-helper.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index 67094111f..3bcc2440b 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-pkcs11-helper.c,v 1.20 2019/09/06 04:53:27 djm Exp $ */ 1/* $OpenBSD: ssh-pkcs11-helper.c,v 1.21 2019/09/06 05:23:55 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved. 3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
4 * 4 *
@@ -42,6 +42,8 @@
42 42
43#ifdef ENABLE_PKCS11 43#ifdef ENABLE_PKCS11
44 44
45#ifdef WITH_OPENSSL
46
45/* borrows code from sftp-server and ssh-agent */ 47/* borrows code from sftp-server and ssh-agent */
46 48
47struct pkcs11_keyinfo { 49struct pkcs11_keyinfo {
@@ -425,6 +427,21 @@ main(int argc, char **argv)
425 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 427 fatal("%s: buffer error: %s", __func__, ssh_err(r));
426 } 428 }
427} 429}
430
431#else /* WITH_OPENSSL */
432void
433cleanup_exit(int i)
434{
435 _exit(i);
436}
437
438int
439main(int argc, char **argv)
440{
441 fprintf(stderr, "PKCS#11 code is not enabled\n");
442 return 1;
443}
444#endif /* WITH_OPENSSL */
428#else /* ENABLE_PKCS11 */ 445#else /* ENABLE_PKCS11 */
429int 446int
430main(int argc, char **argv) 447main(int argc, char **argv)