Fixes to ssl/tls, misc improvements

* Use the PHP context options to configure tls rather than reinventing
  the wheel.
* Properly setup the SocketServer for ssl
* Added generic getter for config values
This commit is contained in:
2024-03-12 15:51:50 +01:00
parent 5aa4361cc4
commit e6c85b81e5
6 changed files with 47 additions and 8 deletions

View File

@ -80,7 +80,7 @@ class Server
$this->server->listen($socket);
$this->logger->info(sprintf(
"Listening on %s",
str_replace("tcp://",($socket instanceof SecureServer?"https://":"http://"),$socket->getAddress())
strtr($socket->getAddress(), [ "tcp://"=>"http://", "tls://"=>"https://"])
));
}