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:
committed by
Andreas Schneider
parent
0849e44220
commit
848f59c37e
@ -33,7 +33,8 @@ enum ssh_digest_e {
|
|||||||
SSH_DIGEST_AUTO=0,
|
SSH_DIGEST_AUTO=0,
|
||||||
SSH_DIGEST_SHA1=1,
|
SSH_DIGEST_SHA1=1,
|
||||||
SSH_DIGEST_SHA256,
|
SSH_DIGEST_SHA256,
|
||||||
SSH_DIGEST_SHA512
|
SSH_DIGEST_SHA384,
|
||||||
|
SSH_DIGEST_SHA512,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ssh_kdf_digest {
|
enum ssh_kdf_digest {
|
||||||
|
@ -147,6 +147,7 @@ const char *hash_signatures[] = {
|
|||||||
"", /* Not used here */
|
"", /* Not used here */
|
||||||
"ssh-rsa",
|
"ssh-rsa",
|
||||||
"rsa-sha2-256",
|
"rsa-sha2-256",
|
||||||
|
"", /* Not used; there is no rsa-sha2-384 */
|
||||||
"rsa-sha2-512",
|
"rsa-sha2-512",
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -155,6 +156,7 @@ int hash_lengths[] = {
|
|||||||
0, /* Not used here */
|
0, /* Not used here */
|
||||||
20,
|
20,
|
||||||
32,
|
32,
|
||||||
|
48, /* Not used; there is no rsa-sha2-384 */
|
||||||
64,
|
64,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -195,6 +197,11 @@ static void torture_pki_verify_mismatch(void **state)
|
|||||||
hash_length = ((hash == SSH_DIGEST_AUTO) ?
|
hash_length = ((hash == SSH_DIGEST_AUTO) ?
|
||||||
skey_attrs.sig_length : hash_lengths[hash]);
|
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",
|
SSH_LOG(SSH_LOG_TRACE, "Creating signature %d with hash %d",
|
||||||
sig_type, hash);
|
sig_type, hash);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user