Skip to content

Commit 5f9ed54

Browse files
Merge pull request #7451 from SparkiDev/test_fixes_1
Fixes from configuration testing
2 parents c7f852f + 97d560d commit 5f9ed54

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

examples/asn1/asn1.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ static int PrintDer(FILE* fp)
133133
return ret;
134134
}
135135

136+
#ifndef NO_CODING
136137
/* Print ASN.1 of a file containing Base64 encoding of BER/DER data.
137138
*
138139
* @param [in] fp File pointer to read from.
@@ -279,6 +280,7 @@ static int PrintPem(FILE* fp, int pem_skip)
279280

280281
return ret;
281282
}
283+
#endif
282284

283285
/* Usage lines to show. */
284286
const char* usage[] = {
@@ -288,7 +290,9 @@ const char* usage[] = {
288290
"Options:",
289291
" -?, --help display this help and exit",
290292
" -b, --branch draw branches before tag name",
293+
#ifndef NO_CODING
291294
" -B, --base64 file contents are Base64 encoded",
295+
#endif
292296
" -d, --dump show all ASN.1 item data as a hex dump",
293297
" -h, --headers show all ASN.1 item headers as a hex dump",
294298
" -i, --indent indent tag name with depth",
@@ -297,7 +301,9 @@ const char* usage[] = {
297301
" -N, --no-dump-text do not show data as a hex dump text",
298302
" -o, --offset OFFSET start decoding from offset",
299303
" -O, --oid show wolfSSL OID value in text",
304+
#ifndef NO_CODING
300305
" -p, --pem file contents are PEM",
306+
#endif
301307
" -s, --skip-pem NUM number of PEM blocks to skip",
302308
};
303309
/* Number of usage lines. */
@@ -342,11 +348,13 @@ int main(int argc, char* argv[])
342348
(strcmp(argv[0], "--branch") == 0)) {
343349
wc_Asn1PrintOptions_Set(&opts, ASN1_PRINT_OPT_DRAW_BRANCH, 1);
344350
}
351+
#ifndef NO_CODING
345352
/* File is Base64 encoded data. */
346353
else if ((strcmp(argv[0], "-b64") == 0) ||
347354
(strcmp(argv[0], "--base64") == 0)) {
348355
file_format = FORMAT_BASE64;
349356
}
357+
#endif
350358
/* Dump all ASN.1 item data. */
351359
else if ((strcmp(argv[0], "-d") == 0) ||
352360
(strcmp(argv[0], "--dump") == 0)) {
@@ -403,11 +411,13 @@ int main(int argc, char* argv[])
403411
(strcmp(argv[0], "--oid") == 0)) {
404412
wc_Asn1PrintOptions_Set(&opts, ASN1_PRINT_OPT_SHOW_OID, 1);
405413
}
414+
#ifndef NO_CODING
406415
/* File contains PEM blocks. */
407416
else if ((strcmp(argv[0], "-p") == 0) ||
408417
(strcmp(argv[0], "--pem") == 0)) {
409418
file_format = FORMAT_PEM;
410419
}
420+
#endif
411421
/* Skip a number of PEM blocks. */
412422
else if ((strcmp(argv[0], "-s") == 0) ||
413423
(strcmp(argv[0], "--skip-pem") == 0)) {
@@ -458,12 +468,16 @@ int main(int argc, char* argv[])
458468
if (file_format == FORMAT_DER) {
459469
ret = PrintDer(fp);
460470
}
471+
#ifndef NO_CODING
461472
else if (file_format == FORMAT_BASE64) {
462473
ret = PrintBase64(fp);
463474
}
475+
#endif
476+
#ifndef NO_CODING
464477
else if (file_format == FORMAT_PEM) {
465478
ret = PrintPem(fp, pem_skip);
466479
}
480+
#endif
467481

468482
if (ret != 0) {
469483
fprintf(stderr, "%s\n", wc_GetErrorString(ret));

src/ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21329,7 +21329,7 @@ static int set_curves_list(WOLFSSL* ssl, WOLFSSL_CTX *ctx, const char* names)
2132921329
}
2133021330
#endif
2133121331
else {
21332-
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
21332+
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && defined(HAVE_ECC)
2133321333
int nret;
2133421334
const ecc_set_type *eccSet;
2133521335

wolfssl/ssl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4884,10 +4884,11 @@ WOLFSSL_API WOLFSSL_X509_CRL *wolfSSL_X509_OBJECT_get0_X509_CRL(WOLFSSL_X509_OBJ
48844884
WOLFSSL_API void wolfSSL_sk_X509_pop_free(WOLF_STACK_OF(WOLFSSL_X509)* sk, void (*f) (WOLFSSL_X509*));
48854885
#endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL */
48864886

4887-
#if (defined(OPENSSL_EXTRA) || defined(HAVE_CURL)) && defined(HAVE_ECC)
4887+
#if (defined(OPENSSL_EXTRA) || defined(HAVE_CURL)) && (defined(HAVE_ECC) || \
4888+
defined(HAVE_CURVE25519) || defined(HAVE_CURVE448))
48884889
WOLFSSL_API int wolfSSL_CTX_set1_curves_list(WOLFSSL_CTX* ctx, const char* names);
48894890
WOLFSSL_API int wolfSSL_set1_curves_list(WOLFSSL* ssl, const char* names);
4890-
#endif /* (OPENSSL_EXTRA || HAVE_CURL) && HAVE_ECC */
4891+
#endif
48914892

48924893
#if defined(OPENSSL_ALL) || \
48934894
defined(HAVE_STUNNEL) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \

0 commit comments

Comments
 (0)