Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: net/base/keygen_handler_nss.cc

Issue 1535016: We should also delete the underlying persistent public key... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Make albertb's suggested changes. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/keygen_handler_nss.cc
===================================================================
--- net/base/keygen_handler_nss.cc (revision 43365)
+++ net/base/keygen_handler_nss.cc (working copy)
@@ -229,14 +229,14 @@
}
if (publicKey) {
- PK11_DestroyTokenObject(publicKey->pkcs11Slot, publicKey->pkcs11ID);
+ if (!isSuccess || !stores_key_) {
+ PK11_DestroyTokenObject(publicKey->pkcs11Slot, publicKey->pkcs11ID);
+ }
+ SECKEY_DestroyPublicKey(publicKey);
}
if (spkInfo) {
SECKEY_DestroySubjectPublicKeyInfo(spkInfo);
}
- if (publicKey) {
- SECKEY_DestroyPublicKey(publicKey);
- }
if (arena) {
PORT_FreeArena(arena, PR_TRUE);
}
« no previous file with comments | « no previous file | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698