summaryrefslogtreecommitdiffstats
path: root/ssh_api.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 07:43:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 07:43:01 +0000
commit726d6c984de7e297200843e99ab5e70c88a0cbf4 (patch)
tree48851420d8e29a6900c86af9dd178bd2e2aee72d /ssh_api.c
parentReleasing progress-linux version 1:9.7p1-7~progress7.99u1. (diff)
downloadopenssh-726d6c984de7e297200843e99ab5e70c88a0cbf4.tar.xz
openssh-726d6c984de7e297200843e99ab5e70c88a0cbf4.zip
Merging upstream version 1:9.8p1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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