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

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

Issue 5746003: Defines SSLServerSocket and implements SSLServerSocketNSS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: convert cert and key Created 10 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 | Annotate | Revision Log
« no previous file with comments | « net/base/x509_certificate.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
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/base/x509_certificate.h" 5 #include "net/base/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 #include <time.h> 9 #include <time.h>
10 10
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 CFRelease(ev_dict); 634 CFRelease(ev_dict);
635 verify_result->cert_status |= CERT_STATUS_IS_EV; 635 verify_result->cert_status |= CERT_STATUS_IS_EV;
636 } 636 }
637 } 637 }
638 } 638 }
639 } 639 }
640 640
641 return OK; 641 return OK;
642 } 642 }
643 643
644 bool X509Certificate::GetDEREncoded(std::string* encoded) {
645 encoded->clear();
646 CSSM_DATA der_data;
647 if(SecCertificateGetData(cert_handle_, &der_data) == noErr) {
648 encoded->append(reinterpret_cast<char*>(der_data.Data),
649 der_data.Length);
650 return true;
651 }
652 return false;
653 }
654
644 bool X509Certificate::VerifyEV() const { 655 bool X509Certificate::VerifyEV() const {
645 // We don't call this private method, but we do need to implement it because 656 // We don't call this private method, but we do need to implement it because
646 // it's defined in x509_certificate.h. We perform EV checking in the 657 // it's defined in x509_certificate.h. We perform EV checking in the
647 // Verify() above. 658 // Verify() above.
648 NOTREACHED(); 659 NOTREACHED();
649 return false; 660 return false;
650 } 661 }
651 662
652 // static 663 // static
653 bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a, 664 bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 cert_chain, 937 cert_chain,
927 CFRangeMake(1, chain_count - 1)); 938 CFRangeMake(1, chain_count - 1));
928 } 939 }
929 CFRelease(cert_chain); 940 CFRelease(cert_chain);
930 } 941 }
931 942
932 return chain.release(); 943 return chain.release();
933 } 944 }
934 945
935 } // namespace net 946 } // namespace net
OLDNEW
« no previous file with comments | « net/base/x509_certificate.h ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698