Skip to content

[Bug]: compilation failure when ECC_MIN_KEY_SZ=0 #9751

@DavidKorczynski

Description

@DavidKorczynski

Contact Details

david@adalogics.com

Version

latest

Description

The following lines: https://github.com/wolfSSL/wolfssl/blame/fbc5502a58e24d27171070a6358b25cf4eb28276/src/ssl_api_pk.c#L660-L670

results in a compilation error when ECC_MIN_KEY_SZ=0:

    if (ret == 0) {
        /* Check size against bounds. */
    #if ECC_MIN_KEY_SZ > 0
        if (sz < ECC_MINSIZE) {
            ret = BAD_FUNC_ARG;
        }
    #endif
        else if (sz > ECC_MAXSIZE) {
            ret = BAD_FUNC_ARG;
        }
        else {

becomes

    if (ret == 0) {
        /* Check size against bounds. */
        else if (sz > ECC_MAXSIZE) {
            ret = BAD_FUNC_ARG;
        }
        else {

Reproduction steps

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions