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

Side by Side Diff: net/third_party/nss/ssl/sslsock.c

Issue 518065: Disable Nagle on Linux and TLS cut through support (Closed)
Patch Set: ... Created 10 years, 10 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
OLDNEW
1 /* 1 /*
2 * vtables (and methods that call through them) for the 4 types of 2 * vtables (and methods that call through them) for the 4 types of
3 * SSLSockets supported. Only one type is still supported. 3 * SSLSockets supported. Only one type is still supported.
4 * Various other functions. 4 * Various other functions.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 7 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
8 * 8 *
9 * The contents of this file are subject to the Mozilla Public License Version 9 * The contents of this file are subject to the Mozilla Public License Version
10 * 1.1 (the "License"); you may not use this file except in compliance with 10 * 1.1 (the "License"); you may not use this file except in compliance with
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 PR_FALSE, /* fdx */ 177 PR_FALSE, /* fdx */
178 PR_TRUE, /* v2CompatibleHello */ 178 PR_TRUE, /* v2CompatibleHello */
179 PR_TRUE, /* detectRollBack */ 179 PR_TRUE, /* detectRollBack */
180 PR_FALSE, /* noStepDown */ 180 PR_FALSE, /* noStepDown */
181 PR_FALSE, /* bypassPKCS11 */ 181 PR_FALSE, /* bypassPKCS11 */
182 PR_FALSE, /* noLocks */ 182 PR_FALSE, /* noLocks */
183 PR_FALSE, /* enableSessionTickets */ 183 PR_FALSE, /* enableSessionTickets */
184 PR_FALSE, /* enableDeflate */ 184 PR_FALSE, /* enableDeflate */
185 2, /* enableRenegotiation (default: requires extension) */ 185 2, /* enableRenegotiation (default: requires extension) */
186 PR_FALSE, /* requireSafeNegotiation */ 186 PR_FALSE, /* requireSafeNegotiation */
187 PR_FALSE, /* enableFalseStart */
187 }; 188 };
188 189
189 sslSessionIDLookupFunc ssl_sid_lookup; 190 sslSessionIDLookupFunc ssl_sid_lookup;
190 sslSessionIDCacheFunc ssl_sid_cache; 191 sslSessionIDCacheFunc ssl_sid_cache;
191 sslSessionIDUncacheFunc ssl_sid_uncache; 192 sslSessionIDUncacheFunc ssl_sid_uncache;
192 193
193 static PRBool ssl_inited = PR_FALSE; 194 static PRBool ssl_inited = PR_FALSE;
194 static PRDescIdentity ssl_layer_id; 195 static PRDescIdentity ssl_layer_id;
195 196
196 PRBool locksEverDisabled; /* implicitly PR_FALSE */ 197 PRBool locksEverDisabled; /* implicitly PR_FALSE */
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 break; 727 break;
727 728
728 case SSL_ENABLE_RENEGOTIATION: 729 case SSL_ENABLE_RENEGOTIATION:
729 ss->opt.enableRenegotiation = on; 730 ss->opt.enableRenegotiation = on;
730 break; 731 break;
731 732
732 case SSL_REQUIRE_SAFE_NEGOTIATION: 733 case SSL_REQUIRE_SAFE_NEGOTIATION:
733 ss->opt.requireSafeNegotiation = on; 734 ss->opt.requireSafeNegotiation = on;
734 break; 735 break;
735 736
737 case SSL_ENABLE_FALSE_START:
738 ss->opt.enableFalseStart = on;
739 break;
740
736 default: 741 default:
737 PORT_SetError(SEC_ERROR_INVALID_ARGS); 742 PORT_SetError(SEC_ERROR_INVALID_ARGS);
738 rv = SECFailure; 743 rv = SECFailure;
739 } 744 }
740 745
741 /* We can't use the macros for releasing the locks here, 746 /* We can't use the macros for releasing the locks here,
742 * because ss->opt.noLocks might have changed just above. 747 * because ss->opt.noLocks might have changed just above.
743 * We must release these locks (monitors) here, if we aquired them above, 748 * We must release these locks (monitors) here, if we aquired them above,
744 * regardless of the current value of ss->opt.noLocks. 749 * regardless of the current value of ss->opt.noLocks.
745 */ 750 */
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 case SSL_BYPASS_PKCS11: on = ss->opt.bypassPKCS11; break; 794 case SSL_BYPASS_PKCS11: on = ss->opt.bypassPKCS11; break;
790 case SSL_NO_LOCKS: on = ss->opt.noLocks; break; 795 case SSL_NO_LOCKS: on = ss->opt.noLocks; break;
791 case SSL_ENABLE_SESSION_TICKETS: 796 case SSL_ENABLE_SESSION_TICKETS:
792 on = ss->opt.enableSessionTickets; 797 on = ss->opt.enableSessionTickets;
793 break; 798 break;
794 case SSL_ENABLE_DEFLATE: on = ss->opt.enableDeflate; break; 799 case SSL_ENABLE_DEFLATE: on = ss->opt.enableDeflate; break;
795 case SSL_ENABLE_RENEGOTIATION: 800 case SSL_ENABLE_RENEGOTIATION:
796 on = ss->opt.enableRenegotiation; break; 801 on = ss->opt.enableRenegotiation; break;
797 case SSL_REQUIRE_SAFE_NEGOTIATION: 802 case SSL_REQUIRE_SAFE_NEGOTIATION:
798 on = ss->opt.requireSafeNegotiation; break; 803 on = ss->opt.requireSafeNegotiation; break;
804 case SSL_ENABLE_FALSE_START: on = ss->opt.enableFalseStart; break;
799 805
800 default: 806 default:
801 PORT_SetError(SEC_ERROR_INVALID_ARGS); 807 PORT_SetError(SEC_ERROR_INVALID_ARGS);
802 rv = SECFailure; 808 rv = SECFailure;
803 } 809 }
804 810
805 ssl_ReleaseSSL3HandshakeLock(ss); 811 ssl_ReleaseSSL3HandshakeLock(ss);
806 ssl_Release1stHandshakeLock(ss); 812 ssl_Release1stHandshakeLock(ss);
807 813
808 *pOn = on; 814 *pOn = on;
(...skipping 30 matching lines...) Expand all
839 case SSL_NO_LOCKS: on = ssl_defaults.noLocks; break; 845 case SSL_NO_LOCKS: on = ssl_defaults.noLocks; break;
840 case SSL_ENABLE_SESSION_TICKETS: 846 case SSL_ENABLE_SESSION_TICKETS:
841 on = ssl_defaults.enableSessionTickets; 847 on = ssl_defaults.enableSessionTickets;
842 break; 848 break;
843 case SSL_ENABLE_DEFLATE: on = ssl_defaults.enableDeflate; break; 849 case SSL_ENABLE_DEFLATE: on = ssl_defaults.enableDeflate; break;
844 case SSL_ENABLE_RENEGOTIATION: 850 case SSL_ENABLE_RENEGOTIATION:
845 on = ssl_defaults.enableRenegotiation; break; 851 on = ssl_defaults.enableRenegotiation; break;
846 case SSL_REQUIRE_SAFE_NEGOTIATION: 852 case SSL_REQUIRE_SAFE_NEGOTIATION:
847 on = ssl_defaults.requireSafeNegotiation; 853 on = ssl_defaults.requireSafeNegotiation;
848 break; 854 break;
855 case SSL_ENABLE_FALSE_START: on = ssl_defaults.enableFalseStart; break;
849 856
850 default: 857 default:
851 PORT_SetError(SEC_ERROR_INVALID_ARGS); 858 PORT_SetError(SEC_ERROR_INVALID_ARGS);
852 rv = SECFailure; 859 rv = SECFailure;
853 } 860 }
854 861
855 *pOn = on; 862 *pOn = on;
856 return rv; 863 return rv;
857 } 864 }
858 865
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 break; 989 break;
983 990
984 case SSL_ENABLE_RENEGOTIATION: 991 case SSL_ENABLE_RENEGOTIATION:
985 ssl_defaults.enableRenegotiation = on; 992 ssl_defaults.enableRenegotiation = on;
986 break; 993 break;
987 994
988 case SSL_REQUIRE_SAFE_NEGOTIATION: 995 case SSL_REQUIRE_SAFE_NEGOTIATION:
989 ssl_defaults.requireSafeNegotiation = on; 996 ssl_defaults.requireSafeNegotiation = on;
990 break; 997 break;
991 998
999 case SSL_ENABLE_FALSE_START:
1000 ssl_defaults.enableFalseStart = on;
1001 break;
1002
992 default: 1003 default:
993 PORT_SetError(SEC_ERROR_INVALID_ARGS); 1004 PORT_SetError(SEC_ERROR_INVALID_ARGS);
994 return SECFailure; 1005 return SECFailure;
995 } 1006 }
996 return SECSuccess; 1007 return SECSuccess;
997 } 1008 }
998 1009
999 /* function tells us if the cipher suite is one that we no longer support. */ 1010 /* function tells us if the cipher suite is one that we no longer support. */
1000 static PRBool 1011 static PRBool
1001 ssl_IsRemovedCipherSuite(PRInt32 suite) 1012 ssl_IsRemovedCipherSuite(PRInt32 suite)
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 loser: 2467 loser:
2457 ssl_DestroySocketContents(ss); 2468 ssl_DestroySocketContents(ss);
2458 ssl_DestroyLocks(ss); 2469 ssl_DestroyLocks(ss);
2459 PORT_Free(ss); 2470 PORT_Free(ss);
2460 ss = NULL; 2471 ss = NULL;
2461 } 2472 }
2462 } 2473 }
2463 return ss; 2474 return ss;
2464 } 2475 }
2465 2476
OLDNEW
« net/third_party/nss/ssl/sslsecur.c ('K') | « net/third_party/nss/ssl/sslsecur.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698