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

Side by Side Diff: net/cert/x509_certificate.cc

Issue 584463005: Add debugging information to the SSL blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing chrome://interstitial segfault Created 6 years, 3 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
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 std::string der_encoded; 690 std::string der_encoded;
691 if (!GetDEREncoded(cert_handle, &der_encoded)) 691 if (!GetDEREncoded(cert_handle, &der_encoded))
692 return false; 692 return false;
693 return GetPEMEncodedFromDER(der_encoded, pem_encoded); 693 return GetPEMEncodedFromDER(der_encoded, pem_encoded);
694 } 694 }
695 695
696 bool X509Certificate::GetPEMEncodedChain( 696 bool X509Certificate::GetPEMEncodedChain(
697 std::vector<std::string>* pem_encoded) const { 697 std::vector<std::string>* pem_encoded) const {
698 std::vector<std::string> encoded_chain; 698 std::vector<std::string> encoded_chain;
699 std::string pem_data; 699 std::string pem_data;
700 if (!GetPEMEncoded(os_cert_handle(), &pem_data)) 700 if (!os_cert_handle() || !GetPEMEncoded(os_cert_handle(), &pem_data))
agl 2014/09/23 19:59:44 Should this not be fixed in GetDEREncoded and thus
felt 2014/09/23 20:26:50 sure, did this.
701 return false; 701 return false;
702 encoded_chain.push_back(pem_data); 702 encoded_chain.push_back(pem_data);
703 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) { 703 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) {
704 if (!GetPEMEncoded(intermediate_ca_certs_[i], &pem_data)) 704 if (!GetPEMEncoded(intermediate_ca_certs_[i], &pem_data))
705 return false; 705 return false;
706 encoded_chain.push_back(pem_data); 706 encoded_chain.push_back(pem_data);
707 } 707 }
708 pem_encoded->swap(encoded_chain); 708 pem_encoded->swap(encoded_chain);
709 return true; 709 return true;
710 } 710 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 RemoveFromCache(cert_handle_); 762 RemoveFromCache(cert_handle_);
763 FreeOSCertHandle(cert_handle_); 763 FreeOSCertHandle(cert_handle_);
764 } 764 }
765 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) { 765 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) {
766 RemoveFromCache(intermediate_ca_certs_[i]); 766 RemoveFromCache(intermediate_ca_certs_[i]);
767 FreeOSCertHandle(intermediate_ca_certs_[i]); 767 FreeOSCertHandle(intermediate_ca_certs_[i]);
768 } 768 }
769 } 769 }
770 770
771 } // namespace net 771 } // namespace net
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698