X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fprofile%2FAssertion20Validator.cpp;h=faff298e40d50d99d42c155dc9776e7309e5567c;hb=2f45703c670afd20e2d79e2dc51070856ae0eb65;hp=373df2761e9ca37f2414f89c9c01b870dbe592d5;hpb=7d897f427b1ca756046d85dea5dc533bf2df784d;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/profile/Assertion20Validator.cpp b/saml/saml2/profile/Assertion20Validator.cpp index 373df27..faff298 100644 --- a/saml/saml2/profile/Assertion20Validator.cpp +++ b/saml/saml2/profile/Assertion20Validator.cpp @@ -47,8 +47,11 @@ void AssertionValidator::validateAssertion(const Assertion& assertion) const #endif const Conditions* conds = assertion.getConditions(); + if (!conds) + return; + // First verify the time conditions, using the specified timestamp, if non-zero. - if (m_ts>0 && conds) { + if (m_ts>0) { unsigned int skew = XMLToolingConfig::getConfig().clock_skew_secs; time_t t=conds->getNotBeforeEpoch(); if (m_ts+skew < t) @@ -59,7 +62,6 @@ void AssertionValidator::validateAssertion(const Assertion& assertion) const } // Now we process conditions, starting with the known types and then extensions. - const vector& acvec = conds->getAudienceRestrictions(); for (vector::const_iterator ac = acvec.begin(); ac!=acvec.end(); ++ac) validateCondition(*ac);