]> git.tuebingen.mpg.de Git - paraslash.git/commit
apc_pub_encrypt: Let the callee allocate the buffer.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 2 May 2023 21:56:26 +0000 (23:56 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 17 Mar 2024 11:35:04 +0000 (12:35 +0100)
commitc9d82ed7bf01e5fb21e530ba819915a984e9efc4
tree5d5bb5dddfaad78313dc4f9e817b660154240ebb
parentbfa89349d869e27dbe3467236ba269bca0a6f148
apc_pub_encrypt: Let the callee allocate the buffer.

Change the encryption routine of the apc API to allocate a suitably
sized buffer itself. Currently, the caller has to guess the size of the
buffer to pass to the function and we reuse our 4k handshake buffer for
that. While 4k is is plenty at the moment, that may change, and it's
always better to use the exact size if it is readily available. This
is the case here because the required buffer size is just the number
of bits of the modulus of the key.
command.c
crypt.h
gcrypt.c
openssl.c