1 // Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_BROWSER_X509_CERT_PRINCIPAL_IMPL_H_ 6 #define CEF_LIBCEF_BROWSER_X509_CERT_PRINCIPAL_IMPL_H_ 7 #pragma once 8 9 #include "include/cef_x509_certificate.h" 10 11 #include "net/cert/x509_cert_types.h" 12 13 // CefX509CertPrincipal implementation 14 class CefX509CertPrincipalImpl : public CefX509CertPrincipal { 15 public: 16 explicit CefX509CertPrincipalImpl(const net::CertPrincipal& value); 17 18 CefX509CertPrincipalImpl(const CefX509CertPrincipalImpl&) = delete; 19 CefX509CertPrincipalImpl& operator=(const CefX509CertPrincipalImpl&) = delete; 20 21 // CefX509CertPrincipal methods. 22 CefString GetDisplayName() override; 23 CefString GetCommonName() override; 24 CefString GetLocalityName() override; 25 CefString GetStateOrProvinceName() override; 26 CefString GetCountryName() override; 27 void GetStreetAddresses(std::vector<CefString>& addresses) override; 28 void GetOrganizationNames(std::vector<CefString>& names) override; 29 void GetOrganizationUnitNames(std::vector<CefString>& names) override; 30 void GetDomainComponents(std::vector<CefString>& components) override; 31 32 private: 33 net::CertPrincipal value_; 34 35 IMPLEMENT_REFCOUNTING(CefX509CertPrincipalImpl); 36 }; 37 38 #endif // CEF_LIBCEF_BROWSER_X509_CERT_PRINCIPAL_IMPL_H_ 39