-
Notifications
You must be signed in to change notification settings - Fork 862
ASN.1 OIDs and sum: Change algorithm for sum #8655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
225fe37
to
1ad5748
Compare
4b469ed
to
c377b7e
Compare
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new algorithm for calculating OID sums and cleans up several related declarations and test expectations. Key changes include:
- Replacing the legacy OID sum algorithm with a new bitwise‐based approach in wc_oid_sum.
- Removing deprecated enums and updating related test and API code to use new macros and callbacks.
- Integrating an OID name callback in the ASN.1 example code and updating ancillary tooling (e.g. the Ruby generator and codespell config).
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
wolfssl/wolfcrypt/types.h | Added include for the new oid_sum header |
wolfssl/wolfcrypt/settings.h | Modified WOLFSSL_PYTHON section to force the old algorithm via macro redefine |
wolfssl/wolfcrypt/pkcs7.h | Removed deprecated PKCS#7 types enum |
wolfssl/wolfcrypt/asn_public.h | Removed obsolete OID-related enums and added the OID callback typedef |
wolfcrypt/test/test.c | Updated test expectations to use macro (SUBJ_KEY_OID) rather than magic number |
wolfcrypt/src/pkcs12.c | Removed unused PKCS12 enumeration values |
wolfcrypt/src/hash.c | Removed obsolete hash sum enum |
wolfcrypt/src/asn.c | Revised wc_oid_sum implementation and added OID callback support |
tests/api.c | Updated expected value for X509 extension object |
src/ssl.c | Replaced manual summation with wc_oid_sum, and updated object info array entries |
examples/asn1/gen_oid_names.rb | Added Ruby script for generating OID name definitions |
examples/asn1/asn1.c | Integrated OID name callback and file format detection improvements |
.github/workflows/codespell.yml | Updated ignore and skip lists |
Files not reviewed (3)
- examples/asn1/include.am: Language not supported
- scripts/include.am: Language not supported
- wolfssl/wolfcrypt/include.am: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please rebase to resolve the libssh test issue.
- Please add CI tests in os-check.yml config matrix:
'--enable-all --enable-asn=template CPPFLAGS=-DWOLFSSL_OLD_OID_SUM',
'--enable-all --enable-asn=original CPPFLAGS=-DWOLFSSL_OLD_OID_SUM',
New sum algorithm has no clashes at this time. Old algorithm enabled by defining: WOLFSSL_OLD_OID_SUM. New oid_sum.h file generated with scripts/asn1_oid_sum.pl. Added bunch of OID names into asn1 example.
Retest this please:
|
Description
New sum algorithm has no clashes at this time.
Old algorithm enabled by defining: WOLFSSL_OLD_OID_SUM.
New oid_sum.h file generated with scripts/asn1_oid_sum.pl.
Added bunch of OID names into asn1 example.
Testing
./configure '--disable-shared' '--enable-all' '--enable-opensslall'
./configure '--disable-shared' '--enable-all' '--enable-opensslall' --enable-asn=original
Checklist