SslCreate

From NETIM
Jump to: navigation, search


Release Runtime
API >= 2.0 Synchronous


Description

Creates a new SSL certificate

StructOperationResponse sslCreate(string idSession, string prod, int duration, StructCSR CSRInfo, string validation)


Parameters

Format Variable Description Notes
string (32) IDSession ID of the Session
string (20) prod Certificate type
int duration period of validity in years
StructCSR CSRInfo Object containing informations about the CSR
string validation Validation method of the CSR (either by email or file) examples :

"file"

"email:admin@yourdomain.com"

"email:postmaster@yourdomain.com,webmaster@yourdomain.com"


Return

A structure StructOperationResponse


Notes

CSRInfo must contain a StructCSR object which either contains the CSR and only the CSR if it is already generated or every other informations requested in purpose to generate one.
In the case of a validation by file, the validation parameter must be equal to "file".
In the case of a validation by email, an email address must be provided for each different domains contained in the common names and alternative names properties of the StructCSR object.
Each email address must match one of the following addresses: admin@yourdomain.com, administrator@yourdomain.com, hostmaster@yourdomain.com, webmaster@yourdomain.com or postmaster@yourdomain.com.
If several addresses are provided, they must be separated by comas.
For instance, if the CSR would contain yourdomain.com and yourdomain.fr, validation could be equal to "email:admin@yourdomain.com,postmaster@yourdomain.fr".

Examples

Langage PHP

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
$prod = 'SSLDV';
$duration = 1;
$validation = 'email:admin@website.com';
 
$CSRInfo1 = array();
$CSRInfo1['Country'] = 'country';
$CSRInfo1['City'] = 'city';
$CSRInfo1['Region'] = 'region';
$CSRInfo1['Organisation'] = 'organisation';
$CSRInfo1['Department'] = '';
$CSRInfo1['EmailAddress'] = 'email';
$CSRInfo1['CommonName'] = array('www.website.com');
$CSRInfo1['AlternativeNames'] = array();
 
$CSRInfo2 = array();
$CSRInfo2['CSR'] = 'CERTIFICATE REQUEST';
 
try 
{ 
      $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN");
 
      //SSL without a CSR
      $StructOperationResponse1 = $clientSOAP->sslCreate($idSession, $prod, $duration, $CSRInfo1, $validation);
 
      //SSL with an existing CSR
      $StructOperationResponse2 = $clientSOAP->sslCreate($idSession, $prod, $duration, $CSRInfo2, $validation);
 
      print_r("<pre>");
      print_r($StructOperationResponse1);
      print_r("</pre>");
 
      print_r("<pre>");
      print_r($StructOperationResponse2);
      print_r("</pre>");
} 
catch(SoapFault $fault) 
{ 
      echo "Exception : " .$fault->getMessage(). "\n"; 
} 
 
if(isset($idSession)) 
{ 
      $clientSOAP->sessionClose($idSession); 
} 
?>
Personal tools
Namespaces

Variants
Actions
Your account
Domain names
Contact Us
Web Hosting
SSL Certificate
Email Hosting
Website Builder
Resellers
Affiliates
Miscellaneous