aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-27 12:54:34 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-27 12:54:34 +0000
commit673effab80be5340cb0b5f37f8efb48e1c9824f2 (patch)
treef895374f9ff07700eb7f01e4aaa0b7187a0d31f4 /src/util
parentc4fda38692f5d436d1fdc94feb29e3d19e3cb6c9 (diff)
downloadgnunet-673effab80be5340cb0b5f37f8efb48e1c9824f2.tar.gz
gnunet-673effab80be5340cb0b5f37f8efb48e1c9824f2.zip
-check return value
Diffstat (limited to 'src/util')
-rw-r--r--src/util/gnunet-rsa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/gnunet-rsa.c b/src/util/gnunet-rsa.c
index be58e9200..64990e5ef 100644
--- a/src/util/gnunet-rsa.c
+++ b/src/util/gnunet-rsa.c
@@ -126,7 +126,11 @@ create_keys (const char *fn)
126 GNUNET_CRYPTO_hash (&make_keys, sizeof (make_keys), &h2); 126 GNUNET_CRYPTO_hash (&make_keys, sizeof (make_keys), &h2);
127 GNUNET_CRYPTO_hash (&hc, sizeof (hc), &h3); 127 GNUNET_CRYPTO_hash (&hc, sizeof (hc), &h3);
128 GNUNET_CRYPTO_hash_xor (&h2, &h3, &hc); 128 GNUNET_CRYPTO_hash_xor (&h2, &h3, &hc);
129 pk = GNUNET_CRYPTO_rsa_key_create_from_hash (&hc); 129 if (NULL == (pk = GNUNET_CRYPTO_rsa_key_create_from_hash (&hc))
130 {
131 GNUNET_break (0);
132 break;
133 }
130 enc = GNUNET_CRYPTO_rsa_encode_key (pk); 134 enc = GNUNET_CRYPTO_rsa_encode_key (pk);
131 if (htons (enc->len) != fwrite (enc, 1, htons (enc->len), f)) 135 if (htons (enc->len) != fwrite (enc, 1, htons (enc->len), f))
132 { 136 {