Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Side by Side Diff: net/base/x509_certificate_net_log_param.cc

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/x509_certificate_net_log_param.h ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 "net/base/x509_certificate_net_log_param.h"
6
7 #include <string>
8 #include <vector>
9
10 #include "base/values.h"
11 #include "net/base/x509_certificate.h"
12
13 namespace net {
14
15 base::Value* NetLogX509CertificateCallback(const X509Certificate* certificate,
16 NetLog::LogLevel log_level) {
17 base::DictionaryValue* dict = new base::DictionaryValue();
18 base::ListValue* certs = new base::ListValue();
19 std::vector<std::string> encoded_chain;
20 certificate->GetPEMEncodedChain(&encoded_chain);
21 for (size_t i = 0; i < encoded_chain.size(); ++i)
22 certs->Append(new base::StringValue(encoded_chain[i]));
23 dict->Set("certificates", certs);
24 return dict;
25 }
26
27 } // namespace net
OLDNEW
« no previous file with comments | « net/base/x509_certificate_net_log_param.h ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698