[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: error handling
From: |
gnunet |
Subject: |
[gnunet] branch master updated: error handling |
Date: |
Wed, 25 Mar 2020 12:21:29 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 0eaaeeecc error handling
0eaaeeecc is described below
commit 0eaaeeeccd18fcfdef4c37ea56fc40daf097706a
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Mar 25 12:17:04 2020 +0100
error handling
---
src/transport/gnunet-communicator-udp.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/transport/gnunet-communicator-udp.c
b/src/transport/gnunet-communicator-udp.c
index e931bd2e7..d767689b9 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -1133,14 +1133,18 @@ setup_cipher (const struct GNUNET_HashCode *msec,
{
char key[AES_KEY_SIZE];
char iv[AES_IV_SIZE];
+ int rc;
- gcry_cipher_open (cipher,
- GCRY_CIPHER_AES256 /* low level: go for speed */,
- GCRY_CIPHER_MODE_GCM,
- 0 /* flags */);
+ GNUNET_assert (0 ==
+ gcry_cipher_open (cipher,
+ GCRY_CIPHER_AES256 /* low level: go for
speed */,
+ GCRY_CIPHER_MODE_GCM,
+ 0 /* flags */));
get_iv_key (msec, serial, key, iv);
- gcry_cipher_setkey (*cipher, key, sizeof(key));
- gcry_cipher_setiv (*cipher, iv, sizeof(iv));
+ rc = gcry_cipher_setkey (*cipher, key, sizeof(key));
+ GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY));
+ rc = gcry_cipher_setiv (*cipher, iv, sizeof(iv));
+ GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY));
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: error handling,
gnunet <=