Class: Lumberg::Whm::Cert
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#fetch_ssl_vhosts ⇒ Object
Public: Gets information about each vhost on the server and the SSL certificates that are installed on them.
-
#fetchsslinfo(options = {}) ⇒ Object
Displays the SSL certificate, private key, and CA bundle/intermediate certificate associated with a specified domain.
-
#generatessl(options = {}) ⇒ Object
Public: Generates a Certificate Signing Request.
-
#installssl(options = {}) ⇒ Object
Install an SSL certificate.
-
#listcrts(options = {}) ⇒ Object
List all the domains on the server that have SSL certificates installed.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Lumberg::Whm::Base
Instance Method Details
#fetch_ssl_vhosts ⇒ Object
Public: Gets information about each vhost on the server and the SSL certificates that are installed on them.
Returs a Hash
79 80 81 82 83 84 85 |
# File 'lib/lumberg/whm/cert.rb', line 79 def fetch_ssl_vhosts server.perform_request( 'fetch_ssl_vhosts', { :"api.version" => 1, response_key: "data" }) end |
#fetchsslinfo(options = {}) ⇒ Object
Displays the SSL certificate, private key, and CA bundle/intermediate certificate associated with a specified domain. Alternatively, it can display the private key and CA bundle associated with a specified cert
Required
* <tt>:domain</tt> - PENDING
* <tt>:crtdata</tt> - PENDING
Optional
* <tt>none</tt> - PENDING
15 16 17 18 |
# File 'lib/lumberg/whm/cert.rb', line 15 def fetchsslinfo( = {}) server.force_response_type = :ssl result = server.perform_request('fetchsslinfo', ) end |
#generatessl(options = {}) ⇒ Object
Public: Generates a Certificate Signing Request
options - Hash options for API call params (default: {}):
:city - The city in which your server resides.
:company - The name of the company.
:company_division - The division of your company.
:country - A two letter abbreviation for the country.
:email - A valid email address that will correspond to
the certificate signing request
:host - The domain that corresponds to the csr.
:state - A two letter abbreviation that corresponds to the
state.
:pass - The password of the csr.
:xemail - Email address to which the certificate will be
sent (String)
:noemail - (Boolean) and dependent value. Set to "1" when
:xemail is empty
Returns Hash API response.
39 40 41 42 43 44 45 |
# File 'lib/lumberg/whm/cert.rb', line 39 def generatessl( = {}) [:co] = .delete(:company) [:cod] = .delete(:company_division) server.force_response_type = :ssl result = server.perform_request('generatessl', ) end |
#installssl(options = {}) ⇒ Object
Install an SSL certificate
Required
* <tt>:user</tt> - PENDING
* <tt>:domain</tt> - PENDING
* <tt>:cert</tt> - PENDING
* <tt>:key</tt> - PENDING
* <tt>:cab</tt> - PENDING
* <tt>:ip</tt> - PENDING
Optional
* <tt>none</tt> - PENDING
59 60 61 |
# File 'lib/lumberg/whm/cert.rb', line 59 def installssl( = {}) result = server.perform_request('installssl', ) end |
#listcrts(options = {}) ⇒ Object
List all the domains on the server that have SSL certificates installed
Required
* <tt>none</tt> - PENDING
Optional
* <tt>none</tt> - PENDING
70 71 72 73 |
# File 'lib/lumberg/whm/cert.rb', line 70 def listcrts( = {}) server.force_response_type = :ssl result = server.perform_request('listcrts', .merge(response_key: 'crt')) end |