1 // Copyright 2013 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_CERT_SCOPED_NSS_TYPES_H_ 6 #define NET_CERT_SCOPED_NSS_TYPES_H_ 7 8 #include <cert.h> 9 10 #include <memory> 11 #include <vector> 12 13 namespace net { 14 15 struct FreeCERTCertificate { operatorFreeCERTCertificate16 void operator()(CERTCertificate* x) const { 17 CERT_DestroyCertificate(x); 18 } 19 }; 20 21 typedef std::unique_ptr<CERTCertificate, FreeCERTCertificate> 22 ScopedCERTCertificate; 23 24 using ScopedCERTCertificateList = std::vector<ScopedCERTCertificate>; 25 26 } // namespace net 27 28 #endif // NET_CERT_SCOPED_NSS_TYPES_H_ 29