=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-pkcs11-helper.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- src/usr.bin/ssh/ssh-pkcs11-helper.c 2019/09/06 04:53:27 1.20 +++ src/usr.bin/ssh/ssh-pkcs11-helper.c 2019/09/06 05:23:55 1.21 @@ -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. * @@ -35,6 +35,8 @@ #include "ssh-pkcs11.h" #include "ssherr.h" +#ifdef WITH_OPENSSL + /* borrows code from sftp-server and ssh-agent */ struct pkcs11_keyinfo { @@ -413,3 +415,18 @@ 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 */