handling replies continuously from server
[oweals/gnunet.git] / src / util / crypto_rsa.c
index 2bb65f69b0e616520ed16d6418f86b53e9cbce99..0106f43be22049fd85ad460c8d54cff79bc615e3 100644 (file)
@@ -232,15 +232,15 @@ GNUNET_CRYPTO_rsa_public_key_to_string (struct GNUNET_CRYPTO_RsaPublicKeyBinaryE
     keylen += 5 - keylen % 5;
   keylen /= 5;
   pubkeybuf = GNUNET_malloc (keylen + 1);
-  end = GNUNET_STRINGS_data_to_string ((unsigned char *) &pub, 
-                                     sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 
-                                     pubkeybuf, 
-                                     keylen);
+  end = GNUNET_STRINGS_data_to_string ((unsigned char *) pub, 
+                                      sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 
+                                      pubkeybuf, 
+                                      keylen);
   if (NULL == end)
-    {
-      GNUNET_free (pubkeybuf);
-      return NULL;
-    }
+  {
+    GNUNET_free (pubkeybuf);
+    return NULL;
+  }
   *end = '\0';
   return pubkeybuf;
 }
@@ -726,7 +726,7 @@ GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename)
 
       return NULL;
     }
-    if (GNUNET_YES != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES))
+    if (GNUNET_OK != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES))
       fs = 0;
     if (fs < sizeof (struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded))
     {