projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'identity_abe' into identity_oidc
[oweals/gnunet.git]
/
src
/
json
/
test_json.c
diff --git
a/src/json/test_json.c
b/src/json/test_json.c
index a334bf599a5ef7f456297921d281361edbf2b52e..09a154678bba08f0d3022ca20892238e580ad835 100644
(file)
--- a/
src/json/test_json.c
+++ b/
src/json/test_json.c
@@
-150,28
+150,28
@@
test_raw ()
static int
test_rsa ()
{
static int
test_rsa ()
{
- struct GNUNET_CRYPTO_
rsa_
PublicKey *pub;
- struct GNUNET_CRYPTO_
rsa_
PublicKey *pub2;
+ struct GNUNET_CRYPTO_
Rsa
PublicKey *pub;
+ struct GNUNET_CRYPTO_
Rsa
PublicKey *pub2;
struct GNUNET_JSON_Specification pspec[] = {
GNUNET_JSON_spec_rsa_public_key (NULL, &pub2),
GNUNET_JSON_spec_end()
};
struct GNUNET_JSON_Specification pspec[] = {
GNUNET_JSON_spec_rsa_public_key (NULL, &pub2),
GNUNET_JSON_spec_end()
};
- struct GNUNET_CRYPTO_
rsa_
Signature *sig;
- struct GNUNET_CRYPTO_
rsa_
Signature *sig2;
+ struct GNUNET_CRYPTO_
Rsa
Signature *sig;
+ struct GNUNET_CRYPTO_
Rsa
Signature *sig2;
struct GNUNET_JSON_Specification sspec[] = {
GNUNET_JSON_spec_rsa_signature (NULL, &sig2),
GNUNET_JSON_spec_end()
};
struct GNUNET_JSON_Specification sspec[] = {
GNUNET_JSON_spec_rsa_signature (NULL, &sig2),
GNUNET_JSON_spec_end()
};
- struct GNUNET_CRYPTO_
rsa_
PrivateKey *priv;
-
char msg[] = "Hello"
;
+ struct GNUNET_CRYPTO_
Rsa
PrivateKey *priv;
+
struct GNUNET_HashCode msg
;
json_t *jp;
json_t *js;
priv = GNUNET_CRYPTO_rsa_private_key_create (1024);
pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv);
json_t *jp;
json_t *js;
priv = GNUNET_CRYPTO_rsa_private_key_create (1024);
pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv);
- sig = GNUNET_CRYPTO_rsa_sign (priv,
-
msg
,
-
sizeof (msg)
);
+ memset (&msg, 42, sizeof (msg));
+
sig = GNUNET_CRYPTO_rsa_sign_fdh (priv
,
+
&msg
);
GNUNET_assert (NULL != (jp = GNUNET_JSON_from_rsa_public_key (pub)));
GNUNET_assert (NULL != (js = GNUNET_JSON_from_rsa_signature (sig)));
GNUNET_assert (GNUNET_OK ==
GNUNET_assert (NULL != (jp = GNUNET_JSON_from_rsa_public_key (pub)));
GNUNET_assert (NULL != (js = GNUNET_JSON_from_rsa_signature (sig)));
GNUNET_assert (GNUNET_OK ==