aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ossl_config.rb
blob: e7f28b2c8c8a110c332d496a8e5ad083e2a48001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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