diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-11-22 10:47:23 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-11-30 18:57:38 +0100 |
commit | f5e8fa5c5fb36b0b5d04d4de3633c6d9a93bcd49 (patch) | |
tree | e33bd35a717a138397484ab5878d57fec4bf1874 | |
parent | 0a07266d9c0ca9848953f9617e9bf65c60c3b543 (diff) | |
download | libssh-f5e8fa5c5fb36b0b5d04d4de3633c6d9a93bcd49.tar.gz libssh-f5e8fa5c5fb36b0b5d04d4de3633c6d9a93bcd49.tar.xz libssh-f5e8fa5c5fb36b0b5d04d4de3633c6d9a93bcd49.zip |
pki: Use self-explanatory variable names
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 7b725e6bc7abdc38c32a1ae26081a44a2c267ce4)
-rw-r--r-- | src/pki.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1864,10 +1864,10 @@ int ssh_pki_import_signature_blob(const ssh_string sig_blob, const ssh_key pubkey, ssh_signature *psig) { - ssh_signature sig; + ssh_signature sig = NULL; enum ssh_keytypes_e type; enum ssh_digest_e hash_type; - ssh_string str; + ssh_string algorithm = NULL, blob = NULL; ssh_buffer buf; const char *alg = NULL; int rc; @@ -1889,25 +1889,25 @@ int ssh_pki_import_signature_blob(const ssh_string sig_blob, return SSH_ERROR; } - str = ssh_buffer_get_ssh_string(buf); - if (str == NULL) { + algorithm = ssh_buffer_get_ssh_string(buf); + if (algorithm == NULL) { ssh_buffer_free(buf); return SSH_ERROR; } - alg = ssh_string_get_char(str); + alg = ssh_string_get_char(algorithm); type = ssh_key_type_from_signature_name(alg); hash_type = ssh_key_hash_from_name(alg); - ssh_string_free(str); + ssh_string_free(algorithm); - str = ssh_buffer_get_ssh_string(buf); + blob = ssh_buffer_get_ssh_string(buf); ssh_buffer_free(buf); - if (str == NULL) { + if (blob == NULL) { return SSH_ERROR; } - sig = pki_signature_from_blob(pubkey, str, type, hash_type); - ssh_string_free(str); + sig = pki_signature_from_blob(pubkey, blob, type, hash_type); + ssh_string_free(blob); if (sig == NULL) { return SSH_ERROR; } |