http/tls: fixes