mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
Adjust some subtle usage of argv string handling in the pkd
test options: rather than conditionally overwrite the two
mkdtemp strings with a newly-allocated buffer to be later
freed, keep the original const argv pointer around in its
own dedicated field.
See also these changes in the same area that were due to the
previous arrangement, which was a bit too subtle:
- 61ce3310b864802a101cb01ff103f0bc2da936e6
- e1a8b359c1
Addresses:
- https://gitlab.com/libssh/libssh-mirror/-/merge_requests/320#note_1173911211
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
66 lines
1.1 KiB
C
66 lines
1.1 KiB
C
/*
|
|
* pkd_daemon.h -- tests use this interface to start, stop pkd
|
|
* instances and get results
|
|
*
|
|
* (c) 2014 Jon Simons
|
|
*/
|
|
|
|
#ifndef __PKD_DAEMON_H__
|
|
#define __PKD_DAEMON_H__
|
|
|
|
#include "config.h"
|
|
|
|
enum pkd_hostkey_type_e {
|
|
PKD_RSA,
|
|
#ifdef HAVE_DSA
|
|
PKD_DSA,
|
|
#endif
|
|
PKD_ED25519,
|
|
PKD_ECDSA
|
|
};
|
|
|
|
struct pkd_daemon_args {
|
|
enum pkd_hostkey_type_e type;
|
|
const char *hostkeypath;
|
|
|
|
struct {
|
|
const uint8_t *buf;
|
|
size_t len;
|
|
} payload;
|
|
|
|
uint64_t rekey_data_limit;
|
|
|
|
int original_dir_fd;
|
|
|
|
struct {
|
|
int list;
|
|
|
|
int log_stdout;
|
|
int log_stderr;
|
|
int libssh_log_level;
|
|
|
|
const char *testname;
|
|
const char *testmatch;
|
|
unsigned int iterations;
|
|
|
|
struct {
|
|
const char *argv_mkdtemp_str;
|
|
char *mkdtemp_str;
|
|
} socket_wrapper;
|
|
|
|
struct {
|
|
const char *argv_mkdtemp_str;
|
|
char *mkdtemp_str;
|
|
} temp_dir;
|
|
} opts;
|
|
};
|
|
|
|
struct pkd_result {
|
|
int ok;
|
|
};
|
|
|
|
int pkd_start(struct pkd_daemon_args *args);
|
|
void pkd_stop(struct pkd_result *out);
|
|
|
|
#endif /* __PKD_DAEMON_H__ */
|