Description


This function generates a certificate signing request (CSR).



Examples 




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



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


<cpanel Module="SSL::gencsr( $FORM('host','country','state','city','co','cod','email','pass') )">




cpapi1 --user=username SSL gencsr hostname.example.com us Texas Houston "The Example Company" "Widget Production" user@example.com 12345luggage


This function does not return output.



Parameters

ParameterTypeDescriptionPossible valuesExample
host

string

Required

The hostname.

A fully-qualified domain name.hostname.example.com
countrystring

Required

The certificate owner's country.

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

Required

The certificate owner's state.

The full name of the state.

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


Texas
citystring

Required

The certificate owner's city.

The full name of the city.Houston
costring

Required

The certificate owner's company name.

A valid string.The Example Company
codstring

The certificate owner's company division.

This parameter defaults to an empty string.

A valid string.Widget Production
emailstring

Required

The email address for the certificate.

A valid email address.username@example.com
passstring

The password that will correspond to the certificate.

This parameter defaults to an empty string.

A valid string.12345luggage

Returns

This function does not return output. The system writes the CSR to the user's ~ssl/private directory,