summaryrefslogtreecommitdiff
path: root/ssh-pkcs11-helper.c
diff options
context:
space:
mode:
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)