Skip to content

XMLSec1 testing#76

Merged
SparkiDev merged 7 commits intowolfSSL:mainfrom
gasbytes:xmlsec1
Dec 5, 2025
Merged

XMLSec1 testing#76
SparkiDev merged 7 commits intowolfSSL:mainfrom
gasbytes:xmlsec1

Conversation

@gasbytes
Copy link
Copy Markdown
Contributor

@gasbytes gasbytes commented Nov 14, 2025

  • add lenient DER parser for ECDSA signatures when we fail with -171, so
    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 v1.21.4 to the wget workflow (running on native ubuntu 24.04);
  • Added v2.6.7 to the openldap workflow (running on native ubuntu 24.04);
  • Added wireshark workflow (running on native ubuntu 24.04);
  • Added xmlsec workflow (running on native ubuntu 24.04);

  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
@gasbytes gasbytes self-assigned this Nov 14, 2025
@gasbytes gasbytes force-pushed the xmlsec1 branch 3 times, most recently from 45546b4 to 96c8dd6 Compare November 17, 2025 16:13
Comment thread wolfssl-gnutls-wrapper/src/cipher.c Outdated
}

/* Handle 0-byte finalization call, common in cipher APIs for flushing/padding */
if (src_size == 0) {
Copy link
Copy Markdown
Contributor

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.

Comment thread 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;
Copy link
Copy Markdown
Contributor

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.

Comment thread wolfssl-gnutls-wrapper/src/pk.c Outdated
/* Parse r length */
if (idx >= sig_len) return -1;
len = sig_data[idx++];
if (len & 0x80) {
Copy link
Copy Markdown
Contributor

@SparkiDev SparkiDev Nov 18, 2025

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.

Comment thread 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) {
Copy link
Copy Markdown
Contributor

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;
@gasbytes gasbytes force-pushed the xmlsec1 branch 15 times, most recently from d290cb2 to 9969003 Compare November 26, 2025 15:59
being tested  on ubuntu 24.04.
- Wireshark workflow
- Removing master version testing from the libjcat workflow.
Uses post quantum by default, not currently supported by gnutls-wolfssl.
@gasbytes gasbytes marked this pull request as ready for review December 1, 2025 15:22
@gasbytes gasbytes requested a review from SparkiDev December 1, 2025 15:23
@gasbytes gasbytes assigned SparkiDev and unassigned gasbytes Dec 1, 2025
Comment thread wolfssl-gnutls-wrapper/src/pk.c Outdated
Comment thread wolfssl-gnutls-wrapper/src/pk.c Outdated
- return -1 on num_bytes = 0 (unsupported);
@SparkiDev SparkiDev merged commit bca871c into wolfSSL:main Dec 5, 2025
59 of 62 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.

2 participants