X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fcrypto_rsa.c;h=5820065301f0a20b541600b151bc74ab91dd6ec8;hb=d47f834c1f2de41c9fba74a4b6928e7c8e0679e0;hp=c15dff945669d787e8f4e386a53f52c2d601a33f;hpb=2b35a08fcb4a73dcfcdbcc1a89324c30ab793236;p=oweals%2Fgnunet.git diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index c15dff945..582006530 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c @@ -659,7 +659,7 @@ GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename) sizeof (struct RsaPrivateKeyBinaryEncoded), GNUNET_NO)) { - if (0 == ++cnt % 10) + if (0 == ++cnt % 60) { ec = errno; GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -779,6 +779,8 @@ GNUNET_CRYPTO_rsa_encrypt (const void *block, GNUNET_assert (size <= sizeof (GNUNET_HashCode)); pubkey = public2PrivateKey (publicKey); + if (pubkey == NULL) + return GNUNET_SYSERR; isize = size; GNUNET_assert (0 == gcry_mpi_scan (&val, GCRYMPI_FMT_USG, block, isize, &isize));