Generate and Sign User Certificate Request (QYCUGSUC) API


  Required Parameter Group:


  Returned Value:


  Default Public Authority: *USE

  Threadsafe: No

The Generate and Sign User Certificate Request (QYCUGSUC) API generates a user certificate request and then signs the certificate request using the local Certificate Authority (CA). The request to generate and sign the user certificate request must come from a Netscape, or compatible, browser session. The call to this program must be made using the DTW_DIRECTCALL language environment in Net.Data®.

Error information is returned as a return value from this program. The error code value can be captured using the RETURNS keyword on the function definition that uses DTW_DIRECTCALL.


Authorities and Locks

User Profile Authority
Caller of this API must have *ALLOBJ and *SECADM special authorities
API Public Authority
*USE

Required Parameter Group

User name
INPUT; CHAR(*)

The name of the user for which the certificate request was made. This is a required field.

Organization
INPUT; CHAR(*)

The organization information for the user. This is a required field.

Organization unit
INPUT; CHAR(*)

The organization unit information for the user. This may be a NULL string.

City
INPUT; CHAR(*)

The city information for the user. This may be a NULL string.

State
INPUT; CHAR(*)

The state information for the user. This is a required field.

Country or region
INPUT; CHAR(*)

The country or region information for the user. This is a required field.

Public key
INPUT; CHAR(*)

The public key for the certificate request. This value is generated using the "keygen" HTML directive. This is a required field.

E-mail address
Input; CHAR(*)

The e-mail address for the user. This may be a NULL string.

File to store signed certificate
Input; CHAR(*)

The absolute pathname for the file in which the signed certificate is stored. The file will be created if it does not exist. If the file already exists, the contents of the file will be replaced. This is a required field.

This parameter is assumed to be represented in the CCSID (coded character set identifier) currently in effect for the job. If the CCSID of the job is 65535, this parameter is assumed to be represented in the default CCSID of the job.


Return Codes



Example

The following is an example of a function call to this program using Net.Data.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

%function(DTW_DIRECTCALL) signcert(IN  CHAR(10)   userName,
                                   IN  CHAR(64)   orgName,
                                   IN  CHAR(64)   orgUnitName,
                                   IN  CHAR(128)  city,
                                   IN  CHAR(128)  state,
                                   IN  CHAR(2)    countryRegion,
                                   IN  CHAR(1024) publicKey,
                                   IN  CHAR(128)  email,
                                   IN  CHAR(128)  storeFile) RETURNS(retVal) {
    %EXEC { /QSYS.LIB/QICSS.LIB/QYCUGSUC.PGM %}
%}


API introduced: V5R2

[ Back to top | Security APIs | APIs by category ]