aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/pki_priv.h
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2018-08-06 14:32:28 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-31 14:18:34 +0200
commitb4c8bd9fe436c16956fb32574b3ec5928d601a82 (patch)
treefaf0dc28b61b74a418dc672246c5692a6cc51d5c /include/libssh/pki_priv.h
parent5d1300665061736c3ebfb4728ee1a96a2a345f3f (diff)
downloadlibssh-b4c8bd9fe436c16956fb32574b3ec5928d601a82.tar.gz
libssh-b4c8bd9fe436c16956fb32574b3ec5928d601a82.tar.xz
libssh-b4c8bd9fe436c16956fb32574b3ec5928d601a82.zip
pki: Support RSA SHA2 signatures of sessionid for server
This involves mostly creation of host keys proofs but needs to follow the same procedure as the client authentication signatures. At the same time, the SHA2 extension is enabled in the pkd so we are able to atomicaly provide correct signatures and pass tests. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh/pki_priv.h')
-rw-r--r--include/libssh/pki_priv.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/libssh/pki_priv.h b/include/libssh/pki_priv.h
index 623ca5a1..fe7e92a8 100644
--- a/include/libssh/pki_priv.h
+++ b/include/libssh/pki_priv.h
@@ -104,9 +104,12 @@ ssh_signature pki_do_sign_hash(const ssh_key privkey,
const unsigned char *hash,
size_t hlen,
enum ssh_digest_e hash_type);
-ssh_signature pki_do_sign_sessionid(const ssh_key key,
- const unsigned char *hash,
- size_t hlen);
+#define pki_do_sign_sessionid(key, hash, hlen) \
+ pki_do_sign_sessionid_hash(key, hash, hlen, SSH_DIGEST_AUTO)
+ssh_signature pki_do_sign_sessionid_hash(const ssh_key key,
+ const unsigned char *hash,
+ size_t hlen,
+ enum ssh_digest_e hash_type);
int pki_ed25519_sign(const ssh_key privkey, ssh_signature sig,
const unsigned char *hash, size_t hlen);
int pki_ed25519_verify(const ssh_key pubkey, ssh_signature sig,