mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-30 05:24:50 +03:00
tests: Make sure pointer are initialized in torture_pki_dsa
Fixes compiler warnings. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
1e89896d05
commit
562e579675
@ -52,7 +52,7 @@ static int teardown_dsa_key(void **state)
|
|||||||
static void torture_pki_dsa_import_privkey_base64(void **state)
|
static void torture_pki_dsa_import_privkey_base64(void **state)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
ssh_key key;
|
ssh_key key = NULL;
|
||||||
const char *passphrase = torture_get_testkey_passphrase();
|
const char *passphrase = torture_get_testkey_passphrase();
|
||||||
|
|
||||||
(void) state; /* unused */
|
(void) state; /* unused */
|
||||||
@ -70,8 +70,8 @@ static void torture_pki_dsa_import_privkey_base64(void **state)
|
|||||||
#ifdef HAVE_LIBCRYPTO
|
#ifdef HAVE_LIBCRYPTO
|
||||||
static void torture_pki_dsa_write_privkey(void **state)
|
static void torture_pki_dsa_write_privkey(void **state)
|
||||||
{
|
{
|
||||||
ssh_key origkey;
|
ssh_key origkey = NULL;
|
||||||
ssh_key privkey;
|
ssh_key privkey = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
(void) state; /* unused */
|
(void) state; /* unused */
|
||||||
@ -220,8 +220,8 @@ static void torture_pki_dsa_import_privkey_base64_passphrase(void **state)
|
|||||||
static void torture_pki_dsa_publickey_from_privatekey(void **state)
|
static void torture_pki_dsa_publickey_from_privatekey(void **state)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
ssh_key key;
|
ssh_key key = NULL;
|
||||||
ssh_key pubkey;
|
ssh_key pubkey = NULL;
|
||||||
const char *passphrase = NULL;
|
const char *passphrase = NULL;
|
||||||
|
|
||||||
(void) state; /* unused */
|
(void) state; /* unused */
|
||||||
@ -246,7 +246,7 @@ static void torture_pki_dsa_publickey_from_privatekey(void **state)
|
|||||||
static void torture_pki_dsa_import_cert_file(void **state)
|
static void torture_pki_dsa_import_cert_file(void **state)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
ssh_key cert;
|
ssh_key cert = NULL;
|
||||||
enum ssh_keytypes_e type;
|
enum ssh_keytypes_e type;
|
||||||
|
|
||||||
(void) state; /* unused */
|
(void) state; /* unused */
|
||||||
@ -266,9 +266,9 @@ static void torture_pki_dsa_import_cert_file(void **state)
|
|||||||
static void torture_pki_dsa_publickey_base64(void **state)
|
static void torture_pki_dsa_publickey_base64(void **state)
|
||||||
{
|
{
|
||||||
enum ssh_keytypes_e type;
|
enum ssh_keytypes_e type;
|
||||||
char *b64_key, *key_buf, *p;
|
char *b64_key = NULL, *key_buf = NULL, *p = NULL;
|
||||||
const char *str;
|
const char *str = NULL;
|
||||||
ssh_key key;
|
ssh_key key = NULL;
|
||||||
size_t keylen;
|
size_t keylen;
|
||||||
size_t i;
|
size_t i;
|
||||||
int rc;
|
int rc;
|
||||||
@ -317,8 +317,8 @@ static void torture_pki_dsa_publickey_base64(void **state)
|
|||||||
static void torture_pki_dsa_generate_pubkey_from_privkey(void **state)
|
static void torture_pki_dsa_generate_pubkey_from_privkey(void **state)
|
||||||
{
|
{
|
||||||
char pubkey_generated[4096] = {0};
|
char pubkey_generated[4096] = {0};
|
||||||
ssh_key privkey;
|
ssh_key privkey = NULL;
|
||||||
ssh_key pubkey;
|
ssh_key pubkey = NULL;
|
||||||
int len;
|
int len;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@ -357,11 +357,11 @@ static void torture_pki_dsa_generate_pubkey_from_privkey(void **state)
|
|||||||
static void torture_pki_dsa_duplicate_key(void **state)
|
static void torture_pki_dsa_duplicate_key(void **state)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
char *b64_key;
|
char *b64_key = NULL;
|
||||||
char *b64_key_gen;
|
char *b64_key_gen = NULL;
|
||||||
ssh_key pubkey;
|
ssh_key pubkey = NULL;
|
||||||
ssh_key privkey;
|
ssh_key privkey = NULL;
|
||||||
ssh_key privkey_dup;
|
ssh_key privkey_dup = NULL;
|
||||||
|
|
||||||
(void) state;
|
(void) state;
|
||||||
|
|
||||||
@ -403,8 +403,8 @@ static void torture_pki_dsa_duplicate_key(void **state)
|
|||||||
static void torture_pki_dsa_generate_key(void **state)
|
static void torture_pki_dsa_generate_key(void **state)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
ssh_key key;
|
ssh_key key = NULL;
|
||||||
ssh_signature sign;
|
ssh_signature sign = NULL;
|
||||||
ssh_session session=ssh_new();
|
ssh_session session=ssh_new();
|
||||||
(void) state;
|
(void) state;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user