Skip to content

Propagate invalid TLS version errors and remove dead A2A fallback branch - #113

Merged
petrsnd merged 1 commit into
OneIdentity:mainfrom
DanPeterson:bugfix/tls-flag-error-propagation
Sep 8, 2026
Merged

petrsnd merged 1 commit into
OneIdentity:mainfrom
DanPeterson:bugfix/tls-flag-error-propagation

Conversation

@DanPeterson

Copy link
Copy Markdown
Contributor

Two follow-up fixes to the TLS 1.3 support merged in #112, targeted at the upcoming v8.4.0 release.

1. Propagate invalid TLS version errors (bug)

set_tls_version_flags called exit 1 on an invalid SAFEGUARD_TLS_MIN / SAFEGUARD_TLS_MAX. Inside invoke_a2a_method — which runs in a $(...) command-substitution subshell — that exit only killed the subshell, so the caller saw an empty result and continued instead of failing.

  • set_tls_version_flags now returns non-zero on an invalid value (with the same stderr message).
  • Every call site guards it: top-level scripts (connect-safeguard.sh, invoke-safeguard-method.sh, listen-for-a2a-event.sh, listen-for-event.sh) || exit 1; the A2A helper functions in utils/a2a.sh || return 1.

2. Drop unreachable A2A fallback branch (cleanup)

After the HTTP-204 early-return added in #112, the success branch of the tail if [ ! -z "$response" ] && [ -z "$error"... ] in invoke_a2a_method was dead: the curl path already returns on success, so the only ways to reach the tail are a skipped curl path (usesclient) or a curl error Code — both of which must use the openssl s_client fallback. Removed the dead branch and run the fallback directly. Behavior-preserving (only unreachable code removed); a genuine curl error Code still triggers the openssl retry as before.

Validation

Touched suites on SPP 9.0 (spp1.dan.test, real TLS 1.3): A2A 93/0/0, A2A Broker 21/0/0, TLS Version 4/0/0 — the Invalid SAFEGUARD_TLS_MIN value is rejected test confirms #1 end-to-end. bash -n clean on all six files. Full 8.x + 9.0 regression in progress; results to follow.

set_tls_version_flags previously called exit on an invalid SAFEGUARD_TLS_MIN /
SAFEGUARD_TLS_MAX. Inside invoke_a2a_method (which runs in a command
substitution subshell) that exit only killed the subshell, so the caller saw an
empty result and kept going instead of failing. It now returns non-zero, and
every call site guards it: top-level scripts abort with exit, the A2A helper
functions return failure.

Also remove the now-unreachable success branch in invoke_a2a_method. The curl
path already returns on success (including an empty HTTP 204 body), so the only
way to reach the tail is a skipped curl path (usesclient) or a curl error Code;
both fall through to the openssl s_client fallback, which now runs directly.
@DanPeterson
DanPeterson requested a review from a team as a code owner September 8, 2026 13:58
@DanPeterson

Copy link
Copy Markdown
Contributor Author

Full regression complete — 0 failures on both appliances:

Appliance Result
SPP 9.0 (spp1.dan.test, real TLS 1.3) 292 passed / 0 failed / 1 skipped (13 suites)
SPP 8.x (spp1.dan.laptop, TLS 1.2 max) 291 passed / 0 failed / 2 skipped (13 suites)

Skips are the expected version-adaptive ones (Device Code Login; the A2A TLS-1.3-floor retrieval test correctly skips on 8.x). Ready for the v8.4.0 release.

@petrsnd
petrsnd merged commit 5c56985 into OneIdentity:main Sep 8, 2026
2 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