refuse to start if we have no denominations
This commit is contained in:
parent
f6fe309f5d
commit
f5d7653ef0
@ -673,9 +673,14 @@ TEH_KS_acquire_ (const char *location)
|
|||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Loading keys from `%s'\n",
|
"Loading keys from `%s'\n",
|
||||||
TEH_exchange_directory);
|
TEH_exchange_directory);
|
||||||
TALER_EXCHANGEDB_denomination_keys_iterate (TEH_exchange_directory,
|
if (-1 == TALER_EXCHANGEDB_denomination_keys_iterate (TEH_exchange_directory,
|
||||||
&reload_keys_denom_iter,
|
&reload_keys_denom_iter,
|
||||||
key_state);
|
key_state))
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Can't load denomination keys.\n");
|
||||||
|
GNUNET_assert (0 == pthread_mutex_unlock (&internal_key_state_mutex));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
TALER_EXCHANGEDB_signing_keys_iterate (TEH_exchange_directory,
|
TALER_EXCHANGEDB_signing_keys_iterate (TEH_exchange_directory,
|
||||||
&reload_keys_sign_iter,
|
&reload_keys_sign_iter,
|
||||||
key_state);
|
key_state);
|
||||||
@ -693,6 +698,14 @@ TEH_KS_acquire_ (const char *location)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 == GNUNET_CONTAINER_multihashmap_size (key_state->denomkey_map))
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"Have no denomination keys. Bad configuration.\n");
|
||||||
|
GNUNET_assert (0 == pthread_mutex_unlock (&internal_key_state_mutex));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ks.purpose.size = htonl (sizeof (ks));
|
ks.purpose.size = htonl (sizeof (ks));
|
||||||
ks.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_KEY_SET);
|
ks.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_KEY_SET);
|
||||||
ks.list_issue_date = GNUNET_TIME_absolute_hton (key_state->reload_time);
|
ks.list_issue_date = GNUNET_TIME_absolute_hton (key_state->reload_time);
|
||||||
|
Loading…
Reference in New Issue
Block a user