Chromium Code Reviews| Index: nss/mozilla/security/nss/lib/certhigh/certvfypkix.c |
| =================================================================== |
| --- nss/mozilla/security/nss/lib/certhigh/certvfypkix.c (revision 162724) |
| +++ nss/mozilla/security/nss/lib/certhigh/certvfypkix.c (working copy) |
| @@ -1522,6 +1522,7 @@ |
| PKIX_TrustAnchor *trustAnchor = NULL; |
| PKIX_PL_Date *revDate = NULL; |
| PKIX_RevocationChecker *revChecker = NULL; |
| + PKIX_PL_NssContext *nssContext = (PKIX_PL_NssContext *)plContext; |
| /* XXX we need a way to map generic PKIX error to generic NSS errors */ |
| @@ -1695,7 +1696,21 @@ |
| (PRBool)(param->value.scalar.b != 0), |
| plContext); |
| break; |
| - |
| + |
| + case cert_pi_chainVerifyCallback: |
| + { |
| + const CERTChainVerifyCallback *chainVerifyCallback = |
| + param->value.pointer.chainVerifyCallback; |
| + if (!chainVerifyCallback || !chainVerifyCallback->isChainValid) { |
| + PORT_SetError(errCode); |
| + r = SECFailure; |
| + break; |
| + } |
| + |
| + nssContext->chainVerifyCallback = *chainVerifyCallback; |
| + } |
| + break; |
|
wtc
2012/10/18 21:20:42
This break statement should be inside the {} block
Ryan Sleevi
2012/10/18 21:28:51
I don't think it matters, and Chromium style actua
wtc
2012/10/18 21:53:04
The code example in the Google C++ Style Guide put
|
| + |
| default: |
| PORT_SetError(errCode); |
| r = SECFailure; |