-more changes towards fixing FTBFS
This commit is contained in:
parent
464c1f806c
commit
ec3d5a7655
@ -88,22 +88,58 @@ TALER_JSON_pack_time_rel_nbo (const char *name,
|
|||||||
|
|
||||||
|
|
||||||
struct GNUNET_JSON_PackSpec
|
struct GNUNET_JSON_PackSpec
|
||||||
TALER_JSON_pack_denomination_public_key (const char *name,
|
TALER_JSON_pack_denomination_public_key (
|
||||||
const struct
|
const char *name,
|
||||||
TALER_DenominationPublicKey *pk)
|
const struct TALER_DenominationPublicKey *pk)
|
||||||
{
|
{
|
||||||
return GNUNET_JSON_pack_rsa_public_key (name,
|
struct GNUNET_JSON_PackSpec ps = {
|
||||||
pk->rsa_public_key);
|
.field_name = name,
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (pk->cipher)
|
||||||
|
{
|
||||||
|
case TALER_DENOMINATION_RSA:
|
||||||
|
ps.object
|
||||||
|
= GNUNET_JSON_PACK (
|
||||||
|
GNUNET_JSON_pack_uint32 ("cipher",
|
||||||
|
TALER_DENOMINATION_RSA),
|
||||||
|
GNUNET_JSON_pack_uint32 ("age_mask",
|
||||||
|
pk->age_mask),
|
||||||
|
GNUNET_JSON_pack_rsa_public_key ("rsa_public_key",
|
||||||
|
pk->details.rsa_public_key));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
GNUNET_assert (0);
|
||||||
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
|
return ps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct GNUNET_JSON_PackSpec
|
struct GNUNET_JSON_PackSpec
|
||||||
TALER_JSON_pack_denomination_signature (const char *name,
|
TALER_JSON_pack_denomination_signature (
|
||||||
const struct
|
const char *name,
|
||||||
TALER_DenominationSignature *sig)
|
const struct TALER_DenominationSignature *sig)
|
||||||
{
|
{
|
||||||
return GNUNET_JSON_pack_rsa_signature (name,
|
struct GNUNET_JSON_PackSpec ps = {
|
||||||
sig->rsa_signature);
|
.field_name = name,
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (sig->cipher)
|
||||||
|
{
|
||||||
|
case TALER_DENOMINATION_RSA:
|
||||||
|
ps.object
|
||||||
|
= GNUNET_JSON_PACK (
|
||||||
|
GNUNET_JSON_pack_uint32 ("cipher",
|
||||||
|
TALER_DENOMINATION_RSA),
|
||||||
|
GNUNET_JSON_pack_rsa_signature ("rsa_signature",
|
||||||
|
sig->details.rsa_signature));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
GNUNET_assert (0);
|
||||||
|
return GNUNET_SYSERR;
|
||||||
|
}
|
||||||
|
return ps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -114,8 +150,8 @@ TALER_JSON_pack_amount (const char *name,
|
|||||||
struct GNUNET_JSON_PackSpec ps = {
|
struct GNUNET_JSON_PackSpec ps = {
|
||||||
.field_name = name,
|
.field_name = name,
|
||||||
.object = (NULL != amount)
|
.object = (NULL != amount)
|
||||||
? TALER_JSON_from_amount (amount)
|
? TALER_JSON_from_amount (amount)
|
||||||
: NULL
|
: NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
return ps;
|
return ps;
|
||||||
@ -129,8 +165,8 @@ TALER_JSON_pack_amount_nbo (const char *name,
|
|||||||
struct GNUNET_JSON_PackSpec ps = {
|
struct GNUNET_JSON_PackSpec ps = {
|
||||||
.field_name = name,
|
.field_name = name,
|
||||||
.object = (NULL != amount)
|
.object = (NULL != amount)
|
||||||
? TALER_JSON_from_amount_nbo (amount)
|
? TALER_JSON_from_amount_nbo (amount)
|
||||||
: NULL
|
: NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
return ps;
|
return ps;
|
||||||
|
Loading…
Reference in New Issue
Block a user