Create certificate

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

Create a new SSL certificate.

REQUIRED


  • IDSession string (32)
    Session ID.
  • prod string (20)
    SSL product ID. (See SSL certificate products)
  • duration integer
    Period of validity in years
  • CSRInfo object (StructCSR)
    Object of type StructCSR containing information about the CSR.
  • validation string
    Validation method of the CSR

    • by email
      Provide for one email: “email:admin@yourdomain.com”
      Provide for several ones: “email:postmaster@yourdomain.com,webmaster@yourdomain.com”
    • by file,
      Provide “file”
    • by dns
      Provide “dns”

An Object of type StructOperationResponse

  • 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”.
<?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); 
} 
?>