aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-25 12:17:04 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-25 12:17:04 +0100
commit0eaaeeeccd18fcfdef4c37ea56fc40daf097706a (patch)
tree70d7d4e52075a190123f76da46530708be280fa8 /src/transport
parent19d73a8facd4534c2ad2ab37bbdf047e715af2d5 (diff)
downloadgnunet-0eaaeeeccd18fcfdef4c37ea56fc40daf097706a.tar.gz
gnunet-0eaaeeeccd18fcfdef4c37ea56fc40daf097706a.zip
error handling
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-communicator-udp.c16
1 files 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,
1133{ 1133{
1134 char key[AES_KEY_SIZE]; 1134 char key[AES_KEY_SIZE];
1135 char iv[AES_IV_SIZE]; 1135 char iv[AES_IV_SIZE];
1136 int rc;
1136 1137
1137 gcry_cipher_open (cipher, 1138 GNUNET_assert (0 ==
1138 GCRY_CIPHER_AES256 /* low level: go for speed */, 1139 gcry_cipher_open (cipher,
1139 GCRY_CIPHER_MODE_GCM, 1140 GCRY_CIPHER_AES256 /* low level: go for speed */,
1140 0 /* flags */); 1141 GCRY_CIPHER_MODE_GCM,
1142 0 /* flags */));
1141 get_iv_key (msec, serial, key, iv); 1143 get_iv_key (msec, serial, key, iv);
1142 gcry_cipher_setkey (*cipher, key, sizeof(key)); 1144 rc = gcry_cipher_setkey (*cipher, key, sizeof(key));
1143 gcry_cipher_setiv (*cipher, iv, sizeof(iv)); 1145 GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY));
1146 rc = gcry_cipher_setiv (*cipher, iv, sizeof(iv));
1147 GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY));
1144} 1148}
1145 1149
1146 1150