| Index: nss/mozilla/security/nss/lib/pki/pki3hack.c
|
| ===================================================================
|
| --- nss/mozilla/security/nss/lib/pki/pki3hack.c (revision 123816)
|
| +++ nss/mozilla/security/nss/lib/pki/pki3hack.c (working copy)
|
| @@ -35,7 +35,7 @@
|
| * ***** END LICENSE BLOCK ***** */
|
|
|
| #ifdef DEBUG
|
| -static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.105 $ $Date: 2011/11/17 00:20:21 $";
|
| +static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.106 $ $Date: 2012/02/17 22:44:56 $";
|
| #endif /* DEBUG */
|
|
|
| /*
|
| @@ -768,6 +768,22 @@
|
| if (context) {
|
| /* trust */
|
| nssTrust = nssCryptoContext_FindTrustForCertificate(context, c);
|
| + if (!nssTrust) {
|
| + /* chicken and egg issue:
|
| + *
|
| + * c->issuer and c->serial are empty at this point, but
|
| + * nssTrustDomain_FindTrustForCertificate use them to look up
|
| + * up the trust object, so we point them to cc->derIssuer and
|
| + * cc->serialNumber.
|
| + *
|
| + * Our caller will fill these in with proper arena copies when we
|
| + * return. */
|
| + c->issuer.data = cc->derIssuer.data;
|
| + c->issuer.size = cc->derIssuer.len;
|
| + c->serial.data = cc->serialNumber.data;
|
| + c->serial.size = cc->serialNumber.len;
|
| + nssTrust = nssTrustDomain_FindTrustForCertificate(context->td, c);
|
| + }
|
| if (nssTrust) {
|
| trust = cert_trust_from_stan_trust(nssTrust, cc->arena);
|
| if (trust) {
|
|
|