Class: R509::OCSP::Responder::OCSPConfig
- Inherits:
-
Object
- Object
- R509::OCSP::Responder::OCSPConfig
- Defined in:
- lib/r509/ocsp/responder/ocsp-config.rb
Class Method Summary collapse
Class Method Details
.load_config ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/r509/ocsp/responder/ocsp-config.rb', line 3 def self.load_config config_data = File.read("config.yaml") Dependo::Registry[:config_pool] = R509::Config::CAConfigPool.from_yaml("certificate_authorities", config_data) Dependo::Registry[:copy_nonce] = YAML.load(config_data)["copy_nonce"] || false Dependo::Registry[:cache_headers] = YAML.load(config_data)["cache_headers"] || false Dependo::Registry[:max_cache_age] = YAML.load(config_data)["max_cache_age"] Dependo::Registry[:ocsp_signer] = R509::OCSP::Signer.new( :configs => Dependo::Registry[:config_pool], :validity_checker => Dependo::Registry[:validity_checker], :copy_nonce => Dependo::Registry[:copy_nonce] ) end |
.print_config ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/r509/ocsp/responder/ocsp-config.rb', line 21 def self.print_config Dependo::Registry[:log].warn "Config loaded" Dependo::Registry[:log].warn "Copy Nonce: "+Dependo::Registry[:copy_nonce].to_s Dependo::Registry[:log].warn "Cache Headers: "+Dependo::Registry[:cache_headers].to_s Dependo::Registry[:log].warn "Max Cache Age: "+Dependo::Registry[:max_cache_age].to_s Dependo::Registry[:config_pool].all.each do |config| Dependo::Registry[:log].warn "Config: " Dependo::Registry[:log].warn "CA Cert:"+config.ca_cert.subject.to_s Dependo::Registry[:log].warn "OCSP Cert (may be the same as above):"+config.ocsp_cert.subject.to_s Dependo::Registry[:log].warn "OCSP Validity Hours: "+config.ocsp_validity_hours.to_s Dependo::Registry[:log].warn "\n" end end |