diff options
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 |