CertificateList => ScopedCERTCertificateList

This commit is contained in:
Cheng Zhao 2018-03-12 15:28:55 +09:00 committed by Aleksei Kuzmin
parent 0f9f04e4ec
commit 76ef6e3ecc
3 changed files with 16 additions and 15 deletions

View file

@ -48,7 +48,7 @@ class CertificateManagerModel {
const std::string& data,
const base::string16& password,
bool is_extractable,
net::CertificateList* imported_certs);
net::ScopedCERTCertificateList* imported_certs);
// Import user certificate from DER encoded |data|.
// Returns a net error code on failure.
@ -62,7 +62,7 @@ class CertificateManagerModel {
// Returns false if there is an internal error, otherwise true is returned and
// |not_imported| should be checked for any certificates that were not
// imported.
bool ImportCACerts(const net::CertificateList& certificates,
bool ImportCACerts(const net::ScopedCERTCertificateList& certificates,
net::NSSCertDatabase::TrustBits trust_bits,
net::NSSCertDatabase::ImportCertFailureList* not_imported);
@ -77,20 +77,20 @@ class CertificateManagerModel {
// |not_imported| should be checked for any certificates that were not
// imported.
bool ImportServerCert(
const net::CertificateList& certificates,
const net::ScopedCERTCertificateList& certificates,
net::NSSCertDatabase::TrustBits trust_bits,
net::NSSCertDatabase::ImportCertFailureList* not_imported);
// Set trust values for certificate.
// |trust_bits| should be a bit field of TRUST* values from NSSCertDatabase.
// Returns true on success or false on failure.
bool SetCertTrust(const net::X509Certificate* cert,
bool SetCertTrust(CERTCertificate* cert,
net::CertType type,
net::NSSCertDatabase::TrustBits trust_bits);
// Delete the cert. Returns true on success. |cert| is still valid when this
// function returns.
bool Delete(net::X509Certificate* cert);
bool Delete(CERTCertificate* cert);
private:
CertificateManagerModel(net::NSSCertDatabase* nss_cert_database,