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)
downloadopenssh-git-670104b923dd97b1c06c0659aef7c3e52af571b2.tar.gz
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 67094111..3bcc2440 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11-helper.c,v 1.20 2019/09/06 04:53:27 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11-helper.c,v 1.21 2019/09/06 05:23:55 djm Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
*
@@ -42,6 +42,8 @@
#ifdef ENABLE_PKCS11
+#ifdef WITH_OPENSSL
+
/* borrows code from sftp-server and ssh-agent */
struct pkcs11_keyinfo {
@@ -425,6 +427,21 @@ main(int argc, char **argv)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
}
}
+
+#else /* WITH_OPENSSL */
+void
+cleanup_exit(int i)
+{
+ _exit(i);
+}
+
+int
+main(int argc, char **argv)
+{
+ fprintf(stderr, "PKCS#11 code is not enabled\n");
+ return 1;
+}
+#endif /* WITH_OPENSSL */
#else /* ENABLE_PKCS11 */
int
main(int argc, char **argv)