summaryrefslogtreecommitdiffstats
path: root/net/cert/scoped_nss_types.h
blob: 0eb8d844f9db18c4e248f934d9e5646fe8338786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_CERT_SCOPED_NSS_TYPES_H_
#define NET_CERT_SCOPED_NSS_TYPES_H_

#include <cert.h>

#include "base/memory/scoped_ptr.h"

namespace net {

struct FreeCERTCertificate {
  void operator()(CERTCertificate* x) const {
    CERT_DestroyCertificate(x);
  }
};

typedef scoped_ptr<CERTCertificate, FreeCERTCertificate> ScopedCERTCertificate;

}  // namespace net

#endif  // NET_CERT_SCOPED_NSS_TYPES_H_