#ifndef CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_
#define CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_
#include <string>
#include <vector>
#include "base/memory/ref_counted.h"
#include "chromeos/chromeos_export.h"
namespace base {
class DictionaryValue;
}
namespace net {
struct CertPrincipal;
class X509Certificate;
typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
}
namespace chromeos {
class CertificatePattern;
class IssuerSubjectPattern;
namespace client_cert {
enum ConfigType {
CONFIG_TYPE_NONE,
CONFIG_TYPE_OPENVPN,
CONFIG_TYPE_IPSEC,
CONFIG_TYPE_EAP
};
bool CertPrincipalMatches(const IssuerSubjectPattern& pattern,
const net::CertPrincipal& principal);
CHROMEOS_EXPORT scoped_refptr<net::X509Certificate> GetCertificateMatch(
const CertificatePattern& pattern,
const net::CertificateList& all_certs);
void SetShillProperties(const ConfigType cert_config_type,
const std::string& tpm_slot,
const std::string& tpm_pin,
const std::string* pkcs11_id,
base::DictionaryValue* properties);
bool IsCertificateConfigured(const client_cert::ConfigType cert_config_type,
const base::DictionaryValue& service_properties);
}
}
#endif