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

Side by Side Diff: net/socket/ssl_client_socket_nss.cc

Issue 394003: Linux: enable building with a local version of libssl. (Closed)
Patch Set: ... Created 11 years, 1 month 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 | « build/linux/system.gyp ('k') | net/third_party/nss/README.google » ('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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // This file includes code GetDefaultCertNickname(), derived from 5 // This file includes code GetDefaultCertNickname(), derived from
6 // nsNSSCertificate::defaultServerNickName() 6 // nsNSSCertificate::defaultServerNickName()
7 // in mozilla/security/manager/ssl/src/nsNSSCertificate.cpp 7 // in mozilla/security/manager/ssl/src/nsNSSCertificate.cpp
8 // and SSLClientSocketNSS::DoVerifyCertComplete() derived from 8 // and SSLClientSocketNSS::DoVerifyCertComplete() derived from
9 // AuthCertificateCallback() in 9 // AuthCertificateCallback() in
10 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. 10 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp.
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 #ifdef SSL_ENABLE_SESSION_TICKETS 350 #ifdef SSL_ENABLE_SESSION_TICKETS
351 // Support RFC 5077 351 // Support RFC 5077
352 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SESSION_TICKETS, PR_TRUE); 352 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SESSION_TICKETS, PR_TRUE);
353 if (rv != SECSuccess) 353 if (rv != SECSuccess)
354 LOG(INFO) << "SSL_ENABLE_SESSION_TICKETS failed. Old system nss?"; 354 LOG(INFO) << "SSL_ENABLE_SESSION_TICKETS failed. Old system nss?";
355 #else 355 #else
356 #error "You need to install NSS-3.12 or later to build chromium" 356 #error "You need to install NSS-3.12 or later to build chromium"
357 #endif 357 #endif
358 358
359 #ifdef SSL_ENABLE_DEFLATE
360 rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_DEFLATE, PR_TRUE);
361 if (rv != SECSuccess)
362 LOG(INFO) << "SSL_ENABLE_DEFLATE failed. Old system nss?";
363 #endif
364
359 rv = SSL_OptionSet(nss_fd_, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE); 365 rv = SSL_OptionSet(nss_fd_, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE);
360 if (rv != SECSuccess) 366 if (rv != SECSuccess)
361 return ERR_UNEXPECTED; 367 return ERR_UNEXPECTED;
362 368
363 rv = SSL_AuthCertificateHook(nss_fd_, OwnAuthCertHandler, this); 369 rv = SSL_AuthCertificateHook(nss_fd_, OwnAuthCertHandler, this);
364 if (rv != SECSuccess) 370 if (rv != SECSuccess)
365 return ERR_UNEXPECTED; 371 return ERR_UNEXPECTED;
366 372
367 rv = SSL_GetClientAuthDataHook(nss_fd_, ClientAuthHandler, this); 373 rv = SSL_GetClientAuthDataHook(nss_fd_, ClientAuthHandler, this);
368 if (rv != SECSuccess) 374 if (rv != SECSuccess)
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 } 1136 }
1131 PRErrorCode prerr = PR_GetError(); 1137 PRErrorCode prerr = PR_GetError();
1132 if (prerr == PR_WOULD_BLOCK_ERROR) { 1138 if (prerr == PR_WOULD_BLOCK_ERROR) {
1133 return ERR_IO_PENDING; 1139 return ERR_IO_PENDING;
1134 } 1140 }
1135 LeaveFunction(""); 1141 LeaveFunction("");
1136 return NetErrorFromNSPRError(prerr); 1142 return NetErrorFromNSPRError(prerr);
1137 } 1143 }
1138 1144
1139 } // namespace net 1145 } // namespace net
OLDNEW
« no previous file with comments | « build/linux/system.gyp ('k') | net/third_party/nss/README.google » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698