Skip to content

Instantly share code, notes, and snippets.

@nauman
Created April 18, 2012 03:20
Show Gist options
  • Save nauman/2410875 to your computer and use it in GitHub Desktop.
Save nauman/2410875 to your computer and use it in GitHub Desktop.
openssl will work on windows with this code as well for pk12 type
#!/usr/bin/ruby
require 'openssl'
require 'base64'
if ARGV.length == 2
pkcs12 = OpenSSL::PKCS12.new(File.read(ARGV[0]), ARGV[1])
p pkcs12.certificate
else
puts "Usage: load_cert.rb <path_to_cert> <cert_password>"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment