1 // Copyright 2017 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_SSL_CLIENT_CERT_IDENTITY_MAC_H_ 6 #define NET_SSL_CLIENT_CERT_IDENTITY_MAC_H_ 7 8 #include "net/ssl/client_cert_identity.h" 9 10 #include <Security/SecBase.h> 11 12 #include "base/apple/scoped_cftyperef.h" 13 #include "net/base/net_export.h" 14 15 namespace net { 16 17 class NET_EXPORT_PRIVATE ClientCertIdentityMac : public ClientCertIdentity { 18 public: 19 ClientCertIdentityMac( 20 scoped_refptr<net::X509Certificate> cert, 21 base::apple::ScopedCFTypeRef<SecIdentityRef> sec_identity); 22 ~ClientCertIdentityMac() override; 23 sec_identity_ref()24 SecIdentityRef sec_identity_ref() const { return identity_.get(); } 25 26 void AcquirePrivateKey(base::OnceCallback<void(scoped_refptr<SSLPrivateKey>)> 27 private_key_callback) override; 28 29 private: 30 base::apple::ScopedCFTypeRef<SecIdentityRef> identity_; 31 }; 32 33 } // namespace net 34 35 #endif // NET_SSL_CLIENT_CERT_IDENTITY_MAC_H_ 36