Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/configs/user_settings_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

#define NO_MAIN_DRIVER
#define WOLFSSL_NO_SP
#define WOLFSSL_NO_SIG_WRAPPER
#define NO_SIG_WRAPPER
#define TFM_TIMING_RESISTANT

#undef WOLFSSL_DTLS
Expand Down
9 changes: 1 addition & 8 deletions wolfcrypt/src/signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@
#include <wolfssl/wolfcrypt/rsa.h>
#endif

/* If ECC and RSA are disabled then disable signature wrapper */
#if (!defined(HAVE_ECC) || (defined(HAVE_ECC) && !defined(HAVE_ECC_SIGN) \
&& !defined(HAVE_ECC_VERIFY))) && defined(NO_RSA)
#undef NO_SIG_WRAPPER
#define NO_SIG_WRAPPER
#endif

/* Signature wrapper disabled check */
/* Signature wrapper disabled check (NO_SIG_WRAPPER set by signature.h) */
#ifndef NO_SIG_WRAPPER

#if !defined(NO_RSA) && defined(NO_ASN)
Expand Down
12 changes: 12 additions & 0 deletions wolfssl/wolfcrypt/signature.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
extern "C" {
#endif

/* If ECC and RSA are disabled then disable signature wrapper */
#if (!defined(HAVE_ECC) || (defined(HAVE_ECC) && !defined(HAVE_ECC_SIGN) \
&& !defined(HAVE_ECC_VERIFY))) && defined(NO_RSA)
#undef NO_SIG_WRAPPER
#define NO_SIG_WRAPPER
#endif

/* Minimum hash strength accepted by the wc_SignatureVerify/Generate
* convenience APIs. Default is SHA-256 to keep MD5 and SHA-1 (both with
* known collision attacks) out of new code. Define WC_SIG_MIN_HASH_TYPE
Expand All @@ -52,6 +59,9 @@ enum wc_SignatureType {
WC_SIGNATURE_TYPE_RSA_W_ENC = 3 /* Adds DER header via wc_EncodeSignature */
};

/* Signature wrapper disabled check */
#ifndef NO_SIG_WRAPPER

WOLFSSL_API int wc_SignatureGetSize(enum wc_SignatureType sig_type,
const void* key, word32 key_len);

Expand Down Expand Up @@ -90,6 +100,8 @@ WOLFSSL_API int wc_SignatureGenerate_ex(
void* key, word32 key_len,
WC_RNG* rng, int verify);

#endif /* !NO_SIG_WRAPPER */

#ifdef __cplusplus
} /* extern "C" */
#endif
Expand Down
Loading