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

Versions Compared

Key

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

Description

Excerpt

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

Warning
titleWarning:

Include Page
LIB:_cPanelAPI1NewerFunctions
LIB:_cPanelAPI1NewerFunctions

  • UAPI (recommended) SSL::generate_cert 
    Excerpt Include
    UAPI Functions - SSL::generate_cert
    UAPI Functions - SSL::generate_cert
    nopaneltrue
  • cPanel API 2SSL::gencrt
    Excerpt Include
    cPanel API 2 Functions - SSL::gencrt
    cPanel API 2 Functions - SSL::gencrt
    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.
$new_crt = $cpanel->api1('SSL','gencrt', array('example.com','us','Texas','Houston','The Example Company','The Widget Division','user@example.com') ); // 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 $new_crt = $cpliveapi->api1('SSL','gencrt', ['example.com','us','Texas','Houston','The Example Company','The Widget Division','user@example.com'] ); # 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::gencrt( $FORM('host','country','state','city','company','companydivision','email') )">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username SSL gencrt example.com us Texas Houston "The Example Company" "The Widget Division" user@example.com

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

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

Note
titleNote:

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.