Skip to content

Instantly share code, notes, and snippets.

@nicgrayson
Created June 3, 2013 15:32
Show Gist options
  • Select an option

  • Save nicgrayson/5699017 to your computer and use it in GitHub Desktop.

Select an option

Save nicgrayson/5699017 to your computer and use it in GitHub Desktop.
def verify_cert_domain(cert_content,domain)
cert = OpenSSL::X509::Certificate.new(cert_content)
cert.subject.to_s.match("CN=#{domain}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment