From 670104b923dd97b1c06c0659aef7c3e52af571b2 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Fri, 6 Sep 2019 05:23:55 +0000 Subject: upstream: fixes for !WITH_OPENSSL compilation; ok dtucker@ OpenBSD-Commit-ID: 7fd68eaa9e0f7482b5d4c7e8d740aed4770a839f --- ssh-pkcs11-helper.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'ssh-pkcs11-helper.c') 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) -- cgit v1.2.1