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

Side by Side Diff: webrtc/base/opensslstreamadapter.cc

Issue 1311843006: Revert of purge nss files and dependencies (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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 | « webrtc/base/nssstreamadapter.cc ('k') | webrtc/base/ssladapter.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 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 if (stream->peer_certificate_digest_algorithm_.empty()) { 1034 if (stream->peer_certificate_digest_algorithm_.empty()) {
1035 return 0; 1035 return 0;
1036 } 1036 }
1037 X509* cert = X509_STORE_CTX_get_current_cert(store); 1037 X509* cert = X509_STORE_CTX_get_current_cert(store);
1038 int depth = X509_STORE_CTX_get_error_depth(store); 1038 int depth = X509_STORE_CTX_get_error_depth(store);
1039 1039
1040 // For now We ignore the parent certificates and verify the leaf against 1040 // For now We ignore the parent certificates and verify the leaf against
1041 // the digest. 1041 // the digest.
1042 // 1042 //
1043 // TODO(jiayl): Verify the chain is a proper chain and report the chain to 1043 // TODO(jiayl): Verify the chain is a proper chain and report the chain to
1044 // |stream->peer_certificate_|. 1044 // |stream->peer_certificate_|, like what NSS does.
1045 if (depth > 0) { 1045 if (depth > 0) {
1046 LOG(LS_INFO) << "Ignored chained certificate at depth " << depth; 1046 LOG(LS_INFO) << "Ignored chained certificate at depth " << depth;
1047 return 1; 1047 return 1;
1048 } 1048 }
1049 1049
1050 unsigned char digest[EVP_MAX_MD_SIZE]; 1050 unsigned char digest[EVP_MAX_MD_SIZE];
1051 size_t digest_length; 1051 size_t digest_length;
1052 if (!OpenSSLCertificate::ComputeDigest( 1052 if (!OpenSSLCertificate::ComputeDigest(
1053 cert, 1053 cert,
1054 stream->peer_certificate_digest_algorithm_, 1054 stream->peer_certificate_digest_algorithm_,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 #endif 1163 #endif
1164 } 1164 }
1165 } else { 1165 } else {
1166 return std::string(); 1166 return std::string();
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 } // namespace rtc 1170 } // namespace rtc
1171 1171
1172 #endif // HAVE_OPENSSL_SSL_H 1172 #endif // HAVE_OPENSSL_SSL_H
OLDNEW
« no previous file with comments | « webrtc/base/nssstreamadapter.cc ('k') | webrtc/base/ssladapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698