v / vlib / net / http / server_tls_d_use_openssl.v
13 lines · 11 sloc · 689 bytes · 0ff44dc4627abf904dca7a3a2e99b17b823ebe4c
Raw
1// Copyright (c) 2019-2024 Alexander Medvednikov. All rights reserved.
2// Use of this source code is governed by an MIT license
3// that can be found in the LICENSE file.
4module http
5
6// TLS termination for net.http.Server is currently provided by the default
7// mbedtls backend. Under `-d use_openssl`, the OpenSSL backend does not yet
8// expose a server-side listener; this file replaces the implementation in
9// `server_tls_notd_use_openssl.v` with a stub that reports a clear error.
10
11fn (mut s Server) listen_and_serve_tls() {
12 eprintln('net.http.Server: TLS termination is not supported on -d use_openssl yet; remove -d use_openssl or omit cert/cert_key to fall back to plain HTTP')
13}
14