Class: Jekyll::Gitlab::Letsencrypt::Acme
- Inherits:
-
Object
- Object
- Jekyll::Gitlab::Letsencrypt::Acme
- Defined in:
- lib/jekyll/gitlab/letsencrypt/acme.rb
Instance Attribute Summary collapse
-
#registration ⇒ Object
Returns the value of attribute registration.
Instance Method Summary collapse
Instance Attribute Details
#registration ⇒ Object
Returns the value of attribute registration.
11 12 13 |
# File 'lib/jekyll/gitlab/letsencrypt/acme.rb', line 11 def registration @registration end |
Instance Method Details
#authorized? ⇒ Boolean
20 21 22 |
# File 'lib/jekyll/gitlab/letsencrypt/acme.rb', line 20 def .status == 'valid' end |
#challenge ⇒ Object
24 25 26 |
# File 'lib/jekyll/gitlab/letsencrypt/acme.rb', line 24 def challenge @challenge ||= .http01 end |
#client ⇒ Object
28 29 30 31 32 33 |
# File 'lib/jekyll/gitlab/letsencrypt/acme.rb', line 28 def client @client ||= begin private_key = OpenSSL::PKey::RSA.new(4096) ::Acme::Client.new private_key: private_key, endpoint: endpoint, connection_options: { request: { open_timeout: 5, timeout: 5 } } end end |
#register! ⇒ Object
13 14 15 16 17 18 |
# File 'lib/jekyll/gitlab/letsencrypt/acme.rb', line 13 def register! Jekyll.logger.info "Registering #{email} to #{endpoint}..." @registration = client.register contact: "mailto:#{email}" @registration.agree_terms self end |