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

Side by Side Diff: net/third_party/nss/patches/cipherorder.patch

Issue 142283002: Update net/third_party/nss to NSS_3_15_5_BETA2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix applypatches.sh mistakes Created 6 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
OLDNEW
1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c 1 diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c
2 --- a/nss/lib/ssl/ssl3con.c» 2014-01-03 19:44:16.406720764 -0800 2 --- a/nss/lib/ssl/ssl3con.c» 2014-01-17 18:45:24.378132013 -0800
3 +++ b/nss/lib/ssl/ssl3con.c» 2014-01-03 19:44:24.516853386 -0800 3 +++ b/nss/lib/ssl/ssl3con.c» 2014-01-17 18:46:29.929216162 -0800
4 @@ -12539,6 +12539,46 @@ ssl3_CipherPrefGet(sslSocket *ss, ssl3Ci 4 @@ -12540,6 +12540,46 @@ ssl3_CipherPrefGet(sslSocket *ss, ssl3Ci
5 return rv; 5 return rv;
6 } 6 }
7 7
8 +SECStatus 8 +SECStatus
9 +ssl3_CipherOrderSet(sslSocket *ss, const ssl3CipherSuite *ciphers, unsigned int len) 9 +ssl3_CipherOrderSet(sslSocket *ss, const ssl3CipherSuite *ciphers, unsigned int len)
10 +{ 10 +{
11 + /* |i| iterates over |ciphers| while |done| and |j| iterate over 11 + /* |i| iterates over |ciphers| while |done| and |j| iterate over
12 + * |ss->cipherSuites|. */ 12 + * |ss->cipherSuites|. */
13 + unsigned int i, done; 13 + unsigned int i, done;
14 + 14 +
(...skipping 27 matching lines...) Expand all
42 + ss->cipherSuites[done].enabled = 0; 42 + ss->cipherSuites[done].enabled = 0;
43 + } 43 + }
44 + 44 +
45 + return SECSuccess; 45 + return SECSuccess;
46 +} 46 +}
47 + 47 +
48 /* copy global default policy into socket. */ 48 /* copy global default policy into socket. */
49 void 49 void
50 ssl3_InitSocketPolicy(sslSocket *ss) 50 ssl3_InitSocketPolicy(sslSocket *ss)
51 diff -pu a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h 51 diff -pu a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h
52 --- a/nss/lib/ssl/ssl.h»2014-01-03 19:44:16.416720928 -0800 52 --- a/nss/lib/ssl/ssl.h»2014-01-17 18:45:24.378132013 -0800
53 +++ b/nss/lib/ssl/ssl.h»2014-01-03 19:44:24.516853386 -0800 53 +++ b/nss/lib/ssl/ssl.h»2014-01-17 18:46:29.929216162 -0800
54 @@ -265,6 +265,13 @@ SSL_IMPORT SECStatus SSL_CipherPrefGetDe 54 @@ -285,6 +285,13 @@ SSL_IMPORT SECStatus SSL_CipherPrefGetDe
55 SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); 55 SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy);
56 SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); 56 SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy);
57 57
58 +/* SSL_CipherOrderSet sets the cipher suite preference order from |ciphers|, 58 +/* SSL_CipherOrderSet sets the cipher suite preference order from |ciphers|,
59 + * which must be an array of cipher suite ids of length |len|. All the given 59 + * which must be an array of cipher suite ids of length |len|. All the given
60 + * cipher suite ids must appear in the array that is returned by 60 + * cipher suite ids must appear in the array that is returned by
61 + * |SSL_GetImplementedCiphers| and may only appear once, at most. */ 61 + * |SSL_GetImplementedCiphers| and may only appear once, at most. */
62 +SSL_IMPORT SECStatus SSL_CipherOrderSet(PRFileDesc *fd, const PRUint16 *ciphers , 62 +SSL_IMPORT SECStatus SSL_CipherOrderSet(PRFileDesc *fd, const PRUint16 *ciphers ,
63 + unsigned int len); 63 + unsigned int len);
64 + 64 +
65 /* SSLChannelBindingType enumerates the types of supported channel binding 65 /* SSLChannelBindingType enumerates the types of supported channel binding
66 * values. See RFC 5929. */ 66 * values. See RFC 5929. */
67 typedef enum SSLChannelBindingType { 67 typedef enum SSLChannelBindingType {
68 diff -pu a/nss/lib/ssl/sslimpl.h b/nss/lib/ssl/sslimpl.h 68 diff -pu a/nss/lib/ssl/sslimpl.h b/nss/lib/ssl/sslimpl.h
69 --- a/nss/lib/ssl/sslimpl.h» 2014-01-03 19:44:16.416720928 -0800 69 --- a/nss/lib/ssl/sslimpl.h» 2014-01-17 18:45:24.378132013 -0800
70 +++ b/nss/lib/ssl/sslimpl.h» 2014-01-03 19:44:24.516853386 -0800 70 +++ b/nss/lib/ssl/sslimpl.h» 2014-01-17 18:46:29.929216162 -0800
71 @@ -1741,6 +1741,8 @@ extern SECStatus ssl3_CipherPrefSet(sslS 71 @@ -1743,6 +1743,8 @@ extern SECStatus ssl3_CipherPrefSet(sslS
72 extern SECStatus ssl3_CipherPrefGet(sslSocket *ss, ssl3CipherSuite which, PRBoo l *on); 72 extern SECStatus ssl3_CipherPrefGet(sslSocket *ss, ssl3CipherSuite which, PRBoo l *on);
73 extern SECStatus ssl2_CipherPrefSet(sslSocket *ss, PRInt32 which, PRBool enable d); 73 extern SECStatus ssl2_CipherPrefSet(sslSocket *ss, PRInt32 which, PRBool enable d);
74 extern SECStatus ssl2_CipherPrefGet(sslSocket *ss, PRInt32 which, PRBool *enabl ed); 74 extern SECStatus ssl2_CipherPrefGet(sslSocket *ss, PRInt32 which, PRBool *enabl ed);
75 +extern SECStatus ssl3_CipherOrderSet(sslSocket *ss, const ssl3CipherSuite *ciph er, 75 +extern SECStatus ssl3_CipherOrderSet(sslSocket *ss, const ssl3CipherSuite *ciph er,
76 + unsigned int len); 76 + unsigned int len);
77 77
78 extern SECStatus ssl3_SetPolicy(ssl3CipherSuite which, PRInt32 policy); 78 extern SECStatus ssl3_SetPolicy(ssl3CipherSuite which, PRInt32 policy);
79 extern SECStatus ssl3_GetPolicy(ssl3CipherSuite which, PRInt32 *policy); 79 extern SECStatus ssl3_GetPolicy(ssl3CipherSuite which, PRInt32 *policy);
80 diff -pu a/nss/lib/ssl/sslsock.c b/nss/lib/ssl/sslsock.c 80 diff -pu a/nss/lib/ssl/sslsock.c b/nss/lib/ssl/sslsock.c
81 --- a/nss/lib/ssl/sslsock.c» 2014-01-03 19:44:16.416720928 -0800 81 --- a/nss/lib/ssl/sslsock.c» 2014-01-17 18:45:24.378132013 -0800
82 +++ b/nss/lib/ssl/sslsock.c» 2014-01-03 19:44:24.516853386 -0800 82 +++ b/nss/lib/ssl/sslsock.c» 2014-01-17 18:46:29.929216162 -0800
83 @@ -1256,6 +1256,19 @@ SSL_CipherPrefSet(PRFileDesc *fd, PRInt3 83 @@ -1278,6 +1278,19 @@ SSL_CipherPrefSet(PRFileDesc *fd, PRInt3
84 return rv; 84 return rv;
85 } 85 }
86 86
87 +SECStatus 87 +SECStatus
88 +SSL_CipherOrderSet(PRFileDesc *fd, const PRUint16 *ciphers, unsigned int len) 88 +SSL_CipherOrderSet(PRFileDesc *fd, const PRUint16 *ciphers, unsigned int len)
89 +{ 89 +{
90 + sslSocket *ss = ssl_FindSocket(fd); 90 + sslSocket *ss = ssl_FindSocket(fd);
91 + 91 +
92 + if (!ss) { 92 + if (!ss) {
93 + SSL_DBG(("%d: SSL[%d]: bad socket in CipherOrderSet", SSL_GETPID(), 93 + SSL_DBG(("%d: SSL[%d]: bad socket in CipherOrderSet", SSL_GETPID(),
94 + fd)); 94 + fd));
95 + return SECFailure; 95 + return SECFailure;
96 + } 96 + }
97 + return ssl3_CipherOrderSet(ss, ciphers, len); 97 + return ssl3_CipherOrderSet(ss, ciphers, len);
98 +} 98 +}
99 + 99 +
100 SECStatus 100 SECStatus
101 SSL_CipherPrefGet(PRFileDesc *fd, PRInt32 which, PRBool *enabled) 101 SSL_CipherPrefGet(PRFileDesc *fd, PRInt32 which, PRBool *enabled)
102 { 102 {
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698