1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

wrapper.h: Add SSH_DIGEST_SHA384 to ssh_digest_e enum

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-04-10 19:08:45 +02:00
committed by Andreas Schneider
parent 0849e44220
commit 848f59c37e
2 changed files with 9 additions and 1 deletions

View File

@ -33,7 +33,8 @@ enum ssh_digest_e {
SSH_DIGEST_AUTO=0,
SSH_DIGEST_SHA1=1,
SSH_DIGEST_SHA256,
SSH_DIGEST_SHA512
SSH_DIGEST_SHA384,
SSH_DIGEST_SHA512,
};
enum ssh_kdf_digest {

View File

@ -147,6 +147,7 @@ const char *hash_signatures[] = {
"", /* Not used here */
"ssh-rsa",
"rsa-sha2-256",
"", /* Not used; there is no rsa-sha2-384 */
"rsa-sha2-512",
};
@ -155,6 +156,7 @@ int hash_lengths[] = {
0, /* Not used here */
20,
32,
48, /* Not used; there is no rsa-sha2-384 */
64,
};
@ -195,6 +197,11 @@ static void torture_pki_verify_mismatch(void **state)
hash_length = ((hash == SSH_DIGEST_AUTO) ?
skey_attrs.sig_length : hash_lengths[hash]);
/* SHA384 is used only internaly for ECDSA. Skip it. */
if (hash == SSH_DIGEST_SHA384) {
continue;
}
SSH_LOG(SSH_LOG_TRACE, "Creating signature %d with hash %d",
sig_type, hash);