diff options
Diffstat (limited to 'ssh-pkcs11-helper.c')
-rw-r--r-- | ssh-pkcs11-helper.c | 19 |
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) |