Blame SOURCES/0009-lasso_saml20_login_process_response_status_and_asser.patch

a4238c
diff -up lasso-2.5.1/lasso/saml-2.0/login.c.coverity lasso-2.5.1/lasso/saml-2.0/login.c
a4238c
--- lasso-2.5.1/lasso/saml-2.0/login.c.coverity	2021-07-27 10:23:31.976845852 +0200
a4238c
+++ lasso-2.5.1/lasso/saml-2.0/login.c	2021-07-27 10:23:55.358913123 +0200
a4238c
@@ -1371,7 +1371,7 @@ lasso_saml20_login_process_response_stat
a4238c
 	char *status_value;
a4238c
 	lasso_error_t rc = 0;
a4238c
 	lasso_error_t assertion_signature_status = 0;
a4238c
-	LassoProfileSignatureVerifyHint verify_hint;
a4238c
+	LassoProfileSignatureVerifyHint verify_hint = LASSO_PROFILE_SIGNATURE_VERIFY_HINT_LAST;
a4238c
 
a4238c
 	profile = &login->parent;
a4238c
 	lasso_extract_node_or_fail(response, profile->response, SAMLP2_STATUS_RESPONSE,
a4238c
@@ -1492,20 +1492,12 @@ lasso_saml20_login_process_response_stat
a4238c
 		lasso_assign_gobject (login->private_data->saml2_assertion, last_assertion);
a4238c
 	}
a4238c
 
a4238c
-	switch (verify_hint) {
a4238c
-		case LASSO_PROFILE_SIGNATURE_VERIFY_HINT_FORCE:
a4238c
-		case LASSO_PROFILE_SIGNATURE_VERIFY_HINT_MAYBE:
a4238c
-			break;
a4238c
-		case LASSO_PROFILE_SIGNATURE_VERIFY_HINT_IGNORE:
a4238c
-			/* ignore signature errors */
a4238c
-			if (rc == LASSO_PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE) {
a4238c
-				rc = 0;
a4238c
-			}
a4238c
-			break;
a4238c
-		default:
a4238c
-			g_assert(0);
a4238c
-	}
a4238c
 cleanup:
a4238c
+	if (verify_hint == LASSO_PROFILE_SIGNATURE_VERIFY_HINT_IGNORE &&
a4238c
+		rc == LASSO_PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE) {
a4238c
+	    profile->signature_status = rc;
a4238c
+	    rc = 0;
a4238c
+	}
a4238c
 	return rc;
a4238c
 }
a4238c