Child pages
  • cPanel API 1 Functions - SSL::uploadcrt

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function uploads an SSL certificate to the server.

Warning
titleWarning:

Include Page
LIB:_cPanelAPI1NewerFunctions
LIB:_cPanelAPI1NewerFunctions

  • UAPI (recommended)SSL::upload_cert
    Excerpt Include
    UAPI Functions - SSL::upload_cert
    UAPI Functions - SSL::upload_cert
    nopaneltrue
  • cPanel API 2SSL::uploadcrt
    Excerpt Include
    cPanel API 2 Functions - SSL::uploadcrt
    cPanel API 2 Functions - SSL::uploadcrt
    nopaneltrue
Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$upload_certificate = $cpanel->api1('SSL','uploadcrt', array('~/TestCRT') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

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

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="SSL::uploadcrt( $FORM('file') )">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username SSL uploadcrt ~/TestCRT

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

Expand
titleOutput (plaintext)
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.

Note
titleNote:

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.

Note
titleNote:

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.