diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2021-04-03 05:40:40 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2021-04-03 05:40:40 +0000 |
commit | 98c34a23445f0b929ded85ef48a1b2868bf9761f (patch) | |
tree | 044e7c0217a33160cf3ee67ebdf91f5c7b1c0543 /usr.bin | |
parent | 60fde22fab7edc65f7a4ba49f1806584ef5b57b1 (diff) |
ensure that pkcs11_del_provider() is called before exit - some PKCS#11
providers get upset if C_Initialize is not matched with C_Finalize.
From Adithya Baglody via GHPR#234; ok markus
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 4533204fd4b..6085f3d42b0 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.552 2021/02/23 00:05:31 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.553 2021/04/03 05:40:39 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1669,6 +1669,10 @@ main(int ac, char **av) options.certificate_files[i] = NULL; } +#ifdef ENABLE_PKCS11 + (void)pkcs11_del_provider(options.pkcs11_provider); +#endif + skip_connect: exit_status = ssh_session2(ssh, cinfo); ssh_conn_info_free(cinfo); |