This is needed allow the site code to load and unload keys
dynamically.
This is just the interface, with no implemntation and no callers,
split out like this for early review.
The two xxx's will be fixed rather later in
"rsa1: Provide dispose functions"
(but, obviously, before we add any callers).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
st->ops.unpick=rsa_sig_unpick;
st->ops.check=rsa_sig_check;
st->ops.hash=0;
st->ops.unpick=rsa_sig_unpick;
st->ops.check=rsa_sig_check;
st->ops.hash=0;
+ st->ops.dispose=0; /* xxx */
st->loc=loc;
i=list_elem(args,0);
st->loc=loc;
i=list_elem(args,0);
st->common.hashbuf=NULL;
st->ops.sign=rsa_sign;
st->ops.hash=0;
st->common.hashbuf=NULL;
st->ops.sign=rsa_sign;
st->ops.hash=0;
+ st->ops.dispose=0; /* xxx */
st->loc=loc;
/* Argument is filename pointing to SSH1 private key file */
st->loc=loc;
/* Argument is filename pointing to SSH1 private key file */
/* SIGPUBKEY interface */
typedef void sig_sethash_fn(void *st, struct hash_if *hash);
/* SIGPUBKEY interface */
typedef void sig_sethash_fn(void *st, struct hash_if *hash);
+typedef void sig_dispose_fn(void *st);
+
typedef bool_t sig_unpick_fn(void *sst, struct buffer_if *msg,
struct alg_msg_data *sig);
typedef bool_t sig_checksig_fn(void *st, uint8_t *data, int32_t datalen,
typedef bool_t sig_unpick_fn(void *sst, struct buffer_if *msg,
struct alg_msg_data *sig);
typedef bool_t sig_checksig_fn(void *st, uint8_t *data, int32_t datalen,
sig_unpick_fn *unpick;
sig_checksig_fn *check;
const struct hash_if *hash;
sig_unpick_fn *unpick;
sig_checksig_fn *check;
const struct hash_if *hash;
+ sig_dispose_fn *dispose;
};
/* SIGPRIVKEY interface */
};
/* SIGPRIVKEY interface */
sig_sethash_fn *sethash; /* must be called before use, if non-0 */
sig_makesig_fn *sign;
const struct hash_if *hash;
sig_sethash_fn *sethash; /* must be called before use, if non-0 */
sig_makesig_fn *sign;
const struct hash_if *hash;
+ sig_dispose_fn *dispose;