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

Side by Side Diff: chrome/browser/ssl/ssl_add_certificate.cc

Issue 11266008: Fix certificate and keychain installation on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: separate android and openssl CertDatabase implementations Created 8 years 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
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 "chrome/browser/ssl/ssl_add_certificate.h"
6
7 #include "chrome/browser/ssl/ssl_add_cert_handler.h"
8 #include "net/base/x509_certificate.h"
9
10 namespace chrome {
11
12 void SSLAddCertificate(
13 net::URLRequest* request,
14 net::CertificateMimeType cert_type,
15 const void* cert_data,
16 size_t cert_size,
17 int render_process_id,
18 int render_view_id) {
19 // Chromium only supports X.509 User certificates on non-Android
20 // platforms. Note that this method should not be called for other
21 // certificate mime types.
22 if (cert_type != net::CERTIFICATE_MIME_TYPE_X509_USER_CERT)
23 return;
24
25 scoped_refptr<net::X509Certificate> cert;
26 if (cert_data != NULL) {
27 cert = net::X509Certificate::CreateFromBytes(
28 reinterpret_cast<const char*>(cert_data), cert_size);
29 }
30 // NOTE: Passing a NULL cert pointer if |cert_data| was NULL is
31 // intentional here.
32
33 // The handler will run the UI and delete itself when it's finished.
34 new SSLAddCertHandler(request, cert, render_process_id, render_view_id);
35 }
36
37 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_add_certificate.h ('k') | chrome/browser/ssl/ssl_add_certificate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698