mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +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
|
set(pkd_libs
|
||||||
${CMOCKA_LIBRARY}
|
${TORTURE_LINK_LIBRARIES}
|
||||||
ssh::static
|
|
||||||
${ARGP_LIBRARIES}
|
${ARGP_LIBRARIES}
|
||||||
pthread
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(pkd_hello ${pkd_hello_src})
|
add_executable(pkd_hello ${pkd_hello_src})
|
||||||
|
|||||||
@@ -22,6 +22,11 @@
|
|||||||
#include "pkd_keyutil.h"
|
#include "pkd_keyutil.h"
|
||||||
#include "pkd_util.h"
|
#include "pkd_util.h"
|
||||||
|
|
||||||
|
#if defined(HAVE_LIBCRYPTO)
|
||||||
|
/* for OPENSSL_cleanup() of OpenSSL context */
|
||||||
|
#include <openssl/crypto.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_ITERATIONS 10
|
#define DEFAULT_ITERATIONS 10
|
||||||
static struct pkd_daemon_args pkd_dargs;
|
static struct pkd_daemon_args pkd_dargs;
|
||||||
|
|
||||||
@@ -1019,6 +1024,9 @@ out_finalize:
|
|||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
fprintf(stderr, "ssh_finalize: %d\n", rc);
|
fprintf(stderr, "ssh_finalize: %d\n", rc);
|
||||||
}
|
}
|
||||||
|
#if defined(HAVE_LIBCRYPTO)
|
||||||
|
OPENSSL_cleanup();
|
||||||
|
#endif
|
||||||
out:
|
out:
|
||||||
return exit_code;
|
return exit_code;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user