mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
Improve ssh_crypto_finalize().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@496 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
16
libssh/dh.c
16
libssh/dh.c
@@ -139,14 +139,16 @@ int ssh_crypto_init(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ssh_crypto_finalize(void){
|
||||
if(ssh_crypto_inited){
|
||||
bignum_free(g);
|
||||
bignum_free(p);
|
||||
ssh_crypto_inited=0;
|
||||
}
|
||||
void ssh_crypto_finalize(void) {
|
||||
if(ssh_crypto_inited) {
|
||||
bignum_free(g);
|
||||
g = NULL;
|
||||
bignum_free(p);
|
||||
p = NULL;
|
||||
ssh_crypto_inited = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* prints the bignum on stderr */
|
||||
void ssh_print_bignum(const char *which,bignum num){
|
||||
#ifdef HAVE_LIBGCRYPT
|
||||
|
||||
Reference in New Issue
Block a user