diff options
author | Robert Relyea <rrelyea@redhat.com> | 2018-11-08 13:36:59 -0800 |
---|---|---|
committer | Robert Relyea <rrelyea@redhat.com> | 2018-11-08 13:36:59 -0800 |
commit | 20f6a7d3f7fb2dec75a7cb52b9cae9d424375905 (patch) | |
tree | b1df77de7ac34af720bb16c9dca638ed10f5d54d /cpputil | |
parent | 1441aae070801740a87d5f8ff1f2a2ad0af6dcd3 (diff) | |
download | nss-hg-20f6a7d3f7fb2dec75a7cb52b9cae9d424375905.tar.gz |
Bug 1496124 - Populate public values for imported private keys, r=mt
Diffstat (limited to 'cpputil')
-rw-r--r-- | cpputil/nss_scoped_ptrs.h | 8 | ||||
-rw-r--r-- | cpputil/scoped_ptrs_util.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cpputil/nss_scoped_ptrs.h b/cpputil/nss_scoped_ptrs.h index 03979f2c5..450e787af 100644 --- a/cpputil/nss_scoped_ptrs.h +++ b/cpputil/nss_scoped_ptrs.h @@ -11,6 +11,7 @@ #include "cert.h" #include "keyhi.h" #include "p12.h" +#include "pk11pqg.h" #include "pk11pub.h" #include "pkcs11uri.h" @@ -41,6 +42,7 @@ struct ScopedDelete { void operator()(PLArenaPool* arena) { PORT_FreeArena(arena, PR_FALSE); } void operator()(PK11Context* context) { PK11_DestroyContext(context, true); } void operator()(PK11GenericObject* obj) { PK11_DestroyGenericObject(obj); } + void operator()(PQGParams* pqg) { PK11_PQG_DestroyParams(pqg); } void operator()(SEC_PKCS12DecoderContext* dcx) { SEC_PKCS12DecoderFinish(dcx); } @@ -66,6 +68,7 @@ SCOPED(CERTName); SCOPED(CERTSubjectPublicKeyInfo); SCOPED(PK11SlotInfo); SCOPED(PK11SymKey); +SCOPED(PQGParams); SCOPED(PRFileDesc); SCOPED(SECAlgorithmID); SCOPED(SECKEYEncryptedPrivateKeyInfo); @@ -82,4 +85,9 @@ SCOPED(CERTDistNames); #undef SCOPED +struct StackSECItem : public SECItem { + StackSECItem() : SECItem({siBuffer, nullptr, 0}) {} + ~StackSECItem() { SECITEM_FreeItem(this, PR_FALSE); } +}; + #endif // nss_scoped_ptrs_h__ diff --git a/cpputil/scoped_ptrs_util.h b/cpputil/scoped_ptrs_util.h index 2dbf34e1d..dc6e1d752 100644 --- a/cpputil/scoped_ptrs_util.h +++ b/cpputil/scoped_ptrs_util.h @@ -33,6 +33,7 @@ struct ScopedMaybeDelete { SCOPED(SECAlgorithmID); SCOPED(SECItem); SCOPED(PK11URI); +SCOPED(PLArenaPool); #undef SCOPED |