Repository navigation
Conversation
On Linux the CA lookup shells out to `openssl version -d`. Houdini 22's hython puts its dsolib on LD_LIBRARY_PATH, so the system openssl binary loads Houdini's libcrypto and fails (undefined symbol: BIO_new_dgram_sctp). The compiled-in OPENSSLDIR has no cert.pem either, so setSSL throws, and the constructor's catch called set_ca_cert_path(nullptr). That builds a std::string from null (basic_string::_M_construct null not valid) and aborts the whole AyonApi init, so the resolver never starts. - check the standard system bundles (RHEL, Debian, macOS) before running the CLI - drop the null set_ca_cert_path; httplib then uses OpenSSL's default verify paths Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setSSL() let the exception from getOpenSSLDirByCLI() escape when the `openssl` CLI was missing or broken (empty output -> parseOutput throws), so the compiled-in OPENSSLDIR and the bundled certs/cacert.pem were never tried. Both lookups now log a warning and fall through. The system bundle list runs on Linux only (plus the openSUSE path): on macOS the CLI's OPENSSLDIR, e.g. Homebrew's bundle that can carry keychain CAs, stays ahead of the stock /etc/ssl/cert.pem as before. The constructor's comment and error log now say what httplib falls back to per platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YRNAzpFt5VwUwBTHRbRQRm
antirotor
approved these changes
Nov 4, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The throwing is_regular_file probe can abort certificate discovery on an inaccessible candidate, skipping later usable system, OpenSSL, and bundled certificates.
1 open issue
What changed in this PR
This PR addresses SSL initialization failures in Houdini 22 by improving CA bundle discovery and removing a null certificate-path call that aborts AyonApi construction.
Changes:
- Prefer standard Linux CA bundles before invoking OpenSSL, while preserving certificate environment-variable precedence.
- Catch CLI and compiled-in OpenSSL directory lookup failures so discovery can continue.
- Leave httplib’s default CA lookup enabled when discovery fails, rather than passing a null path.
| File | Description |
|---|---|
src/AyonCppApi/AyonCppApi.cpp |
Updates CA bundle selection, lookup fallbacks, and constructor error handling. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The USD resolver fails to start in Houdini 22 with
RuntimeError: basic_string::_M_construct null not valid.AYON_SSL_CERT_PATHset,setSSL()shells out toopenssl version -d.$HFS/dsolibfirst onLD_LIBRARY_PATHwhenever that variable is already set, and the ayon-usd launch hook sets it. The systemopensslbinary then loads Houdini's libcrypto and fails withundefined symbol: BIO_new_dgram_sctp.parseOutputthrow, and that exception escapessetSSL()straight away: the later fallbacks (compiled-in OPENSSLDIR, bundledcerts/cacert.pem) are never tried.set_ca_cert_path(nullptr). httplib takes astd::string, so constructing one from null throws, and the wholeAyonApiinit aborts.Houdini 21 is unaffected: its libcrypto is compatible with the system
openssl.Fix
/etc/pki/tls/certs/ca-bundle.crt(RHEL/Rocky),/etc/ssl/certs/ca-certificates.crt(Debian/Ubuntu),/etc/ssl/ca-bundle.pem(openSUSE),/etc/ssl/cert.pem(Alpine/Arch). Where one exists, this also skips thepopenon every init. macOS keeps the CLI's OPENSSLDIR first (e.g. Homebrew's bundle, which can carry keychain CAs).certs/cacert.pem.set_ca_cert_path(nullptr). httplib then uses its default CA lookup: OpenSSL's default verify paths on Linux, the system store on Windows, the keychain on macOS when built withCPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN. The error log says so.AYON_SSL_CERT_PATHandSSL_CERT_FILEstill take precedence, as before.Testing
Rocky 9, Houdini 22.0.368, ayon-usd-resolver built against this change, a hosted AYON server,
LD_LIBRARY_PATHset, no cert env vars:basic_string::_M_construct null not valid; the resolver never initialisesUsing system CA bundle: /etc/pki/tls/certs/ca-bundle.crt; numbered and heroayon://URIs resolve, and both test stages opennullptrremoval isn't exercised by that run, because the system bundle is found first.9523234, from an independent review) is syntax-checked against the pinned httplib/spdlog/json headers; it only wraps the two lookups and changes no path when a bundle is found.🤖 Generated with Claude Code