aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-17 01:04:35 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-17 01:04:35 +0100
commitcb50ebbc641ed40d24a0fed24797dded5bcc5745 (patch)
tree62be950837fdb7ebce737c8be4977676cd12f978 /src/include
parent39c6d488d4b8b8061ac33a902064cd5b2167b60c (diff)
downloadgnunet-cb50ebbc641ed40d24a0fed24797dded5bcc5745.tar.gz
gnunet-cb50ebbc641ed40d24a0fed24797dded5bcc5745.zip
use void * instead of char * for RSA key material to make it more clear that these are not 0-terminated strings
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_crypto_lib.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 00fe3fbef..f22e87075 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -1908,7 +1908,7 @@ GNUNET_CRYPTO_rsa_private_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *key);
1908size_t 1908size_t
1909GNUNET_CRYPTO_rsa_private_key_encode ( 1909GNUNET_CRYPTO_rsa_private_key_encode (
1910 const struct GNUNET_CRYPTO_RsaPrivateKey *key, 1910 const struct GNUNET_CRYPTO_RsaPrivateKey *key,
1911 char **buffer); 1911 void **buffer);
1912 1912
1913 1913
1914/** 1914/**
@@ -1916,11 +1916,12 @@ GNUNET_CRYPTO_rsa_private_key_encode (
1916 * to the "normal", internal format. 1916 * to the "normal", internal format.
1917 * 1917 *
1918 * @param buf the buffer where the private key data is stored 1918 * @param buf the buffer where the private key data is stored
1919 * @param len the length of the data in @a buf 1919 * @param buf_size the size of the data in @a buf
1920 * @return NULL on error 1920 * @return NULL on error
1921 */ 1921 */
1922struct GNUNET_CRYPTO_RsaPrivateKey * 1922struct GNUNET_CRYPTO_RsaPrivateKey *
1923GNUNET_CRYPTO_rsa_private_key_decode (const char *buf, size_t len); 1923GNUNET_CRYPTO_rsa_private_key_decode (const void *buf,
1924 size_t buf_size);
1924 1925
1925 1926
1926/** 1927/**
@@ -1986,7 +1987,7 @@ GNUNET_CRYPTO_rsa_public_key_free (struct GNUNET_CRYPTO_RsaPublicKey *key);
1986size_t 1987size_t
1987GNUNET_CRYPTO_rsa_public_key_encode ( 1988GNUNET_CRYPTO_rsa_public_key_encode (
1988 const struct GNUNET_CRYPTO_RsaPublicKey *key, 1989 const struct GNUNET_CRYPTO_RsaPublicKey *key,
1989 char **buffer); 1990 void **buffer);
1990 1991
1991 1992
1992/** 1993/**
@@ -2060,7 +2061,7 @@ int
2060GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, 2061GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash,
2061 const struct GNUNET_CRYPTO_RsaBlindingKeySecret *bks, 2062 const struct GNUNET_CRYPTO_RsaBlindingKeySecret *bks,
2062 struct GNUNET_CRYPTO_RsaPublicKey *pkey, 2063 struct GNUNET_CRYPTO_RsaPublicKey *pkey,
2063 char **buf, 2064 void **buf,
2064 size_t *buf_size); 2065 size_t *buf_size);
2065 2066
2066 2067
@@ -2109,7 +2110,7 @@ GNUNET_CRYPTO_rsa_signature_free (struct GNUNET_CRYPTO_RsaSignature *sig);
2109size_t 2110size_t
2110GNUNET_CRYPTO_rsa_signature_encode ( 2111GNUNET_CRYPTO_rsa_signature_encode (
2111 const struct GNUNET_CRYPTO_RsaSignature *sig, 2112 const struct GNUNET_CRYPTO_RsaSignature *sig,
2112 char **buffer); 2113 void **buffer);
2113 2114
2114 2115
2115/** 2116/**
@@ -2117,11 +2118,12 @@ GNUNET_CRYPTO_rsa_signature_encode (
2117 * format. 2118 * format.
2118 * 2119 *
2119 * @param buf the buffer where the public key data is stored 2120 * @param buf the buffer where the public key data is stored
2120 * @param len the length of the data in @a buf 2121 * @param buf_size the number of bytes of the data in @a buf
2121 * @return NULL on error 2122 * @return NULL on error
2122 */ 2123 */
2123struct GNUNET_CRYPTO_RsaSignature * 2124struct GNUNET_CRYPTO_RsaSignature *
2124GNUNET_CRYPTO_rsa_signature_decode (const char *buf, size_t len); 2125GNUNET_CRYPTO_rsa_signature_decode (const void *buf,
2126 size_t buf_size);
2125 2127
2126 2128
2127/** 2129/**