scoped_nss_types.h 651 B

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