projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[oweals/gnunet.git]
/
src
/
util
/
crypto_rsa.c
diff --git
a/src/util/crypto_rsa.c
b/src/util/crypto_rsa.c
index 491aa4f79aa22abe751a861632b0ab8e64ee13da..5820065301f0a20b541600b151bc74ab91dd6ec8 100644
(file)
--- a/
src/util/crypto_rsa.c
+++ b/
src/util/crypto_rsa.c
@@
-578,8
+578,7
@@
GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename)
GNUNET_DISK_OPEN_CREATE |
GNUNET_DISK_OPEN_FAILIFEXISTS,
GNUNET_DISK_PERM_USER_READ |
GNUNET_DISK_OPEN_CREATE |
GNUNET_DISK_OPEN_FAILIFEXISTS,
GNUNET_DISK_PERM_USER_READ |
- GNUNET_DISK_PERM_USER_WRITE |
- GNUNET_DISK_PERM_GROUP_READ);
+ GNUNET_DISK_PERM_USER_WRITE);
if (NULL == fd)
{
if (errno == EEXIST)
if (NULL == fd)
{
if (errno == EEXIST)
@@
-660,7
+659,7
@@
GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename)
sizeof (struct RsaPrivateKeyBinaryEncoded),
GNUNET_NO))
{
sizeof (struct RsaPrivateKeyBinaryEncoded),
GNUNET_NO))
{
- if (0 == ++cnt %
1
0)
+ if (0 == ++cnt %
6
0)
{
ec = errno;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
{
ec = errno;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@
-780,6
+779,8
@@
GNUNET_CRYPTO_rsa_encrypt (const void *block,
GNUNET_assert (size <= sizeof (GNUNET_HashCode));
pubkey = public2PrivateKey (publicKey);
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));
isize = size;
GNUNET_assert (0 ==
gcry_mpi_scan (&val, GCRYMPI_FMT_USG, block, isize, &isize));