Description

This function uploads an SSL certificate to the server.

Examples 


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$upload_certificate = $cpanel->api1('SSL','uploadcrt', array('~/TestCRT') ); // Call the function.

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $upload_certificate = $cpliveapi->api1('SSL','uploadcrt', ['~/TestCRT'] ); # Call the function.

 

<cpanel Module="SSL::uploadcrt( $FORM('file') )">
cpapi1 --user=username SSL uploadcrt ~/TestCRT

example.com (auto-detected)
 
If the function fails, it will return a relevant error message.

Parameters

ParameterTypeDescriptionPossible valuesExample
crt

string

The certificate to upload through an HTTP-POST command.

If you use this parameter, do not use the file parameter.

The certificate's raw data.(The certificate data.)
filestring

The path to the certificate.

If you use this parameter, do not use the crt parameter.

An absolute file path.
~/TestCRT

Returns

This function returns the hostname and any relevant error messages.