From a4790ca203a490d076f951ad3038c8980cc4766d Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Tue, 11 Jan 2022 23:30:17 +0000 Subject: Bug 1748386 - Enable CKM_CHACHA20, r=rrelyea This change makes a few tiny changes to the code to re-enable the use of Chacha20 ciphers and align their key type. There are a lot more changes in tests, mostly just to factor existing tests and determine that the legacy and final PKCS#11 mechanisms work as expected. Differential Revision: https://phabricator.services.mozilla.com/D135007 --- cpputil/nss_scoped_ptrs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpputil') diff --git a/cpputil/nss_scoped_ptrs.h b/cpputil/nss_scoped_ptrs.h index 2c57986b1..db3429908 100644 --- a/cpputil/nss_scoped_ptrs.h +++ b/cpputil/nss_scoped_ptrs.h @@ -8,8 +8,10 @@ #define nss_scoped_ptrs_h__ #include + #include "cert.h" #include "keyhi.h" +#include "nss.h" #include "p12.h" #include "pk11hpke.h" #include "pk11pqg.h" @@ -54,6 +56,7 @@ struct ScopedDelete { void operator()(SEC_PKCS12DecoderContext* dcx) { SEC_PKCS12DecoderFinish(dcx); } + void operator()(NSSInitContext* init) { NSS_ShutdownContext(init); } }; template @@ -75,6 +78,7 @@ SCOPED(CERTDistNames); SCOPED(CERTName); SCOPED(CERTSubjectPublicKeyInfo); SCOPED(HpkeContext); +SCOPED(NSSInitContext); SCOPED(PK11Context); SCOPED(PK11GenericObject); SCOPED(PK11SlotInfo); -- cgit v1.2.1