1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/cert/test_root_certs.h"
7 #include "base/location.h"
8 #include "base/logging.h"
9 #include "net/android/network_library.h"
10 #include "net/cert/x509_certificate.h"
14 bool TestRootCerts::Add(X509Certificate
* certificate
) {
15 std::string cert_bytes
;
16 if (!X509Certificate::GetDEREncoded(certificate
->os_cert_handle(),
19 android::AddTestRootCertificate(
20 reinterpret_cast<const uint8_t*>(cert_bytes
.data()), cert_bytes
.size());
25 void TestRootCerts::Clear() {
29 android::ClearTestRootCertificates();
33 bool TestRootCerts::IsEmpty() const {
37 TestRootCerts::~TestRootCerts() {}
39 void TestRootCerts::Init() {