Description

This function generates a self-signed certificate for a domain.

Examples 


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$new_crt = $cpanel->api1('SSL','gencrt', array('example.com','us','Texas','Houston','The Example Company','The Widget Division','user@example.com') ); // Call the function.

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $new_crt = $cpliveapi->api1('SSL','gencrt', ['example.com','us','Texas','Houston','The Example Company','The Widget Division','user@example.com'] ); # Call the function.

 

<cpanel Module="SSL::gencrt( $FORM('host','country','state','city','company','companydivision','email') )">
cpapi1 --user=username SSL gencrt example.com us Texas Houston "The Example Company" "The Widget Division" user@example.com

Certificate generated!

Parameters

ParameterTypeDescriptionPossible valuesExample
host

string

Required

The domain name.

A valid domain name.example.com
countrystring

Required

The certificate owner's country.

A valid two-letter ISO-3166 country code.US
statestring

Required

The certificate owner's state.

A valid state name.

Do not abbreviate this parameter. Use the full name of the state.

Texas
citystring

Required

The certificate owner's city.

A valid string.Houston
companystring

Required

The certificate owner's company.

A valid string.The Example Company
companydivisionstring

The division of the company that owns the certificate.

This parameter defaults to an empty string.

A valid string.The Widget Division
emailstring

Required

The email address of the certificate owner.

A valid email address.user@example.com

Returns

This function returns a confirmation message.