diff options
author | ian.mcgreer%sun.com <devnull@localhost> | 2002-02-15 20:50:47 +0000 |
---|---|---|
committer | ian.mcgreer%sun.com <devnull@localhost> | 2002-02-15 20:50:47 +0000 |
commit | 6f0750bd4ff2e66d0edf7f7027a49f9a0e8bbadc (patch) | |
tree | 2a59a3257f38ee1170df92f3ddb1775a465c316a | |
parent | a164dd719fd6c54d5f4cfce6d0b50141342c1801 (diff) | |
download | nss-hg-6f0750bd4ff2e66d0edf7f7027a49f9a0e8bbadc.tar.gz |
clean up certs & keys for purify
-rw-r--r-- | security/nss/cmd/strsclnt/strsclnt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/security/nss/cmd/strsclnt/strsclnt.c b/security/nss/cmd/strsclnt/strsclnt.c index e14404619..29c90274e 100644 --- a/security/nss/cmd/strsclnt/strsclnt.c +++ b/security/nss/cmd/strsclnt/strsclnt.c @@ -1104,6 +1104,20 @@ main(int argc, char **argv) client_main(port, connections, privKey, cert, hostName, nickName); + /* clean up */ + if (cert[kt_rsa]) { + CERT_DestroyCertificate(cert[kt_rsa]); + } + if (cert[kt_fortezza]) { + CERT_DestroyCertificate(cert[kt_fortezza]); + } + if (privKey[kt_rsa]) { + SECKEY_DestroyPrivateKey(privKey[kt_rsa]); + } + if (privKey[kt_fortezza]) { + SECKEY_DestroyPrivateKey(privKey[kt_fortezza]); + } + /* some final stats. */ if (ssl3stats->hsh_sid_cache_hits + ssl3stats->hsh_sid_cache_misses + ssl3stats->hsh_sid_cache_not_ok == 0) { |