summaryrefslogtreecommitdiffstats
path: root/net/base/cert_verify_proc_mac.h
blob: b60bf289cef2c585da6e36127bf052e27b2ea675 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2012 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_BASE_CERT_VERIFY_PROC_MAC_H_
#define NET_BASE_CERT_VERIFY_PROC_MAC_H_
#pragma once

#include "net/base/cert_verify_proc.h"

#include "base/synchronization/lock.h"

namespace net {

// Performs certificate path construction and validation using OS X's
// Security.framework.
class CertVerifyProcMac : public CertVerifyProc {
 public:
  CertVerifyProcMac();

 protected:
  virtual ~CertVerifyProcMac();

 private:
  virtual int VerifyInternal(X509Certificate* cert,
                             const std::string& hostname,
                             int flags,
                             CRLSet* crl_set,
                             CertVerifyResult* verify_result) OVERRIDE;

  // Blocks multiple threads from verifying the cert simultaneously.
  // (Marked mutable because it's used in a const method.)
  mutable base::Lock verification_lock_;
};

}  // namespace net

#endif  // NET_BASE_CERT_VERIFY_PROC_MAC_H_