Skip to content

Add OpenSSL initialization on-load#466

Merged
staticlibs merged 1 commit into
duckdb:mainfrom
staticlibs:openssl_init
May 10, 2026
Merged

Add OpenSSL initialization on-load#466
staticlibs merged 1 commit into
duckdb:mainfrom
staticlibs:openssl_init

Conversation

@staticlibs
Copy link
Copy Markdown
Member

The extension links OpenSSL statically along with the libpq.

In some environments the following error is thrown on the first SSL connection:

port 5432 failed: could not create SSL context: unknown option

Subsequent connections work correctly.

The root cause is unclear, but it is suspected that some kind of race is happening with OpenSSL initialization on the first use from libpq.

This PR adds explicit initialization on extension load time, with it the problem was not observed.

The extension links OpenSSL statically along with the libpq.

In some environments the following error is thrown on the first SSL
connection:

```
port 5432 failed: could not create SSL context: unknown option
```

Subsequent connections work correctly.

The root cause is unclear, but it is suspected that some kind of race is
happening with OpenSSL initialization on the first use from libpq.

This PR adds explicit initialization on extension load time, with it the
problem was not observed.
@staticlibs staticlibs merged commit f62f652 into duckdb:main May 10, 2026
7 checks passed
@staticlibs staticlibs deleted the openssl_init branch May 10, 2026 19:17
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.

1 participant