You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
std.http: a TLS server can take its certificate and key as PEM text, not only file paths #3362
http.server_set_tls(server, cert_path, key_path) takes file paths only, so a program that has its certificate and private key in memory must write the key to disk first. servirtium-vcr's HTTPS listener is built on it, and a .NET user of servirtium-vcr flagged the private key it has to write to %TEMP% in their tests as a security-review item.
Today.http_server_set_tls_raw (std/net/aether_http_server.c) stores the two paths. The OpenSSL backend loads them into an SSL_CTX at once; the pure-Aether backend keeps the paths and pure_tls_server_accept (std/cryptography/tls13_server/module.ae) reads both with fs.read on every connection, then parses the PEM text.
Wanted.
err = http.server_set_tls_pem(server, cert_pem, key_pem) // "" or the reason
Same contract as server_set_tls: "" on success, else why not.
Both backends. OpenSSL loads the chain and key from memory BIOs. The pure backend parses the chain and key once, at set time, and the accept path uses the parsed form instead of reading files per connection (which server_set_tls could then share).
Activity
tls13 server: the private key is kept shielded (#3376)
test: the ownership probe uses the creds API; the key test runs one s…
std.http: server_set_tls_pem; the OpenSSL backend sends the chain; TL…