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

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

Issue 8771031: Add NSS function to retrieve TLS client cert types requested by server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes, add patch Created 9 years 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/third_party/nss/ssl/sslimpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 if (!ss) { 1608 if (!ss) {
1609 SSL_DBG(("%d: SSL[%d]: bad socket in SSL_HandshakeResumedSession", 1609 SSL_DBG(("%d: SSL[%d]: bad socket in SSL_HandshakeResumedSession",
1610 SSL_GETPID(), fd)); 1610 SSL_GETPID(), fd));
1611 return SECFailure; 1611 return SECFailure;
1612 } 1612 }
1613 1613
1614 *handshake_resumed = ss->ssl3.hs.isResuming; 1614 *handshake_resumed = ss->ssl3.hs.isResuming;
1615 return SECSuccess; 1615 return SECSuccess;
1616 } 1616 }
1617 1617
1618 const SECItem *
1619 SSL_GetRequestedClientCertificateTypes(PRFileDesc *fd)
1620 {
1621 sslSocket *ss = ssl_FindSocket(fd);
1622
1623 if (!ss) {
1624 SSL_DBG(("%d: SSL[%d]: bad socket in "
1625 "SSL_GetRequestedClientCertificateTypes", SSL_GETPID(), fd));
1626 return NULL;
1627 }
1628
1629 return ss->requestedCertTypes;
1630 }
1631
1618 /************************************************************************/ 1632 /************************************************************************/
1619 /* The following functions are the TOP LEVEL SSL functions. 1633 /* The following functions are the TOP LEVEL SSL functions.
1620 ** They all get called through the NSPRIOMethods table below. 1634 ** They all get called through the NSPRIOMethods table below.
1621 */ 1635 */
1622 1636
1623 static PRFileDesc * PR_CALLBACK 1637 static PRFileDesc * PR_CALLBACK
1624 ssl_Accept(PRFileDesc *fd, PRNetAddr *sockaddr, PRIntervalTime timeout) 1638 ssl_Accept(PRFileDesc *fd, PRNetAddr *sockaddr, PRIntervalTime timeout)
1625 { 1639 {
1626 sslSocket *ss; 1640 sslSocket *ss;
1627 sslSocket *ns = NULL; 1641 sslSocket *ns = NULL;
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 ss->preferredCipher = NULL; 2606 ss->preferredCipher = NULL;
2593 ss->url = NULL; 2607 ss->url = NULL;
2594 2608
2595 for (i=kt_null; i < kt_kea_size; i++) { 2609 for (i=kt_null; i < kt_kea_size; i++) {
2596 sslServerCerts * sc = ss->serverCerts + i; 2610 sslServerCerts * sc = ss->serverCerts + i;
2597 sc->serverCert = NULL; 2611 sc->serverCert = NULL;
2598 sc->serverCertChain = NULL; 2612 sc->serverCertChain = NULL;
2599 sc->serverKeyPair = NULL; 2613 sc->serverKeyPair = NULL;
2600 sc->serverKeyBits = 0; 2614 sc->serverKeyBits = 0;
2601 } 2615 }
2616 ss->requestedCertTypes = NULL;
2602 ss->stepDownKeyPair = NULL; 2617 ss->stepDownKeyPair = NULL;
2603 ss->dbHandle = CERT_GetDefaultCertDB(); 2618 ss->dbHandle = CERT_GetDefaultCertDB();
2604 2619
2605 /* Provide default implementation of hooks */ 2620 /* Provide default implementation of hooks */
2606 ss->authCertificate = SSL_AuthCertificate; 2621 ss->authCertificate = SSL_AuthCertificate;
2607 ss->authCertificateArg = (void *)ss->dbHandle; 2622 ss->authCertificateArg = (void *)ss->dbHandle;
2608 ss->sniSocketConfig = NULL; 2623 ss->sniSocketConfig = NULL;
2609 ss->sniSocketConfigArg = NULL; 2624 ss->sniSocketConfigArg = NULL;
2610 ss->getClientAuthData = NULL; 2625 ss->getClientAuthData = NULL;
2611 #ifdef NSS_PLATFORM_CLIENT_AUTH 2626 #ifdef NSS_PLATFORM_CLIENT_AUTH
(...skipping 20 matching lines...) Expand all
2632 if (status != SECSuccess) { 2647 if (status != SECSuccess) {
2633 loser: 2648 loser:
2634 ssl_DestroySocketContents(ss); 2649 ssl_DestroySocketContents(ss);
2635 ssl_DestroyLocks(ss); 2650 ssl_DestroyLocks(ss);
2636 PORT_Free(ss); 2651 PORT_Free(ss);
2637 ss = NULL; 2652 ss = NULL;
2638 } 2653 }
2639 } 2654 }
2640 return ss; 2655 return ss;
2641 } 2656 }
2642
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/sslimpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698