MCPcopy Create free account
hub / github.com/F-Stack/f-stack / updateTLSPort

Function updateTLSPort

app/redis-6.2.6/src/config.c:2376–2394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2374}
2375
2376static int updateTLSPort(long long val, long long prev, const char **err) {
2377 /* Do nothing if port is unchanged */
2378 if (val == prev) {
2379 return 1;
2380 }
2381
2382 /* Configure TLS if tls is enabled */
2383 if (prev == 0 && tlsConfigure(&server.tls_ctx_config) == C_ERR) {
2384 *err = "Unable to update TLS configuration. Check server logs.";
2385 return 0;
2386 }
2387
2388 if (changeListenPort(val, &server.tlsfd, acceptTLSHandler) == C_ERR) {
2389 *err = "Unable to listen on this port. Check server logs.";
2390 return 0;
2391 }
2392
2393 return 1;
2394}
2395
2396#endif /* USE_OPENSSL */
2397

Callers

nothing calls this directly

Calls 2

tlsConfigureFunction · 0.85
changeListenPortFunction · 0.85

Tested by

no test coverage detected