mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +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:
committed by
Andreas Schneider
parent
0849e44220
commit
848f59c37e
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user