mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
pkd: Cleanup OpenSSL context
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
961c79637c
commit
3df61a4e86
@@ -17,10 +17,8 @@ set(pkd_hello_src
|
||||
)
|
||||
|
||||
set(pkd_libs
|
||||
${CMOCKA_LIBRARY}
|
||||
ssh::static
|
||||
${TORTURE_LINK_LIBRARIES}
|
||||
${ARGP_LIBRARIES}
|
||||
pthread
|
||||
)
|
||||
|
||||
add_executable(pkd_hello ${pkd_hello_src})
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
#include "pkd_keyutil.h"
|
||||
#include "pkd_util.h"
|
||||
|
||||
#if defined(HAVE_LIBCRYPTO)
|
||||
/* for OPENSSL_cleanup() of OpenSSL context */
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_ITERATIONS 10
|
||||
static struct pkd_daemon_args pkd_dargs;
|
||||
|
||||
@@ -1019,6 +1024,9 @@ out_finalize:
|
||||
if (rc != 0) {
|
||||
fprintf(stderr, "ssh_finalize: %d\n", rc);
|
||||
}
|
||||
#if defined(HAVE_LIBCRYPTO)
|
||||
OPENSSL_cleanup();
|
||||
#endif
|
||||
out:
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user