summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh_api.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2015-12-04 16:41:28 +0000
committermarkus <markus@openbsd.org>2015-12-04 16:41:28 +0000
commit321f30e3f5b45d16472e86661b83433fc7519525 (patch)
tree63c02a5e0c654c473c9d490fd4d0ff38aade57d5 /usr.bin/ssh/ssh_api.c
parentDrop pledge("getpw") and pwd.h and use the now usual (diff)
downloadwireguard-openbsd-321f30e3f5b45d16472e86661b83433fc7519525.tar.xz
wireguard-openbsd-321f30e3f5b45d16472e86661b83433fc7519525.zip
implement SHA2-{256,512} for RSASSA-PKCS1-v1_5 signatures (user and host auth)
based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt; with & ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh_api.c')
-rw-r--r--usr.bin/ssh/ssh_api.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/ssh/ssh_api.c b/usr.bin/ssh/ssh_api.c
index 8d48021e5e7..215ae16b454 100644
--- a/usr.bin/ssh/ssh_api.c
+++ b/usr.bin/ssh/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.4 2015/02/16 22:13:32 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.5 2015/12/04 16:41:28 markus Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
@@ -38,8 +38,8 @@ int _ssh_order_hostkeyalgs(struct ssh *);
int _ssh_verify_host_key(struct sshkey *, struct ssh *);
struct sshkey *_ssh_host_public_key(int, int, struct ssh *);
struct sshkey *_ssh_host_private_key(int, int, struct ssh *);
-int _ssh_host_key_sign(struct sshkey *, struct sshkey *, u_char **,
- size_t *, const u_char *, size_t, u_int);
+int _ssh_host_key_sign(struct sshkey *, struct sshkey *,
+ u_char **, size_t *, const u_char *, size_t, const char *, u_int);
/*
* stubs for the server side implementation of kex.
@@ -47,7 +47,7 @@ int _ssh_host_key_sign(struct sshkey *, struct sshkey *, u_char **,
*/
int use_privsep = 0;
int mm_sshkey_sign(struct sshkey *, u_char **, u_int *,
- u_char *, u_int, u_int);
+ u_char *, u_int, char *, u_int);
DH *mm_choose_dh(int, int, int);
/* Define these two variables here so that they are part of the library */
@@ -56,7 +56,7 @@ u_int session_id2_len = 0;
int
mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp,
- u_char *data, u_int datalen, u_int compat)
+ u_char *data, u_int datalen, char *alg, u_int compat)
{
return (-1);
}
@@ -522,8 +522,8 @@ _ssh_order_hostkeyalgs(struct ssh *ssh)
int
_ssh_host_key_sign(struct sshkey *privkey, struct sshkey *pubkey,
- u_char **signature, size_t *slen,
- const u_char *data, size_t dlen, u_int compat)
+ u_char **signature, size_t *slen, const u_char *data, size_t dlen,
+ const char *alg, u_int compat)
{
- return sshkey_sign(privkey, signature, slen, data, dlen, compat);
+ return sshkey_sign(privkey, signature, slen, data, dlen, alg, compat);
}