diff options
author | Jakub Jelen <jjelen@redhat.com> | 2021-01-11 13:03:40 +0100 |
---|---|---|
committer | Jakub Jelen <jjelen@redhat.com> | 2021-08-17 15:46:53 +0200 |
commit | 435f45291d2701d33f493c73844d3a8de2b2d90f (patch) | |
tree | 8478b8f47dabfcc560ae822fd9939aafd9b83f6d | |
parent | 09e9167329b3cc81bdf9e76fa3c87a73c136f158 (diff) | |
download | libssh-435f45291d2701d33f493c73844d3a8de2b2d90f.tar.gz libssh-435f45291d2701d33f493c73844d3a8de2b2d90f.tar.xz libssh-435f45291d2701d33f493c73844d3a8de2b2d90f.zip |
include: Introduce secure SSH_SIGNATURE_FREE()
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 832abe7f4ab6f905b15926393952ef8134c18c81)
-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 9b104349..2fa7582c 100644 --- a/include/libssh/pki.h +++ b/include/libssh/pki.h @@ -125,6 +125,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); |