Fixes for minor implicit cast warnings and line length. Also fixed benchmark.c error without ChaCha and unused encrypt_only.

pull/7798/head
David Garske 2024-08-01 15:26:02 -07:00
parent 65283fb9bb
commit a18d0161ef
3 changed files with 11 additions and 6 deletions

View File

@ -57494,8 +57494,8 @@ static int test_GENERAL_NAME_set0_othername(void) {
ExpectIntGT(X509_sign(x509, priv, EVP_sha256()), 0);
sk_GENERAL_NAME_pop_free(gns, GENERAL_NAME_free);
gns = NULL;
ExpectNotNull(gns = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL,
NULL));
ExpectNotNull(gns = (GENERAL_NAMES*)X509_get_ext_d2i(x509,
NID_subject_alt_name, NULL, NULL));
ExpectIntEQ(sk_GENERAL_NAME_num(gns), 3);
@ -57658,8 +57658,8 @@ static int test_othername_and_SID_ext(void) {
0);
/* Cleanup */
ExpectNotNull(gns = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL,
NULL));
ExpectNotNull(gns = (GENERAL_NAMES*)X509_get_ext_d2i(x509,
NID_subject_alt_name, NULL, NULL));
ExpectIntEQ(sk_GENERAL_NAME_num(gns), 1);
ExpectNotNull(gn = sk_GENERAL_NAME_value(gns, 0));
ExpectIntEQ(gn->type, 0);

View File

@ -1977,7 +1977,9 @@ static int numBlocks = NUM_BLOCKS;
static word32 bench_size = BENCH_SIZE;
static int base2 = 1;
static int digest_stream = 1;
#ifdef HAVE_CHACHA
static int encrypt_only = 0;
#endif
#ifdef HAVE_AES_CBC
static int cipher_same_buffer = 0;
#endif
@ -14725,8 +14727,10 @@ int wolfcrypt_benchmark_main(int argc, char** argv)
#endif
else if (string_matches(argv[1], "-dgst_full"))
digest_stream = 0;
#ifdef HAVE_CHACHA
else if (string_matches(argv[1], "-enc_only"))
encrypt_only = 1;
#endif
#ifndef NO_RSA
else if (string_matches(argv[1], "-rsa_sign"))
rsa_sign_verify = 1;

View File

@ -2940,7 +2940,7 @@ extern void uITRON4_free(void *p) ;
#undef WOLFSSL_CERT_NAME_ALL
#define WOLFSSL_CERT_NAME_ALL
/* Store pointers to issuer name components and their lengths and encodings. */
/* Store pointers to issuer name components (lengths and encodings) */
#undef WOLFSSL_HAVE_ISSUER_NAMES
#define WOLFSSL_HAVE_ISSUER_NAMES
@ -3030,7 +3030,8 @@ extern void uITRON4_free(void *p) ;
#else
/* if user supplied build option and not using ASN template, raise error */
#if defined(WC_ASN_UNKNOWN_EXT_CB) && !defined(WOLFSSL_ASN_TEMPLATE)
#error ASN unknown extension callback is only supported with ASN template
#error ASN unknown extension callback is only supported \
with ASN template
#endif
#endif