aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Bussink <d.bussink@gmail.com>2019-02-21 16:29:21 +0000
committerAndreas Schneider <asn@cryptomilk.org>2019-02-22 15:30:52 +0100
commit369051a5b4fbe9a5ace7930509cbe57b3478190d (patch)
tree4207c3ca6ffcf0b6dbbaa93266938f86f502519e
parent46d15b316103587e5c185d2af69e906477c35a8b (diff)
downloadlibssh-369051a5b4fbe9a5ace7930509cbe57b3478190d.tar.gz
libssh-369051a5b4fbe9a5ace7930509cbe57b3478190d.tar.xz
libssh-369051a5b4fbe9a5ace7930509cbe57b3478190d.zip
Remove SHA384 HMAC
This is not supported by OpenSSH and not recommended to be implemented either. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
-rw-r--r--doc/mainpage.dox2
-rw-r--r--include/libssh/wrapper.h1
-rw-r--r--src/libcrypto.c3
-rw-r--r--src/libgcrypt.c3
-rw-r--r--src/libmbedcrypto.c3
-rw-r--r--src/wrapper.c3
6 files changed, 1 insertions, 14 deletions
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
index 61f1f7c4..d319385c 100644
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -23,7 +23,7 @@ The libssh library provides:
- <strong>Public Key Algorithms</strong>: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-rsa, rsa-sha2-512, rsa-sha2-256,ssh-dss
- <strong>Ciphers</strong>: <i>aes256-ctr, aes192-ctr, aes128-ctr</i>, aes256-cbc (rijndael-cbc@lysator.liu.se), aes192-cbc, aes128-cbc, 3des-cbc, blowfish-cbc, none
- <strong>Compression Schemes</strong>: zlib, <i>zlib@openssh.com</i>, none
- - <strong>MAC hashes</strong>: hmac-sha1, hmac-sha2-256, hmac-sha2-384, hmac-sha2-512, hmac-md5, none
+ - <strong>MAC hashes</strong>: hmac-sha1, hmac-sha2-256, hmac-sha2-512, hmac-md5, none
- <strong>Authentication</strong>: none, password, public-key, keyboard-interactive, <i>gssapi-with-mic</i>
- <strong>Channels</strong>: shell, exec (incl. SCP wrapper), direct-tcpip, subsystem, <i>auth-agent-req@openssh.com</i>
- <strong>Global Requests</strong>: tcpip-forward, forwarded-tcpip
diff --git a/include/libssh/wrapper.h b/include/libssh/wrapper.h
index 3a33c34f..14d82903 100644
--- a/include/libssh/wrapper.h
+++ b/include/libssh/wrapper.h
@@ -44,7 +44,6 @@ enum ssh_mac_e {
enum ssh_hmac_e {
SSH_HMAC_SHA1 = 1,
SSH_HMAC_SHA256,
- SSH_HMAC_SHA384,
SSH_HMAC_SHA512,
SSH_HMAC_MD5,
SSH_HMAC_AEAD_POLY1305,
diff --git a/src/libcrypto.c b/src/libcrypto.c
index ca8b5564..3df6e0a9 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -425,9 +425,6 @@ HMACCTX hmac_init(const void *key, int len, enum ssh_hmac_e type) {
case SSH_HMAC_SHA256:
HMAC_Init_ex(ctx, key, len, EVP_sha256(), NULL);
break;
- case SSH_HMAC_SHA384:
- HMAC_Init_ex(ctx, key, len, EVP_sha384(), NULL);
- break;
case SSH_HMAC_SHA512:
HMAC_Init_ex(ctx, key, len, EVP_sha512(), NULL);
break;
diff --git a/src/libgcrypt.c b/src/libgcrypt.c
index 070f81b5..25f2eddf 100644
--- a/src/libgcrypt.c
+++ b/src/libgcrypt.c
@@ -283,9 +283,6 @@ HMACCTX hmac_init(const void *key, int len, enum ssh_hmac_e type) {
case SSH_HMAC_SHA256:
gcry_md_open(&c, GCRY_MD_SHA256, GCRY_MD_FLAG_HMAC);
break;
- case SSH_HMAC_SHA384:
- gcry_md_open(&c, GCRY_MD_SHA384, GCRY_MD_FLAG_HMAC);
- break;
case SSH_HMAC_SHA512:
gcry_md_open(&c, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC);
break;
diff --git a/src/libmbedcrypto.c b/src/libmbedcrypto.c
index b6a0379e..748b3abb 100644
--- a/src/libmbedcrypto.c
+++ b/src/libmbedcrypto.c
@@ -466,9 +466,6 @@ HMACCTX hmac_init(const void *key, int len, enum ssh_hmac_e type)
case SSH_HMAC_SHA256:
md_info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
break;
- case SSH_HMAC_SHA384:
- md_info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA384);
- break;
case SSH_HMAC_SHA512:
md_info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA512);
break;
diff --git a/src/wrapper.c b/src/wrapper.c
index 79603455..6c4e6767 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -58,7 +58,6 @@
static struct ssh_hmac_struct ssh_hmac_tab[] = {
{ "hmac-sha1", SSH_HMAC_SHA1 },
{ "hmac-sha2-256", SSH_HMAC_SHA256 },
- { "hmac-sha2-384", SSH_HMAC_SHA384 },
{ "hmac-sha2-512", SSH_HMAC_SHA512 },
{ "hmac-md5", SSH_HMAC_MD5 },
{ "aead-poly1305", SSH_HMAC_AEAD_POLY1305 },
@@ -76,8 +75,6 @@ size_t hmac_digest_len(enum ssh_hmac_e type) {
return SHA_DIGEST_LEN;
case SSH_HMAC_SHA256:
return SHA256_DIGEST_LEN;
- case SSH_HMAC_SHA384:
- return SHA384_DIGEST_LEN;
case SSH_HMAC_SHA512:
return SHA512_DIGEST_LEN;
case SSH_HMAC_MD5: