Chromium Code Reviews| Index: net/third_party/nss/ssl/sslauth.c |
| =================================================================== |
| --- net/third_party/nss/ssl/sslauth.c (revision 196870) |
| +++ net/third_party/nss/ssl/sslauth.c (working copy) |
| @@ -1,13 +1,14 @@ |
| /* This Source Code Form is subject to the terms of the Mozilla Public |
| * License, v. 2.0. If a copy of the MPL was not distributed with this |
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| -/* $Id: sslauth.c,v 1.18 2012/04/25 14:50:12 gerv%gerv.net Exp $ */ |
| +/* $Id$ */ |
| #include "cert.h" |
| #include "secitem.h" |
| #include "ssl.h" |
| #include "sslimpl.h" |
| #include "sslproto.h" |
| #include "pk11func.h" |
| +#include "ocsp.h" |
|
agl
2013/05/02 14:43:57
nit: these headers are no longer sorted.
wtc
2013/05/02 22:32:00
NSS doesn't require the headers to be sorted, so I
|
| /* NEED LOCKS IN HERE. */ |
| CERTCertificate * |
| @@ -289,6 +290,9 @@ |
| sslSocket * ss; |
| SECCertUsage certUsage; |
| const char * hostname = NULL; |
| + PRTime now = PR_Now(); |
| + SECItemArray *certStatusArray; |
| + unsigned int i; |
| ss = ssl_FindSocket(fd); |
| PORT_Assert(ss != NULL); |
| @@ -297,12 +301,18 @@ |
| } |
| handle = (CERTCertDBHandle *)arg; |
| + certStatusArray = &ss->sec.ci.sid->peerCertStatus; |
| + for (i = 0; i < certStatusArray->len; ++i) { |
| + CERT_CacheOCSPResponseFromSideChannel(handle, ss->sec.peerCert, |
| + now, &certStatusArray->items[i], arg); |
| + } |
| + |
| /* this may seem backwards, but isn't. */ |
| certUsage = isServer ? certUsageSSLClient : certUsageSSLServer; |
| - rv = CERT_VerifyCertNow(handle, ss->sec.peerCert, checkSig, certUsage, |
| - ss->pkcs11PinArg); |
| + rv = CERT_VerifyCert(handle, ss->sec.peerCert, checkSig, certUsage, |
| + now, ss->pkcs11PinArg, NULL); |
| if ( rv != SECSuccess || isServer ) |
| return rv; |