Skip to content

Instantly share code, notes, and snippets.

@Hexa
Created November 2, 2012 17:09
Show Gist options
  • Save Hexa/4002797 to your computer and use it in GitHub Desktop.
Save Hexa/4002797 to your computer and use it in GitHub Desktop.
OpenSSL::X509::ExtensionFactory#create_ext の結果の違い
## ruby 2.0.0dev
irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> ef = OpenSSL::X509::ExtensionFactory.new
=> #<OpenSSL::X509::ExtensionFactory:0x007fd72213f6e0 @config=nil>
irb(main):003:0> ef.create_ext('basicConstraints', 'CA:TRUE, pathlen:1', true)
=> #<OpenSSL::X509::Extension:0x007fd7221245e8>
## ruby 1.9.3p194
irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> ef = OpenSSL::X509::ExtensionFactory.new
=> #<OpenSSL::X509::ExtensionFactory:0x007ff4ab085de8>
irb(main):003:0> ef.create_ext('basicConstraints', 'CA:TRUE, pathlen:1', true)
=> basicConstraints = critical, CA:TRUE, pathlen:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment