diff options
Diffstat (limited to 'examples/ossl_config.rb')
-rwxr-xr-x | examples/ossl_config.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/ossl_config.rb b/examples/ossl_config.rb new file mode 100755 index 0000000..e7f28b2 --- /dev/null +++ b/examples/ossl_config.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby + +require 'openssl' +include OpenSSL + +p config = Config.load("./config.cnf") + +p string = config.get_value("req", "x509_extensions") +p string = config.get_value("req", "default_bits") +p number = config.get_value("req", "default_bits").to_i +p string = config.get_value("req", "distinguished_name") +p config.get_section("req") + +## +#DISABLED! +#p sect = config.get_section(string) +#p ConfigSection.new + |