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

Unified Diff: net/third_party/nss/ssl/sslauth.c

Issue 9558017: Update net/third_party/nss to NSS 3.13.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Upload before checkin Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/third_party/nss/ssl/ssl3prot.h ('k') | net/third_party/nss/ssl/sslcon.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/sslauth.c
===================================================================
--- net/third_party/nss/ssl/sslauth.c (revision 124804)
+++ net/third_party/nss/ssl/sslauth.c (working copy)
@@ -33,7 +33,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-/* $Id: sslauth.c,v 1.16.66.1 2010/08/03 18:52:13 wtc%google.com Exp $ */
+/* $Id: sslauth.c,v 1.17 2010/08/03 18:48:45 wtc%google.com Exp $ */
#include "cert.h"
#include "secitem.h"
#include "ssl.h"
@@ -62,10 +62,9 @@
/* NEED LOCKS IN HERE. */
SECStatus
SSL_PeerCertificateChain(PRFileDesc *fd, CERTCertificate **certs,
- unsigned int *certsSize)
+ unsigned int *numCerts, unsigned int maxNumCerts)
{
sslSocket *ss;
- unsigned int inSize = *certsSize;
ssl3CertNode* cur;
ss = ssl_FindSocket(fd);
@@ -78,63 +77,23 @@
return SECFailure;
if (ss->sec.peerCert == NULL) {
- *certsSize = 0;
+ *numCerts = 0;
return SECSuccess;
}
- *certsSize = 1; /* for the leaf certificate */
- if (inSize > 0)
+ *numCerts = 1; /* for the leaf certificate */
+ if (maxNumCerts > 0)
certs[0] = CERT_DupCertificate(ss->sec.peerCert);
for (cur = ss->ssl3.peerCertChain; cur; cur = cur->next) {
- if (*certsSize < inSize)
- certs[*certsSize] = CERT_DupCertificate(cur->cert);
- (*certsSize)++;
+ if (*numCerts < maxNumCerts)
+ certs[*numCerts] = CERT_DupCertificate(cur->cert);
+ (*numCerts)++;
}
return SECSuccess;
}
-SECStatus
-SSL_SetPredictedPeerCertificates(PRFileDesc *fd, CERTCertificate **certs,
- unsigned int numCerts)
-{
- sslSocket *ss;
- unsigned int i;
-
- ss = ssl_FindSocket(fd);
- if (!ss) {
- SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetPredictedPeerCertificates",
- SSL_GETPID(), fd));
- return SECFailure;
- }
-
- ss->ssl3.predictedCertChain =
- PORT_NewArray(CERTCertificate*, numCerts + 1);
- if (!ss->ssl3.predictedCertChain)
- return SECFailure; /* error code was set */
- for (i = 0; i < numCerts; i++)
- ss->ssl3.predictedCertChain[i] = CERT_DupCertificate(certs[i]);
- ss->ssl3.predictedCertChain[numCerts] = NULL;
-
- return SECSuccess;
-}
-
-PRBool
-SSL_CertChainDigestReceived(PRFileDesc *fd)
-{
- sslSocket *ss;
-
- ss = ssl_FindSocket(fd);
- if (!ss) {
- SSL_DBG(("%d: SSL[%d]: bad socket in SSL_CertChainDigestReceived",
- SSL_GETPID(), fd));
- return SECFailure;
- }
-
- return ss->ssl3.cachedInfoCertChainDigestReceived;
-}
-
/* NEED LOCKS IN HERE. */
CERTCertificate *
SSL_LocalCertificate(PRFileDesc *fd)
« no previous file with comments | « net/third_party/nss/ssl/ssl3prot.h ('k') | net/third_party/nss/ssl/sslcon.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698