]> 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>
Thu, 16 May 2024 23:36:55 +0000 (01:36 +0200)
commit84b145f3783f4740c7aa4e223e39aad51e3dec33
treeb281d36397218cc4b5ae193aa946c10f1a586438
parentcab9994d36e29cdf92bd0ce340182a6c8b3a79dc
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