1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-05-25 18:22:29 +03:00

tests: Use stdbool for with_passphrase argument

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen 2018-09-11 14:56:32 +02:00 committed by Andreas Schneider
parent c04eac40f3
commit 03a66b8599
2 changed files with 5 additions and 3 deletions

View File

@ -307,7 +307,7 @@ static const char torture_ed25519_public_testkey[] =
static const char *torture_get_testkey_internal(enum ssh_keytypes_e type, static const char *torture_get_testkey_internal(enum ssh_keytypes_e type,
int bits, int bits,
int with_passphrase, bool with_passphrase,
int pubkey) int pubkey)
{ {
switch (type) { switch (type) {
@ -369,7 +369,7 @@ static const char *torture_get_testkey_internal(enum ssh_keytypes_e type,
const char *torture_get_testkey(enum ssh_keytypes_e type, const char *torture_get_testkey(enum ssh_keytypes_e type,
int ecda_bits, int ecda_bits,
int with_passphrase) bool with_passphrase)
{ {
return torture_get_testkey_internal(type, ecda_bits, with_passphrase, 0); return torture_get_testkey_internal(type, ecda_bits, with_passphrase, 0);
} }

View File

@ -24,11 +24,13 @@
#ifndef _TORTURE_KEY_H #ifndef _TORTURE_KEY_H
#define _TORTURE_KEY_H #define _TORTURE_KEY_H
#include <stdbool.h>
#define TORTURE_TESTKEY_PASSWORD "libssh-rocks" #define TORTURE_TESTKEY_PASSWORD "libssh-rocks"
const char *torture_get_testkey(enum ssh_keytypes_e type, const char *torture_get_testkey(enum ssh_keytypes_e type,
int ecdsa_bits, int ecdsa_bits,
int with_passphrase); bool with_passphrase);
const char *torture_get_testkey_passphrase(void); const char *torture_get_testkey_passphrase(void);
const char *torture_get_testkey_pub(enum ssh_keytypes_e type, int ecdsa_bits); const char *torture_get_testkey_pub(enum ssh_keytypes_e type, int ecdsa_bits);