aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-12-30 11:11:38 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-02-04 18:37:04 +0100
commitb1434fd09b4464da6c69a645e620d3c6eece3109 (patch)
tree3ac222b472bf7c523aace01b1b6621f14c903be4
parent79383cf8eee729183d88e73d38fcd23a32d67202 (diff)
downloadlibssh-b1434fd09b4464da6c69a645e620d3c6eece3109.tar.gz
libssh-b1434fd09b4464da6c69a645e620d3c6eece3109.tar.xz
libssh-b1434fd09b4464da6c69a645e620d3c6eece3109.zip
pki: Add ecdsa support to do_sign_sessionid.
-rw-r--r--src/pki_crypto.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
index 772cf23..e676321 100644
--- a/src/pki_crypto.c
+++ b/src/pki_crypto.c
@@ -1343,6 +1343,14 @@ ssh_signature pki_do_sign_sessionid(const ssh_key key,
}
break;
case SSH_KEYTYPE_ECDSA:
+#ifdef HAVE_OPENSSL_ECC
+ sig->ecdsa_sig = ECDSA_do_sign(hash, hlen, key->ecdsa);
+ if (sig->ecdsa_sig == NULL) {
+ ssh_signature_free(sig);
+ return NULL;
+ }
+ break;
+#endif
case SSH_KEYTYPE_UNKNOWN:
return NULL;
}