diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2019-04-30 15:31:19 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-13 16:37:51 +0200 |
commit | 0ea9e39e81a4d6e7a57e733be02da1d7e969aef2 (patch) | |
tree | 2cc9747f9694678e520de98560cb1bb9419d84c6 | |
parent | e775182c2e07bed49e94733cc36e05d2f720d3cf (diff) | |
download | libssh-0ea9e39e81a4d6e7a57e733be02da1d7e969aef2.tar.gz libssh-0ea9e39e81a4d6e7a57e733be02da1d7e969aef2.tar.xz libssh-0ea9e39e81a4d6e7a57e733be02da1d7e969aef2.zip |
pki: Add a common place to store raw signatures
This is a preparation to store the raw signature for all algorithms in
the same place in ssh_signature.
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | include/libssh/pki.h | 1 | ||||
-rw-r--r-- | src/pki.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/libssh/pki.h b/include/libssh/pki.h index 0f0fac5d..13cd3747 100644 --- a/include/libssh/pki.h +++ b/include/libssh/pki.h @@ -88,6 +88,7 @@ struct ssh_signature_struct { struct mbedtls_ecdsa_sig ecdsa_sig; #endif /* HAVE_LIBGCRYPT */ ed25519_signature *ed25519_sig; + ssh_string raw_sig; }; typedef struct ssh_signature_struct *ssh_signature; @@ -629,6 +629,9 @@ void ssh_signature_free(ssh_signature sig) break; } + /* Explicitly zero the signature content before free */ + ssh_string_burn(sig->raw_sig); + ssh_string_free(sig->raw_sig); SAFE_FREE(sig); } |