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

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

Issue 6370008: Enable session resumption in SSLServerSocketNSS and unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_server_socket_unittest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/socket/ssl_server_socket_nss.h" 5 #include "net/socket/ssl_server_socket_nss.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <winsock2.h> 8 #include <winsock2.h>
9 #endif 9 #endif
10 10
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 LogFailedNSSFunction(net_log_, "SSL_OptionSet", "SSL_REQUEST_CERTIFICATE"); 285 LogFailedNSSFunction(net_log_, "SSL_OptionSet", "SSL_REQUEST_CERTIFICATE");
286 return ERR_UNEXPECTED; 286 return ERR_UNEXPECTED;
287 } 287 }
288 288
289 rv = SSL_OptionSet(nss_fd_, SSL_REQUIRE_CERTIFICATE, PR_FALSE); 289 rv = SSL_OptionSet(nss_fd_, SSL_REQUIRE_CERTIFICATE, PR_FALSE);
290 if (rv != SECSuccess) { 290 if (rv != SECSuccess) {
291 LogFailedNSSFunction(net_log_, "SSL_OptionSet", "SSL_REQUIRE_CERTIFICATE"); 291 LogFailedNSSFunction(net_log_, "SSL_OptionSet", "SSL_REQUIRE_CERTIFICATE");
292 return ERR_UNEXPECTED; 292 return ERR_UNEXPECTED;
293 } 293 }
294 294
295 rv = SSL_OptionSet(nss_fd_, SSL_NO_CACHE, PR_TRUE);
296 if (rv != SECSuccess) {
297 LogFailedNSSFunction(net_log_, "SSL_OptionSet", "SSL_NO_CACHE");
298 return ERR_UNEXPECTED;
299 }
300
301 rv = SSL_ConfigServerSessionIDCache(1024, 5, 5, NULL); 295 rv = SSL_ConfigServerSessionIDCache(1024, 5, 5, NULL);
wtc 2011/01/21 21:32:38 SSL_ConfigServerSessionIDCache should be called on
302 if (rv != SECSuccess) { 296 if (rv != SECSuccess) {
303 LogFailedNSSFunction(net_log_, "SSL_ConfigureServerSessionIDCache", ""); 297 LogFailedNSSFunction(net_log_, "SSL_ConfigureServerSessionIDCache", "");
304 return ERR_UNEXPECTED; 298 return ERR_UNEXPECTED;
305 } 299 }
306 300
307 rv = SSL_AuthCertificateHook(nss_fd_, OwnAuthCertHandler, this); 301 rv = SSL_AuthCertificateHook(nss_fd_, OwnAuthCertHandler, this);
308 if (rv != SECSuccess) { 302 if (rv != SECSuccess) {
309 LogFailedNSSFunction(net_log_, "SSL_AuthCertificateHook", ""); 303 LogFailedNSSFunction(net_log_, "SSL_AuthCertificateHook", "");
310 return ERR_UNEXPECTED; 304 return ERR_UNEXPECTED;
311 } 305 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 << ", net_error " << net_error; 668 << ", net_error " << net_error;
675 net_log_.AddEvent( 669 net_log_.AddEvent(
676 NetLog::TYPE_SSL_HANDSHAKE_ERROR, 670 NetLog::TYPE_SSL_HANDSHAKE_ERROR,
677 make_scoped_refptr(new SSLErrorParams(net_error, prerr))); 671 make_scoped_refptr(new SSLErrorParams(net_error, prerr)));
678 } 672 }
679 } 673 }
680 return net_error; 674 return net_error;
681 } 675 }
682 676
683 } // namespace net 677 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_server_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698