diff options
author | Jakub Jelen <jjelen@redhat.com> | 2021-01-11 13:03:40 +0100 |
---|---|---|
committer | Jakub Jelen <jjelen@redhat.com> | 2021-01-12 12:46:24 +0100 |
commit | 832abe7f4ab6f905b15926393952ef8134c18c81 (patch) | |
tree | 83913bbd03731948c8c727af46097341c49a49a5 /include/libssh | |
parent | cdac4fca5fd0ab1b92fcfc0ab93d0797f263c736 (diff) | |
download | libssh-832abe7f4ab6f905b15926393952ef8134c18c81.tar.gz libssh-832abe7f4ab6f905b15926393952ef8134c18c81.tar.xz libssh-832abe7f4ab6f905b15926393952ef8134c18c81.zip |
include: Introduce secure SSH_SIGNATURE_FREE()
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh')
-rw-r--r-- | include/libssh/pki.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libssh/pki.h b/include/libssh/pki.h index 0f8cae47..6357b0b6 100644 --- a/include/libssh/pki.h +++ b/include/libssh/pki.h @@ -135,6 +135,8 @@ enum ssh_digest_e ssh_key_hash_from_name(const char *name); /* SSH Signature Functions */ ssh_signature ssh_signature_new(void); void ssh_signature_free(ssh_signature sign); +#define SSH_SIGNATURE_FREE(x) \ + do { ssh_signature_free(x); x = NULL; } while(0) int ssh_pki_export_signature_blob(const ssh_signature sign, ssh_string *sign_blob); |