diff options
author | Werner Koch <wk@gnupg.org> | 2015-01-27 10:22:47 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-01-28 09:12:36 +0100 |
commit | 795965437732e50f6216d7f5db0e6174e90548a9 (patch) | |
tree | 3022add7f0478cfc58f6de433531892122ed9d36 /agent/agent.h | |
parent | scd: Fix varargs call for 64-bit arch on ECC keys. (diff) | |
download | gnupg2-795965437732e50f6216d7f5db0e6174e90548a9.tar.xz gnupg2-795965437732e50f6216d7f5db0e6174e90548a9.zip |
agent: Add some extra robustness to extract_private_key
* agent/cvt-openpgp.c (extract_private_key): Add arg "arraysize".
Make sure that R_FLAGS and R_CURVE are set to NULL.
--
Given that extract_private_key is not file local it is good to have some
extra asserts to protect against future wrong use.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent/agent.h')
-rw-r--r-- | agent/agent.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/agent/agent.h b/agent/agent.h index 0560835b0..45362421d 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -501,7 +501,8 @@ int agent_handle_learn (ctrl_t ctrl, int send, void *assuan_context); gpg_error_t extract_private_key (gcry_sexp_t s_key, int req_private_key_data, const char **r_algoname, int *r_npkey, int *r_nskey, - const char **r_format, gcry_mpi_t *mpi_array, + const char **r_format, + gcry_mpi_t *mpi_array, int arraysize, gcry_sexp_t *r_curve, gcry_sexp_t *r_flags); #endif /*AGENT_H*/ |