Skip to content

Instantly share code, notes, and snippets.

@alces
Last active May 16, 2022 10:33
Show Gist options
  • Save alces/b96f91c3cda13b22e076 to your computer and use it in GitHub Desktop.
Save alces/b96f91c3cda13b22e076 to your computer and use it in GitHub Desktop.
Get an HTTPS certificates from a given URL
conn = new URL('https://www.example.com').openConnection()
conn.connect()
println conn.serverCertificates.collect {
it.toString()
}.join('\n')
conn.disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment