aboutsummaryrefslogtreecommitdiff
path: root/src/pki_mbedcrypto.c
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-04-09 19:00:05 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-05-13 16:37:51 +0200
commit3917a5c916a834f8eb288455470f709cbdc4f27f (patch)
treee51d257750e1cd1c26757827e55939224dbe9126 /src/pki_mbedcrypto.c
parent5f7a3c5c66a7a8c08757b23cf6d43b9f30063932 (diff)
downloadlibssh-3917a5c916a834f8eb288455470f709cbdc4f27f.tar.gz
libssh-3917a5c916a834f8eb288455470f709cbdc4f27f.tar.xz
libssh-3917a5c916a834f8eb288455470f709cbdc4f27f.zip
pki: Refactor ssh_pki_do_sign()
Added ECDSA key types to ssh_key_type_to_hash(). Refactor ssh_pki_do_sign() without behaviour changes. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/pki_mbedcrypto.c')
-rw-r--r--src/pki_mbedcrypto.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/pki_mbedcrypto.c b/src/pki_mbedcrypto.c
index 384189d3..32925dca 100644
--- a/src/pki_mbedcrypto.c
+++ b/src/pki_mbedcrypto.c
@@ -1168,12 +1168,6 @@ ssh_signature pki_do_sign_hash(const ssh_key privkey,
ssh_signature sig = NULL;
int rc;
- /* Only RSA supports different signature algorithm types now */
- if (privkey->type != SSH_KEYTYPE_RSA && hash_type != SSH_DIGEST_AUTO) {
- SSH_LOG(SSH_LOG_WARN, "Incompatible signature algorithm passed");
- return NULL;
- }
-
sig = ssh_signature_new();
if (sig == NULL) {
return NULL;