-
Notifications
You must be signed in to change notification settings - Fork 3
XMLSec1 testing #76
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: main
Are you sure you want to change the base?
XMLSec1 testing #76
Conversation
that we extract the r and s parameters, when the der is malformed when the integer values are raw bytes without proper sign-bit handling (those ders are used when signing/veriffing in the xmlsec1's testsuite); - handle 0-byte cipher finalization in aes-cbc, we return -173 when data size = 0 when decrypting, this gets called by xmlsec1 to flush the buffer after decryption is done (not needed for wolfssl, but we return 0 in that case);
- Added v2.6.7 to the openldap workflow
45546b4 to
96c8dd6
Compare
wolfssl-gnutls-wrapper/src/cipher.c
Outdated
| } | ||
|
|
||
| /* Handle 0-byte finalization call, common in cipher APIs for flushing/padding */ | ||
| if (src_size == 0) { |
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 don't use TABs for indenting.
wolfssl-gnutls-wrapper/src/pk.c
Outdated
| if (len & 0x80) { | ||
| /* Long form length */ | ||
| word32 num_bytes = len & 0x7F; | ||
| if (num_bytes > 4 || idx + num_bytes > sig_len) return -1; |
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.
When len is 0x80 then this is indefinite length encoded meaning go look for EOC.
Don't want to support that here.
wolfssl-gnutls-wrapper/src/pk.c
Outdated
| /* Parse r length */ | ||
| if (idx >= sig_len) return -1; | ||
| len = sig_data[idx++]; | ||
| if (len & 0x80) { |
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.
Extract into a function as this code is required in multiple places.
wolfssl-gnutls-wrapper/src/pk.c
Outdated
| } | ||
|
|
||
| /* Skip leading zero byte if present (sign byte) */ | ||
| if (len > 0 && idx < sig_len && sig_data[idx] == 0x00) { |
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.
len must be greater than 0.
- removed accidental Tab in the wolfssl-gnutls-wrapper/src/cipher.c file;
that we extract the r and s parameters, when the der is malformed when the integer
values are raw bytes without proper sign-bit handling (those ders are
used when signing/veriffing in the xmlsec1's testsuite);
size = 0 when decrypting, this gets called by xmlsec1 to flush the
buffer after decryption is done (not needed for wolfssl, but we return 0 in that case);