Search code examples
sslopensslhandshaketls-psk

Is there a public psk server to test tls handshake?


What I want is test tls handshake when psk is active. I also want to see every http header exchanged during the connection between client (my laptop) and public server. Now I am wondering if there is a public psk tls server where I can do my test.

Regards.


Solution

  • I doubt that there is a web server using PSK on the internet open for public testing. Also I doubt that browsers support PSK cipher suites. But you can setup your own web server using PSK with openssl:

    openssl s_server -psk 1a2b3c4d -nocert -www
    

    And the matching client:

    openssl s_client -connect 127.0.0.1:4433 -psk 1a2b3c4d
    

    As for the HTTP protocol: it is independent from the TLS layer, i.e. it does not change if PSK or the normal authentication with certificates is used.