-
Notifications
You must be signed in to change notification settings - Fork 862
Fix bug in ParseCRL_Extensions #8587
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
Using a mp_int is heavy weight for a 20 byte number - can allocate up to 1KB for storage of 20 bytes. |
Jenkins 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.
Looks good. Still on fence about backwards compatibility, but okay for now. Over to @SparkiDev
550ca10
to
70a54ff
Compare
mp_int curr_num[1]; | ||
#endif | ||
|
||
mp_init(prev_num); |
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.
Technically these have return codes... you might consider using mp_init_multi to simplify cleanup.
} | ||
XMEMSET(tmp, 0, sizeof(tmp)); | ||
|
||
mp_free(dec_num); |
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.
Consider not calling free it alloc or init fails... Also the if(dec_num) below is optional since XFREE always does NULL check.
Description
CRL_NUMBER_OID
case inParseCRL_Extensions()
NO_BIG_INT
is definedFixes #8574 and wolfSSL/wolfCLU#174
Also fixes zd#19611
Testing
Tested using wolfCLU with the CRL files provided in #8574 and wolfSSL/wolfCLU#174
Build wolfSSL with
./configure --enable-wolfclu --enable-crl
Then run wolfCLU with
./wolfssl crl -in crl_extention_test.pem -text
Checklist