aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/taler_kyclogic_plugin.h8
-rw-r--r--src/kyclogic/plugin_kyclogic_kycaid.c29
-rw-r--r--src/kyclogic/plugin_kyclogic_oauth2.c14
-rw-r--r--src/kyclogic/plugin_kyclogic_persona.c23
4 files changed, 69 insertions, 5 deletions
diff --git a/src/include/taler_kyclogic_plugin.h b/src/include/taler_kyclogic_plugin.h
index 22e4f894f..a9a4dd97a 100644
--- a/src/include/taler_kyclogic_plugin.h
+++ b/src/include/taler_kyclogic_plugin.h
@@ -99,7 +99,13 @@ enum TALER_KYCLOGIC_KycStatus
* Return code set to not update the KYC status
* at all.
*/
- TALER_KYCLOGIC_STATUS_KEEP = 16
+ TALER_KYCLOGIC_STATUS_KEEP = 16,
+
+ /**
+ * We had an internal logic failure.
+ */
+ TALER_KYCLOGIC_STATUS_INTERNAL_ERROR = 32
+
};
diff --git a/src/kyclogic/plugin_kyclogic_kycaid.c b/src/kyclogic/plugin_kyclogic_kycaid.c
index b1b9f0a49..726ba7ead 100644
--- a/src/kyclogic/plugin_kyclogic_kycaid.c
+++ b/src/kyclogic/plugin_kyclogic_kycaid.c
@@ -361,10 +361,10 @@ kycaid_load_configuration (void *cls,
return NULL;
}
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (ps->cfg,
- provider_section_name,
- "KYC_KYCAID_CONVERTER_HELPER",
- &pd->conversion_helper))
+ GNUNET_CONFIGURATION_get_value_string (ps->cfg,
+ provider_section_name,
+ "KYC_KYCAID_CONVERTER_HELPER",
+ &pd->conversion_helper))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
provider_section_name,
@@ -968,6 +968,27 @@ handle_webhook_finished (void *cls,
"-a",
wh->pd->auth_token,
NULL);
+ if (NULL == wh->econ)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to start KYCAID conversion helper `%s'\n",
+ wh->pd->conversion_helper);
+ resp = TALER_MHD_make_error (
+ TALER_EC_EXCHANGE_GENERIC_KYC_CONVERTER_FAILED,
+ NULL);
+ wh->cb (wh->cb_cls,
+ wh->process_row,
+ &wh->h_payto,
+ wh->pd->section,
+ wh->applicant_id,
+ wh->verification_id,
+ TALER_KYCLOGIC_STATUS_INTERNAL_ERROR,
+ GNUNET_TIME_UNIT_ZERO_ABS, /* expiration */
+ NULL,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ resp);
+ break;
+ }
return;
}
break;
diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c b/src/kyclogic/plugin_kyclogic_oauth2.c
index 5ef1330ad..7c57b5ae1 100644
--- a/src/kyclogic/plugin_kyclogic_oauth2.c
+++ b/src/kyclogic/plugin_kyclogic_oauth2.c
@@ -1023,6 +1023,20 @@ parse_proof_success_reply (struct TALER_KYCLOGIC_ProofHandle *ph,
pd->conversion_binary,
pd->conversion_binary,
NULL);
+ if (NULL == ph->ec)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to start KYCAID conversion helper `%s'\n",
+ pd->conversion_binary);
+ ph->status = TALER_KYCLOGIC_STATUS_INTERNAL_ERROR;
+ ph->response
+ = TALER_MHD_make_error (
+ TALER_EC_EXCHANGE_GENERIC_KYC_CONVERTER_FAILED,
+ "Failed to launch KYC conversion helper");
+ ph->http_status
+ = MHD_HTTP_INTERNAL_SERVER_ERROR;
+ return;
+ }
}
diff --git a/src/kyclogic/plugin_kyclogic_persona.c b/src/kyclogic/plugin_kyclogic_persona.c
index 7568af1f5..2183c6121 100644
--- a/src/kyclogic/plugin_kyclogic_persona.c
+++ b/src/kyclogic/plugin_kyclogic_persona.c
@@ -1257,6 +1257,20 @@ handle_proof_finished (void *cls,
j,
&proof_post_conversion_cb,
ph);
+ if (NULL == ph->ec)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to start Persona conversion helper\n");
+ proof_reply_error (
+ ph,
+ ph->inquiry_id,
+ MHD_HTTP_BAD_GATEWAY,
+ "persona-logic-failure",
+ GNUNET_JSON_PACK (
+ TALER_JSON_pack_ec (
+ TALER_EC_EXCHANGE_GENERIC_KYC_CONVERTER_FAILED)));
+ break;
+ }
}
return; /* continued in proof_post_conversion_cb */
}
@@ -1771,6 +1785,15 @@ handle_webhook_finished (void *cls,
j,
&webhook_post_conversion_cb,
wh);
+ if (NULL == wh->ec)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to start Persona conversion helper\n");
+ webhook_reply_error (wh,
+ inquiry_id,
+ MHD_HTTP_INTERNAL_SERVER_ERROR);
+ break;
+ }
}
return; /* continued in webhook_post_conversion_cb */
}