lasso/tests
John Dennis 642182bdf4 Fix ECP signature not found error when only assertion is signed (#26828)
With a SAML Authn Response either the message or the assertion
contained in the response message or both can be signed. Most IdP's
sign the message. This fixes a bug when processing an ECP authn
response when only the assertion is signed.

lasso_saml20_profile_process_soap_response_with_headers() performs a
signature check on the SAML message. A signature can also appear on
the assertion which is checked by
lasso_saml20_login_process_response_status_and_assertion() The problem
occurred when the message was not signed and
lasso_saml20_profile_process_soap_response_with_headers() returned
LASSO_DS_ERROR_SIGNATURE_NOT_FOUND as an error code which is not
actually an error because we haven't checked the signature on the
assertion yet. We were returning the first
LASSO_DS_ERROR_SIGNATURE_NOT_FOUND error when in fact the subsequent
signature check in
lasso_saml20_login_process_response_status_and_assertion() succeeded.

The ECP unit tests were enhanced to cover these cases.

The enhanced unit test revealed a problem in two switch statements
operating on the return value of
lasso_profile_get_signature_verify_hint() which were missing a case
statement for LASSO_PROFILE_SIGNATURE_VERIFY_HINT_FORCE which caused
an abort due to an unknown enumeration value.

Fixes Bug: 26828
License: MIT
Signed-off-by: John Dennis <jdennis@redhat.com>
2019-01-11 16:11:31 +01:00
..
data deprecate loading PEM formatted public keys in lasso_xmlsec_load_key_info 2018-05-01 12:06:15 +02:00
integration Make more Python scripts compatible with both Py2 and Py3 2018-07-24 11:03:09 +02:00
valgrind tests: update valgrind suppressions 2015-11-25 04:15:27 +01:00
Makefile.am Makefile.am: fix automake warning 2015-08-24 10:18:52 +02:00
assertion_query_saml2.c Fix license boilerplates 2013-12-03 21:55:06 +01:00
basic_tests.c tools: fix segfault in lasso_get_saml_message (fixes #24830) 2018-06-28 10:30:53 +02:00
idwsf2_tests.c Fix license boilerplates 2013-12-03 21:55:06 +01:00
login_tests.c route logs from libxml2 and libxmlsec through GLib logging 2018-04-06 17:23:13 +02:00
login_tests_saml2.c Fix ECP signature not found error when only assertion is signed (#26828) 2019-01-11 16:11:31 +01:00
metadata_tests.c deprecate loading PEM formatted public keys in lasso_xmlsec_load_key_info 2018-05-01 12:06:15 +02:00
non_regression_tests.c xml: handle failure of xmlSecBase64Decode() (fixes #8070) 2015-08-24 10:25:03 +02:00
perfs.c Fix license boilerplates 2013-12-03 21:55:06 +01:00
random_tests.c Fix license boilerplates 2013-12-03 21:55:06 +01:00
tests.c tests: prevent crash in glib caused by abort on recursive logging 2018-04-06 17:23:14 +02:00
tests.h tests: prevent crash in glib caused by abort on recursive logging 2018-04-06 17:23:14 +02:00
tests2.c fix compilation errors on 64bits architectures 2013-09-08 21:33:58 +02:00