Improper verification of cryptographic signatures in the `ssl handshake` module allows an on-path attacker to impersonate any server to a TLS 1.2 or DTLS client. The issue occurs when a server sends a `ServerKeyExchange` without a signature and omits the Certificate message. In this scenario, the `ssl handshake:decode server key/3` function reports the signature algorithm as `anon`, and the `ssl handshake:verify signature/5` function returns true for `anon` without requiring a public key. Consequently, the handshake completes for `ecdhe rsa`, `ecdhe ecdsa`, `dhe rsa`, and `dhe dss` key exchanges using a cipher suite offered by the client. This bypasses certificate path validation, `verify fun`, and hostname checks, leading the `ssl:connect/3` function to return a successful connection even when `{verify, verify peer}` is set. TLS 1.3 clients are not affected.