Blame SOURCES/0009-lasso_saml20_login_process_response_status_and_asser.patch

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