diff options
author | Luke Howard <lukeh@padl.com> | 2011-04-03 04:28:21 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-04-03 04:28:21 +0000 |
commit | b46e7973ca5bf55d56264e680eb287fe61ca6cb9 (patch) | |
tree | 7713ef60004ef396a750c3c67021dab4a6dd4258 | |
parent | 50ca1c1615629312d9511a2fdbc0c15249b5dcd9 (diff) | |
download | krb5-b46e7973ca5bf55d56264e680eb287fe61ca6cb9.zip krb5-b46e7973ca5bf55d56264e680eb287fe61ca6cb9.tar.gz krb5-b46e7973ca5bf55d56264e680eb287fe61ca6cb9.tar.bz2 |
cleanup
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/saml2@24812 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/plugins/authdata/saml_client/saml_authdata.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/authdata/saml_client/saml_authdata.cpp b/src/plugins/authdata/saml_client/saml_authdata.cpp index a69f313..c0c00a3 100644 --- a/src/plugins/authdata/saml_client/saml_authdata.cpp +++ b/src/plugins/authdata/saml_client/saml_authdata.cpp @@ -354,15 +354,16 @@ saml_import_authdata(krb5_context kcontext, krb5_const_principal issuer) { struct saml_context *sc = (struct saml_context *)request_context; + krb5_error_code code; + saml2::Assertion *assertion; - if (sc->assertion != NULL) { - delete sc->assertion; - sc->assertion = NULL; + code = saml_krb_decode_assertion(kcontext, authdata[0], &assertion); + if (code == 0) { + saml_unresolve(kcontext, sc); + sc->assertion = assertion; } - sc->verified = FALSE; - - return saml_krb_decode_assertion(kcontext, authdata[0], &sc->assertion); + return code; } static void @@ -377,6 +378,7 @@ saml_unresolve(krb5_context kcontext, delete sc->assertion; sc->assertion = NULL; + sc->verified = FALSE; } static void @@ -611,10 +613,9 @@ saml_set_attribute(krb5_context kcontext, } sc->attributes.push_back(attr); + sc->verified = FALSE; } - sc->verified = FALSE; - return 0; } @@ -634,10 +635,9 @@ saml_delete_attribute(krb5_context kcontext, i = saml_get_attribute_index(kcontext, sc, attribute); if (i >= 0) sc->attributes.erase(sc->attributes.begin() + i); + sc->verified = FALSE; } - sc->verified = FALSE; - return 0; } |