Skip to content

Add CA bundle version and pinning status to the user agent string - #47

Merged
AaronAtDuo merged 1 commit into
masterfrom
user-agent-ca-pinning
Jul 29, 2026
Merged

Add CA bundle version and pinning status to the user agent string#47
AaronAtDuo merged 1 commit into
masterfrom
user-agent-ca-pinning

Conversation

@cisco-dmytro-hissa

Copy link
Copy Markdown
Contributor

Description

  • Added a CA_BUNDLE_VERSION constant (ca_bundle/1.0) to DuoApi.
  • Added a private AppendCaInfo(string agent) helper that appends the CA bundle version and the current pinning status —(ca_pinning=enabled) or (ca_pinning=disabled) — to a User-Agent string.
  • Set the request's UserAgent via AppendCaInfo(this.user_agent) so the pinning status reflects runtime state (e.g. after DisableCaPinning()).

How Has This Been Tested?

  • TestDefaultUserAgent (updated): asserts the CA bundle version is present and the string ends with (ca_pinning=enabled).
  • TestCustomUserAgent (updated): asserts the full expected User-Agent including the CA bundle version and (ca_pinning=enabled).
  • TestUserAgentCaPinningDisabled (new): calls DisableCaPinning() and asserts the User-Agent ends with (ca_pinning=disabled).

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@cisco-dmytro-hissa cisco-dmytro-hissa self-assigned this Jul 29, 2026
@cisco-dmytro-hissa
cisco-dmytro-hissa marked this pull request as ready for review July 29, 2026 11:32
@AaronAtDuo
AaronAtDuo merged commit af52a23 into master Jul 29, 2026
2 checks passed
@AaronAtDuo
AaronAtDuo deleted the user-agent-ca-pinning branch July 29, 2026 13:58
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