[go: nahoru, domu]

blob: cd20188f86c88b610942a426ce4fb2cd907371c3 [file] [log] [blame]
Pavol Markof38cb212018-11-19 20:47:101// Copyright 2017 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.
4
5#include "services/network/nss_temp_certs_cache_chromeos.h"
6
7#include "net/cert/x509_util_nss.h"
8
9namespace network {
10
11NSSTempCertsCacheChromeOS::NSSTempCertsCacheChromeOS(
12 const net::CertificateList& certificates) {
13 for (const auto& certificate : certificates) {
14 net::ScopedCERTCertificate x509_cert =
15 net::x509_util::CreateCERTCertificateFromX509Certificate(
16 certificate.get());
17 if (!x509_cert) {
18 LOG(ERROR) << "Unable to create CERTCertificate";
19 continue;
20 }
21
22 temp_certs_.push_back(std::move(x509_cert));
23 }
24}
25
26NSSTempCertsCacheChromeOS::~NSSTempCertsCacheChromeOS() {}
27
28} // namespace network