summaryrefslogtreecommitdiff
path: root/cpputil
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2018-05-16 10:24:05 +0200
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2018-05-16 10:24:05 +0200
commit33948960c647d04796c36d24acf36b97b7ed1b78 (patch)
tree24645bd609978fddacaeebac06de6590610a6e42 /cpputil
parent198dcecabfe23ee48a45441c8fe2a265b0b3e7c1 (diff)
downloadnss-hg-33948960c647d04796c36d24acf36b97b7ed1b78.tar.gz
Bug 1460673 - handle p12 properly, r=ttaubert
Differential Revision: https://phabricator.services.mozilla.com/D1295
Diffstat (limited to 'cpputil')
-rw-r--r--cpputil/scoped_ptrs.h5
1 files changed, 5 insertions, 0 deletions
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 <class T>
@@ -73,6 +77,7 @@ SCOPED(PLArenaPool);
SCOPED(PK11Context);
SCOPED(PK11GenericObject);
SCOPED(SSLResumptionTokenInfo);
+SCOPED(SEC_PKCS12DecoderContext);
#undef SCOPED