summaryrefslogtreecommitdiffstats
path: root/ssh_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh_api.c')
-rw-r--r--ssh_api.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ssh_api.c b/ssh_api.c
index fadf2f4..4dcd266 100644
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.28 2024/01/09 21:39:14 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.29 2024/05/17 00:30:24 djm Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
@@ -27,6 +27,7 @@
#include "log.h"
#include "authfile.h"
#include "sshkey.h"
+#include "dh.h"
#include "misc.h"
#include "ssh2.h"
#include "version.h"
@@ -49,10 +50,8 @@ int _ssh_host_key_sign(struct ssh *, struct sshkey *, struct sshkey *,
u_char **, size_t *, const u_char *, size_t, const char *);
/*
- * stubs for the server side implementation of kex.
- * disable privsep so our stubs will never be called.
+ * stubs for privsep calls in the server side implementation of kex.
*/
-int use_privsep = 0;
int mm_sshkey_sign(struct sshkey *, u_char **, u_int *,
const u_char *, u_int, const char *, const char *, const char *, u_int);
@@ -65,14 +64,20 @@ mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp,
const u_char *data, u_int datalen, const char *alg,
const char *sk_provider, const char *sk_pin, u_int compat)
{
- return (-1);
+ size_t slen = 0;
+ int ret;
+
+ ret = sshkey_sign(key, sigp, &slen, data, datalen, alg,
+ sk_provider, sk_pin, compat);
+ *lenp = slen;
+ return ret;
}
#ifdef WITH_OPENSSL
DH *
mm_choose_dh(int min, int nbits, int max)
{
- return (NULL);
+ return choose_dh(min, nbits, max);
}
#endif