Class: Lumberg::Whostmgr::Ssl
- Inherits:
-
Base
- Object
- Lumberg::Whm::Base
- Base
- Lumberg::Whostmgr::Ssl
- Defined in:
- lib/lumberg/whostmgr/ssl.rb
Instance Attribute Summary
Attributes inherited from Lumberg::Whm::Base
Instance Method Summary collapse
-
#create(options = {}) ⇒ Object
Public: Generates a SSL certificate.
-
#remove(options = {}) ⇒ Object
Public: Removes a SSL certificate.
-
#remove_data(options = {}) ⇒ Object
Public: Removes certificate data.
Methods inherited from Base
Methods inherited from Lumberg::Whm::Base
Constructor Details
This class inherits a constructor from Lumberg::Whm::Base
Instance Method Details
#create(options = {}) ⇒ Object
Public: Generates a SSL certificate
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 (ISO-3166-1).
: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.
Returns a Hash API response.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/lumberg/whostmgr/ssl.rb', line 44 def create( = {}) [:countryName] = .delete(:country).upcase [:stateOrProvinceName] = .delete(:state) [:localityName] = .delete(:city) [:organizationName] = .delete(:company) [:organizationalUnitName] = .delete(:company_division) [:domains] = .delete(:host) [:emailAddress] = .delete(:email) perform_request({ function: "dogencrt" }.merge()) end |
#remove(options = {}) ⇒ Object
Public: Removes a SSL certificate
options - Hash options for API call params (default: {}):
:domain - Domain name for the cert removal
Returns Hash API response
10 11 12 13 |
# File 'lib/lumberg/whostmgr/ssl.rb', line 10 def remove( = {}) host = .delete(:domain) perform_request({ function: "realdelsslhost", host: host }) end |
#remove_data(options = {}) ⇒ Object
Public: Removes certificate data. Certificates and CSRs are grouped with their associated private key in SSL Storage Manager and every piece of data has a unique identifier. Whenever we’re removing a SSL certificate from a domain, it’s good to remove its data.
options - Hash options for API call params (default: {}):
:id - String unique identifier for cert, key or CSR
:type - String type
Returns Hash API response
25 26 27 |
# File 'lib/lumberg/whostmgr/ssl.rb', line 25 def remove_data( = {}) perform_request({ function: "delssldata" }.merge()) end |