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

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

Issue 10424013: Support TLS Channel IDs in NSS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update patch file before committing. Created 8 years, 6 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 /* ***** BEGIN LICENSE BLOCK ***** 1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 * 3 *
4 * The contents of this file are subject to the Mozilla Public License Version 4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with 5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at 6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/ 7 * http://www.mozilla.org/MPL/
8 * 8 *
9 * Software distributed under the License is distributed on an "AS IS" basis, 9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 SSL_DBG(("%d: SSL[%d]: bad socket in GetClientAuthDataHook", 244 SSL_DBG(("%d: SSL[%d]: bad socket in GetClientAuthDataHook",
245 SSL_GETPID(), s)); 245 SSL_GETPID(), s));
246 return SECFailure; 246 return SECFailure;
247 } 247 }
248 248
249 ss->getClientAuthData = func; 249 ss->getClientAuthData = func;
250 ss->getClientAuthDataArg = arg; 250 ss->getClientAuthDataArg = arg;
251 return SECSuccess; 251 return SECSuccess;
252 } 252 }
253 253
254 SECStatus
255 SSL_SetClientChannelIDCallback(PRFileDesc *fd,
256 SSLClientChannelIDCallback callback,
257 void *arg) {
258 sslSocket *ss = ssl_FindSocket(fd);
259
260 if (!ss) {
261 SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetClientChannelIDCallback",
262 SSL_GETPID(), fd));
263 return SECFailure;
264 }
265
266 ss->getChannelID = callback;
267 ss->getChannelIDArg = arg;
268
269 return SECSuccess;
270 }
271
254 #ifdef NSS_PLATFORM_CLIENT_AUTH 272 #ifdef NSS_PLATFORM_CLIENT_AUTH
255 /* NEED LOCKS IN HERE. */ 273 /* NEED LOCKS IN HERE. */
256 SECStatus 274 SECStatus
257 SSL_GetPlatformClientAuthDataHook(PRFileDesc *s, 275 SSL_GetPlatformClientAuthDataHook(PRFileDesc *s,
258 SSLGetPlatformClientAuthData func, 276 SSLGetPlatformClientAuthData func,
259 void *arg) 277 void *arg)
260 { 278 {
261 sslSocket *ss; 279 sslSocket *ss;
262 280
263 ss = ssl_FindSocket(s); 281 ss = ssl_FindSocket(s);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 hostname = ss->url; 346 hostname = ss->url;
329 if (hostname && hostname[0]) 347 if (hostname && hostname[0])
330 rv = CERT_VerifyCertName(ss->sec.peerCert, hostname); 348 rv = CERT_VerifyCertName(ss->sec.peerCert, hostname);
331 else 349 else
332 rv = SECFailure; 350 rv = SECFailure;
333 if (rv != SECSuccess) 351 if (rv != SECSuccess)
334 PORT_SetError(SSL_ERROR_BAD_CERT_DOMAIN); 352 PORT_SetError(SSL_ERROR_BAD_CERT_DOMAIN);
335 353
336 return rv; 354 return rv;
337 } 355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698