Working with on-demand keys

While submitting the requestSigning request, you can create a new certificate or chose an existing one. Use the signingAction parameter in the SigningCertificateOptionsType to convey this information.

You can also use the generateCertificate API to generate a new certificates.

Generating new certificate while signing

Use the GENERATE_NEW_CERT signingAction and provide a friendly name for the new certificate.

java
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cod="http://api.ws.symantec.com/webtrust/codesigningservice">
   <soapenv:Header/>
   <soapenv:Body>
      <cod:requestSigning>
         <!--Optional:-->
         <cod:requestSigningRequest>
            <!--You may enter the following 10 items in any order-->
            <cod:authToken>
               <cod:userName></cod:userName>
               <cod:password></cod:password>
               <cod:partnerCode></cod:partnerCode>
            </cod:authToken>
            <!--Optional:-->
            <cod:publisherID></cod:publisherID>
            <cod:applicationName></cod:applicationName>
            <cod:applicationVersion/>
            <cod:signingServiceName></cod:signingServiceName>
            <cod:application></cod:application>
            <cod:commaDelimitedFileNames></cod:commaDelimitedFileNames>
            <cod:signingCertificateOptions>
												<cod:signingAction>GENERATE_NEW_CERT</cod:signingAction>
												<cod:certificateFriendlyName>Demo1234</cod:certificateFriendlyName>
            </cod:signingCertificateOptions>
         </cod:requestSigningRequest>
      </cod:requestSigning>
   </soapenv:Body>
</soapenv:Envelope>

Using existing certificate while signing

Use the USE_FRIENDLY_CERT_NAME signingAction along with the friendly name of the existing certificate.

java
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cod="http://api.ws.symantec.com/webtrust/codesigningservice">
   <soapenv:Header/>
   <soapenv:Body>
      <cod:requestSigning>
         <!--Optional:-->
         <cod:requestSigningRequest>
            <!--You may enter the following 10 items in any order-->
            <cod:authToken>
               <cod:userName></cod:userName>
               <cod:password></cod:password>
               <cod:partnerCode></cod:partnerCode>
            </cod:authToken>
            <!--Optional:-->
            <cod:publisherID></cod:publisherID>
            <cod:applicationName></cod:applicationName>
            <cod:applicationVersion/>
            <cod:signingServiceName></cod:signingServiceName>
            <cod:application></cod:application>
            <cod:commaDelimitedFileNames></cod:commaDelimitedFileNames>
            <cod:signingCertificateOptions>
  										<cod:signingAction>USE_FRIENDLY_CERT_NAME</cod:signingAction>
            <cod:certificateFriendlyName>Demo1234</cod:certificateFriendlyName>
            </cod:signingCertificateOptions>
         </cod:requestSigningRequest>
      </cod:requestSigning>
   </soapenv:Body>
</soapenv:Envelope>

We use cookies to ensure that we give you the best experience on our website. By using this site, you agree to the Terms of Service.