chiark / gitweb /
rsa1: rsa_loadpriv_core: Introduce rsapriv_load_ctx
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Oct 2019 20:42:10 +0000 (21:42 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:49 +0000 (21:56 +0000)
commit4b9f8efbb918eb573f8b4b0289aa0349a4e68f4c
tree6af0a8ff1d6bebb03d4694cdfc66d49f16fc0da5
parent717c472de2c8b65950ebaca09666718fb670bcb4
rsa1: rsa_loadpriv_core: Introduce rsapriv_load_ctx

Make the LD* macros call a new function load_error, and `goto
error_out'.

We must add a call to rsapriv_dispose on the error_out path so that
rsapriv_load_core now always frees everything at every LD* point - so
now this is OK from a memory management pov.

load_error calls a hook function verror.  This is going to let us
parameterise the way rsapriv_load_core works.

No overall functional change yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
rsa.c