Skip to content

Override find_cert_chain instead of the deprecated cert_chain in the TLS examples - #5960

Merged
randombit merged 1 commit into
randombit:masterfrom
moritzschmitt:fix-examples-find-cert-chain
Sep 22, 2026
Merged

randombit merged 1 commit into
randombit:masterfrom
moritzschmitt:fix-examples-find-cert-chain

Conversation

@moritzschmitt

Copy link
Copy Markdown
Contributor

The windows-11-arm runners are being migrated to the Visual Studio 2026 image this week (actions/runner-images#14602). Its MSVC 19.51 emits C4996 when a class overrides a [[deprecated]] virtual function, and with --werror-mode the amalgamation build fails in tls_client.cpp, tls_proxy.cpp and tls_ssl_key_log_file.cpp, which override Credentials_Manager::cert_chain:

src/examples/tls_client.cpp(46): warning C4996: 'Botan::Credentials_Manager::cert_chain': Do not define or use this function; use find_cert_chain

Seen first on #5941, where the same tree passed with MSVC 19.44 a few hours earlier. The library and the tests are not affected because BOTAN_IS_BEING_BUILT disables BOTAN_DEPRECATED.

The three examples now override find_cert_chain instead, which is what the deprecation message asks for. Behaviour is unchanged; the new acceptable_CAs parameter is ignored like the others.

@reneme reneme left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@moritzschmitt
moritzschmitt marked this pull request as ready for review September 22, 2026 05:11

@randombit randombit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@randombit
randombit merged commit 9ec3dd3 into randombit:master Sep 22, 2026
51 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.

3 participants