Skip to content

Instantly share code, notes, and snippets.

@bdwyertech
Created September 7, 2018 22:40
Show Gist options
  • Save bdwyertech/01050bde758cbdc3dd9a2eb10c0888a7 to your computer and use it in GitHub Desktop.
Save bdwyertech/01050bde758cbdc3dd9a2eb10c0888a7 to your computer and use it in GitHub Desktop.
Ruby'isms
# => Find Certificate CN
cn = OpenSSL::X509::Certificate.new(::File.read('kc.crt')).subject.to_a.find { |c| c[0] == 'CN' }[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment