mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
testcrypt: allow ssh_key constructors to fail.
If key decoding or verification fails, those functions can return NULL. Recognise that in the testcrypt API, so that I can test them.
This commit is contained in:
parent
4d0c2ca90f
commit
e9e800c773
@ -515,6 +515,7 @@ static void return_val_string_asciz(strbuf *out, char *s)
|
||||
NULLABLE_RETURN_WRAPPER(val_string_asciz, char *)
|
||||
NULLABLE_RETURN_WRAPPER(val_cipher, ssh_cipher *)
|
||||
NULLABLE_RETURN_WRAPPER(val_hash, ssh_hash *)
|
||||
NULLABLE_RETURN_WRAPPER(val_key, ssh_key *)
|
||||
|
||||
static void handle_hello(BinarySource *in, strbuf *out)
|
||||
{
|
||||
|
@ -145,8 +145,8 @@ FUNC1(val_string, ssh2_mac_genresult, val_mac)
|
||||
* returning a string.
|
||||
*/
|
||||
FUNC2(val_key, ssh_key_new_pub, keyalg, val_string_ptrlen)
|
||||
FUNC3(val_key, ssh_key_new_priv, keyalg, val_string_ptrlen, val_string_ptrlen)
|
||||
FUNC2(val_key, ssh_key_new_priv_openssh, keyalg, val_string_binarysource)
|
||||
FUNC3(opt_val_key, ssh_key_new_priv, keyalg, val_string_ptrlen, val_string_ptrlen)
|
||||
FUNC2(opt_val_key, ssh_key_new_priv_openssh, keyalg, val_string_binarysource)
|
||||
FUNC2(opt_val_string_asciz, ssh_key_invalid, val_key, uint)
|
||||
FUNC4(void, ssh_key_sign, val_key, val_string_ptrlen, uint, out_val_string_binarysink)
|
||||
FUNC3(boolean, ssh_key_verify, val_key, val_string_ptrlen, val_string_ptrlen)
|
||||
|
Loading…
Reference in New Issue
Block a user