diff --git a/gost12sum.c b/gost12sum.c index e644a613..7e443d30 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -250,7 +250,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum, int hashsize) int get_line(FILE *f, char *hash, char *filename, int verbose, int *size) { int i, len; - char *ptr = filename; + char *ptr; char *spacepos = NULL; while (!feof(f)) { diff --git a/test_digest.c b/test_digest.c index 68c0e325..9b981f14 100644 --- a/test_digest.c +++ b/test_digest.c @@ -663,6 +663,7 @@ static int do_mac(int iter, EVP_MAC *mac, const char *plaintext, } else outsize = EVP_MAC_CTX_get_mac_size(ctx); + T(p - params < 4); T(EVP_MAC_init(ctx, (const unsigned char *)t->key, t->key_size, NULL)); T(EVP_MAC_CTX_set_params(ctx, params)); diff --git a/test_tls.c b/test_tls.c index 77e62815..72a8e081 100644 --- a/test_tls.c +++ b/test_tls.c @@ -78,7 +78,7 @@ static void err(int eval, const char *fmt, ...) } /* Generate simple cert+key pair. Based on req.c */ -static struct certkey certgen(const char *algname, const char *paramset) +static void certgen(const char *algname, const char *paramset, struct certkey *ck) { /* Keygen. */ EVP_PKEY *tkey; @@ -150,7 +150,8 @@ static struct certkey certgen(const char *algname, const char *paramset) PEM_write_bio_X509(out, x509ss); BIO_free_all(out); #endif - return (struct certkey){ .pkey = pkey, .cert = x509ss }; + ck->pkey = pkey; + ck->cert = x509ss; } /* Non-blocking BIO test mechanic is based on sslapitest.c */ @@ -164,7 +165,7 @@ int test(const char *algname, const char *paramset) printf(cNORM "\n"); struct certkey ck; - ck = certgen(algname, paramset); + certgen(algname, paramset, &ck); SSL_CTX *cctx, *sctx;