Skip to content

Instantly share code, notes, and snippets.

@cpu
Created April 22, 2017 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpu/d4a825bee985ae9abf9bd00a0dc9a4ab to your computer and use it in GitHub Desktop.
Save cpu/d4a825bee985ae9abf9bd00a0dc9a4ab to your computer and use it in GitHub Desktop.
Inconsistent hostname mismatch error for download.libreswan.org
$> alias libreswanTLSTest='openssl s_client -connect download.libreswan.org:443 -CApath /etc/ssl/certs -verify_hostname download.libreswan.org 2>/dev/null </dev/null | grep "Verify"'
$> alias libreswanTLSTestSNI='openssl s_client -connect download.libreswan.org:443 -servername download.libreswan.org -CApath /etc/ssl/certs -verify_hostname download.libreswan.org 2>/dev/null </dev/null | grep "Verify"'
$> for i in $(seq 10); do libreswanTLSTest; done
Verify return code: 0 (ok)
Verify return code: 62 (Hostname mismatch)
Verify return code: 0 (ok)
Verify return code: 62 (Hostname mismatch)
Verify return code: 0 (ok)
Verify return code: 62 (Hostname mismatch)
Verify return code: 0 (ok)
Verify return code: 62 (Hostname mismatch)
Verify return code: 0 (ok)
Verify return code: 62 (Hostname mismatch)
$> for i in $(seq 10); do libreswanTLSTestSNI; done
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Verify return code: 0 (ok)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment