diff options
author | wchang0222%aol.com <devnull@localhost> | 2004-01-20 23:42:24 +0000 |
---|---|---|
committer | wchang0222%aol.com <devnull@localhost> | 2004-01-20 23:42:24 +0000 |
commit | 418de80a063b8b42b3df5b856815008c8402bad2 (patch) | |
tree | 547f0dccc154cdc48aa7034fa6a9e6fc4372ebdd | |
parent | 9e0256c72cb910856e11d50b95905c7b8328ae86 (diff) | |
download | nss-hg-418de80a063b8b42b3df5b856815008c8402bad2.tar.gz |
Fix from Ian to address Bugzilla bug 202179. (Carried rev. 1.68 back toNSS_3_8_BRANCH
NSS_3_8_BRANCH.)
-rw-r--r-- | security/nss/lib/pk11wrap/pk11skey.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index 48bd4c12f..09412c148 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -303,6 +303,17 @@ PK11_SymKeyFromHandle(PK11SlotInfo *slot, PK11SymKey *parent, PK11Origin origin, symKey->origin = origin; symKey->owner = owner; + /* adopt the parent's session */ + /* This is only used by SSL. What we really want here is a session + * structure with a ref count so the session goes away only after all the + * keys do. */ + if (owner && parent) { + pk11_CloseSession(symKey->slot, symKey->session,symKey->sessionOwner); + symKey->sessionOwner = parent->sessionOwner; + symKey->session = parent->session; + parent->sessionOwner = PR_FALSE; + } + return symKey; } |