From 33948960c647d04796c36d24acf36b97b7ed1b78 Mon Sep 17 00:00:00 2001 From: Franziskus Kiefer Date: Wed, 16 May 2018 10:24:05 +0200 Subject: Bug 1460673 - handle p12 properly, r=ttaubert Differential Revision: https://phabricator.services.mozilla.com/D1295 --- cpputil/scoped_ptrs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cpputil') diff --git a/cpputil/scoped_ptrs.h b/cpputil/scoped_ptrs.h index e86603a97..85da99e62 100644 --- a/cpputil/scoped_ptrs.h +++ b/cpputil/scoped_ptrs.h @@ -13,6 +13,7 @@ #include "pk11pub.h" #include "pkcs11uri.h" #include "sslexp.h" +#include "p12.h" struct ScopedDelete { void operator()(CERTCertificate* cert) { CERT_DestroyCertificate(cert); } @@ -41,6 +42,9 @@ struct ScopedDelete { void operator()(SSLResumptionTokenInfo* token) { SSL_DestroyResumptionTokenInfo(token); } + void operator()(SEC_PKCS12DecoderContext* dcx) { + SEC_PKCS12DecoderFinish(dcx); + } }; template @@ -73,6 +77,7 @@ SCOPED(PLArenaPool); SCOPED(PK11Context); SCOPED(PK11GenericObject); SCOPED(SSLResumptionTokenInfo); +SCOPED(SEC_PKCS12DecoderContext); #undef SCOPED -- cgit v1.2.1