socket
socket copied to clipboard
ServerTlsContext: allow disabling verify peer name
Motivation: servers accepting connections from trusted peers do not know the expected peer name in advance. Therefore, it must be possible to accept incoming connections (validating their client certificate) without being forced to specify an expected client name.
You do not need this when using amphp/socket to run your very own public web server, but it is a requirement when running every other kind of service based on trusted client certificates (with more than one client).
This patch tries to address this, while preserving compatibility with the current behaviour.