My project uses Boost.Beast and OpenSSL to download some text files from https://cryptopals.com. On Windows it uses certificates from the Windows Certificate Store extracted with Microsoft CryptoAPI (source code: link).
Recently I found this failing only on Travis’s Windows environment with this error:
handshake: certificate verify failed (SSL routines) [asio.ssl:167772294]. Ubuntu (
jammy), macOS (
xcode14.1) and FreeBSD environments are working fine using their respective system-installed certificates. I was also unable to reproduce the issue on my fully-patched Windows 7 and Windows 10 systems.
I was able to remedy this by updating the Windows Certificate Store using
certutil.exe and the
Import-Certificate PowerShell cmdlet: Job #618.3 - tanzislam/cryptopals - Travis CI (travis-ci.com)
This extra step only takes a few seconds, so it would be helpful to integrate into Travis’s Windows environment-startup configuration for everyone. Until, perhaps, the CI image is refreshed with a later Windows Server release or patched with Windows Updates.