Skip to content

20260306-wc_Hash-refactor#9937

Merged
dgarske merged 6 commits intowolfSSL:masterfrom
douzzer:20260306-wc_Hash-refactor
Mar 24, 2026
Merged

20260306-wc_Hash-refactor#9937
dgarske merged 6 commits intowolfSSL:masterfrom
douzzer:20260306-wc_Hash-refactor

Conversation

@douzzer
Copy link
Copy Markdown
Contributor

@douzzer douzzer commented Mar 10, 2026

refactor wc_Hash* so that known wc_HashType values are unconditionally defined in enum wc_HashType, and always either succeed if used properly, or return HASH_TYPE_E if gated out or used improperly; add detailed error code tracing in wolfcrypt/src/hash.c.

wolfssl/wolfcrypt/error-crypt.h: add do-nothing WC_ERR_TRACE() fallthrough definition to make WC_ERR_TRACE() safe to use ungated in code.

tested with wolfssl-multi-test.sh ... super-quick-check

@douzzer douzzer requested a review from wolfSSL-Bot March 10, 2026 05:24
@douzzer douzzer added the Not For This Release Not for release 5.9.1 label Mar 10, 2026
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Mar 10, 2026

retest this please

1 similar comment
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Mar 11, 2026

retest this please

@dgarske
Copy link
Copy Markdown
Member

dgarske commented Mar 19, 2026

@douzzer please resolve merge conflicts and review CI errors

@dgarske dgarske assigned douzzer and unassigned douzzer Mar 19, 2026
@douzzer douzzer force-pushed the 20260306-wc_Hash-refactor branch from c573ccb to 7cc96fb Compare March 23, 2026 16:15
@douzzer douzzer removed the Not For This Release Not for release 5.9.1 label Mar 23, 2026
douzzer added 4 commits March 23, 2026 13:01
…rough definition to make WC_ERR_TRACE() safe to use ungated in code.
…y defined in enum wc_HashType, and always either succeed if used properly, or return HASH_TYPE_E if gated out or used improperly; add detailed error code tracing in wolfcrypt/src/hash.c.
… WC_HASH_TYPE_BLAKE2B and WC_HASH_TYPE_BLAKE2S exposed in default+opensslall configs.
@douzzer douzzer force-pushed the 20260306-wc_Hash-refactor branch from 7cc96fb to 262799d Compare March 23, 2026 18:03
douzzer added 2 commits March 23, 2026 13:15
…_HASH_TYPE_SHAKE128 and WC_HASH_TYPE_SHAKE256.
…shType definition;

wolfcrypt/src/hash.c: in wc_OidGetHash(), fix misplaced gate re case SHA3_512h.
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Mar 23, 2026

retest this please
(Jenkins controller reboot)

@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Mar 23, 2026

retest this please

FAIL: scripts/crl-gen-openssl

@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Mar 24, 2026

Note the PRB-libwolfssl-size-change failure is a false positive likely caused by another already-merged PR, or by a faulty test script. There is no significant footprint change from this PR:

$ diff /tmp/wolfcrypt-sizes.pre.fixed /tmp/wolfcrypt-sizes.post
11c11
< -rw-r--r-- 1 douzzer users  19440 Mar 23 20:50 src_libwolfssl_la-hash.o
---
> -rw-r--r-- 1 douzzer users  20040 Mar 23 20:50 src_libwolfssl_la-hash.o

(using --enable-opensslextra=small as in testing/Jenkins/PRB-libwolfssl-size-change/PRB.Jenkinsfile)

@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented Mar 24, 2026

Note also the multi-test failure:

[all-c89-clang-tidy] [1 of 1] [wolfssl]
    autogen.sh wolfssl...   real 0m12.954s  user 0m11.739s  sys 0m0.272s
    configure...   real 0m13.987s  user 0m10.522s  sys 0m4.052s
    build...   real 13m4.139s  user 12m46.441s  sys 0m17.848s
    check...FAIL: scripts/ocsp-stapling2.test
FAIL: scripts/ocsp-stapling_tls13multi.test

is also false positives unrelated to this PR.

@dgarske
Copy link
Copy Markdown
Member

dgarske commented Mar 24, 2026

Jenkins retest this please. FIPS 140-3 agent offline

@dgarske dgarske merged commit ab8cd6f into wolfSSL:master Mar 24, 2026
511 of 513 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants