diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2020-11-08 01:57:15 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2020-11-08 01:57:15 +0100 |
commit | ca808598b9c28e1bb089d2d8cb7ec9332f2c0137 (patch) | |
tree | e2268b0adf857f01bd3289b88f6e5f5a625b9525 | |
parent | c517aefd0325f6113008a6eb834c6dfe5156cb65 (diff) | |
download | gnunet-ca808598b9c28e1bb089d2d8cb7ec9332f2c0137.tar.gz gnunet-ca808598b9c28e1bb089d2d8cb7ec9332f2c0137.zip |
fixed signature asserts
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_identity_service.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 03fb16a43..2bbf2b1e7 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -1700,7 +1700,7 @@ GNUNET_CRYPTO_eddsa_sign_ ( | |||
1700 | */ | 1700 | */ |
1701 | #define GNUNET_CRYPTO_eddsa_sign(priv,ps,sig) do { \ | 1701 | #define GNUNET_CRYPTO_eddsa_sign(priv,ps,sig) do { \ |
1702 | /* check size is set correctly */ \ | 1702 | /* check size is set correctly */ \ |
1703 | GNUNET_assert (htonl ((ps)->purpose.size) == sizeof (*ps)); \ | 1703 | GNUNET_assert (ntohl ((ps)->purpose.size) == sizeof (*ps)); \ |
1704 | /* check 'ps' begins with the purpose */ \ | 1704 | /* check 'ps' begins with the purpose */ \ |
1705 | GNUNET_static_assert (((void*) (ps)) == \ | 1705 | GNUNET_static_assert (((void*) (ps)) == \ |
1706 | ((void*) &(ps)->purpose)); \ | 1706 | ((void*) &(ps)->purpose)); \ |
@@ -1747,7 +1747,7 @@ GNUNET_CRYPTO_ecdsa_sign_ ( | |||
1747 | */ | 1747 | */ |
1748 | #define GNUNET_CRYPTO_ecdsa_sign(priv,ps,sig) do { \ | 1748 | #define GNUNET_CRYPTO_ecdsa_sign(priv,ps,sig) do { \ |
1749 | /* check size is set correctly */ \ | 1749 | /* check size is set correctly */ \ |
1750 | GNUNET_assert (htonl ((ps)->purpose.size) == sizeof (*(ps))); \ | 1750 | GNUNET_assert (ntohl ((ps)->purpose.size) == sizeof (*(ps))); \ |
1751 | /* check 'ps' begins with the purpose */ \ | 1751 | /* check 'ps' begins with the purpose */ \ |
1752 | GNUNET_static_assert (((void*) (ps)) == \ | 1752 | GNUNET_static_assert (((void*) (ps)) == \ |
1753 | ((void*) &(ps)->purpose)); \ | 1753 | ((void*) &(ps)->purpose)); \ |
@@ -1853,7 +1853,7 @@ GNUNET_CRYPTO_ecdsa_verify_ ( | |||
1853 | */ | 1853 | */ |
1854 | #define GNUNET_CRYPTO_ecdsa_verify(purp,ps,sig,pub) ({ \ | 1854 | #define GNUNET_CRYPTO_ecdsa_verify(purp,ps,sig,pub) ({ \ |
1855 | /* check size is set correctly */ \ | 1855 | /* check size is set correctly */ \ |
1856 | GNUNET_assert (htonl ((ps)->purpose.size) == sizeof (*(ps))); \ | 1856 | GNUNET_assert (ntohl ((ps)->purpose.size) == sizeof (*(ps))); \ |
1857 | /* check 'ps' begins with the purpose */ \ | 1857 | /* check 'ps' begins with the purpose */ \ |
1858 | GNUNET_static_assert (((void*) (ps)) == \ | 1858 | GNUNET_static_assert (((void*) (ps)) == \ |
1859 | ((void*) &(ps)->purpose)); \ | 1859 | ((void*) &(ps)->purpose)); \ |
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h index 64799f195..66761e526 100644 --- a/src/include/gnunet_identity_service.h +++ b/src/include/gnunet_identity_service.h | |||
@@ -523,7 +523,7 @@ GNUNET_IDENTITY_private_key_sign_ (const struct GNUNET_IDENTITY_PrivateKey *priv | |||
523 | */ | 523 | */ |
524 | #define GNUNET_IDENTITY_private_key_sign(priv,ps,sig) do { \ | 524 | #define GNUNET_IDENTITY_private_key_sign(priv,ps,sig) do { \ |
525 | /* check size is set correctly */ \ | 525 | /* check size is set correctly */ \ |
526 | GNUNET_assert (htonl ((ps)->purpose.size) == sizeof (*(ps))); \ | 526 | GNUNET_assert (ntohl ((ps)->purpose.size) == sizeof (*(ps))); \ |
527 | /* check 'ps' begins with the purpose */ \ | 527 | /* check 'ps' begins with the purpose */ \ |
528 | GNUNET_static_assert (((void*) (ps)) == \ | 528 | GNUNET_static_assert (((void*) (ps)) == \ |
529 | ((void*) &(ps)->purpose)); \ | 529 | ((void*) &(ps)->purpose)); \ |