Bug 272484 Certificate manager crashes [@ _PR_MD_ATOMIC_DECREMENT - PK11_FreeSymKey] The problem only happens if we try to import a key into a token which then fails to import. The basic issue was a hack in the pkcs 7 code to support PKCS 12, A special structure was used to replace the SymKey structure, and the code 'knew' the special structure existed before it dealt with the symkey. The fix addes a new capability to symkeys, where applications can attach application specific data to the key structure. PKCS 12 uses this to attache the PBE information for CMS. (part 1 of 3)
Bug 272484 Certificate manager crashes [@ _PR_MD_ATOMIC_DECREMENT - PK11_FreeSymKey]
The problem only happens if we try to import a key into a token which then fails
to import. The basic issue was a hack in the pkcs 7 code to support PKCS 12, A
special structure was used to replace the SymKey structure, and the code 'knew'
the special structure existed before it dealt with the symkey. The fix addes a
new capability to symkeys, where applications can attach application specific
data to the key structure. PKCS 12 uses this to attache the PBE information
for CMS. (part 1 of 3)

This patch also improves the key's reuse of sessions, so sessions are not thrashed
when SSL is used with them.

r=wtc

nmav/nss,nmav/nss,nmav/nss,nmav/nss,ekr/nss-old,ekr/nss-old,nmav/nss,nmav/nss,ekr/nss-old,ekr/nss-old,ekr/nss-old,ekr/nss-old,ekr/nss-old,nmav/nss