Retrieve Certificate Information (QYCURTVCI, QycuRetrieveCertificateInfo) API



  Required Parameter Group:


 Program:  QICSS/QYCURTVCI

 Default Public Authority:  *USE

 Threadsafe:  No

The Retrieve Certificate Information (OPM, QYCURTVCI; ILE, QycuRetrieveCertificateInfo) API retrieves information from server or CA certificates. For example, you can retrieve information about certificates that are expiring within a given date range.

Authorities and Locks

Authority Required

The caller of this API must provide the password for the certificate store. In addition, the caller must have *ALLOBJ and *SECADM special authorities.

Locks
Object will be locked shared read.

Required Parameter Group

Note: Do not use quotation marks in the input parameters.
Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the certificate information.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length specified is larger than the actual size of the receiver variable, the results will not be predictable. The minimum length is 8 bytes.

Format of certificate information
INPUT; CHAR(8)

The content and format of the information that is returned for each certificate is specified here.

The possible format names are:


Certificate store name
INPUT; CHAR(*)

The certificate store from which you want to retrieve the list of certificates. The following values can be used for the certificate store name:

Length of certificate store name
INPUT; Binary(4)

The length of the certificate store name. If the format specified is OBJN0200 (see below), this field must include the QLG path name structure length in addition to the length of the path name itself. If the format specified is OBJN0100 (see below), only the length of the path name itself is included.

Format of certificate store name
INPUT; CHAR(8)

The format of the certificate store path and file name parameter.


Certificate store password
INPUT; CHAR(*)

The password for the certificate store.

Length of certificate store password
INPUT; Binary(4)

The length of the password of the certificate store.

CCSID of certificate store password
INPUT; Binary(4)

This parameter is the CCSID of the certificate store password. If the value is 0, the default CCSID of the job will be used.

Selection control
INPUT; CHAR(*)

The control information used to limit which certificates are returned. For the format of this structure, see Selection Control.

Error code
OUTPUT; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.



Receiver Formats

The following tables describe the order and format of the data returned in a receiver variable. For detailed descriptions of each field, see Receiver Field Descriptions.


RTCI0100 Format



RTCI0200 Format



RTCI0300 Format



Receiver Field Descriptions

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Certificate label. The label for the certificate. The label is returned in the CCSID (coded character set identifier) currently in effect for the job. If the CCSID of the job is 65535, the label is returned in the default CCSID of the job. The certificate label is a null terminated string.

Displacement to certificate label. The displacement from the beginning of the entry to the field that indicates the certificate label.

Displacement to CRL location. The displacement from the beginning of the entry to the field that indicates the CRL location.

Displacement to cryptographic device name. The displacement from the beginning of the entry to the field that indicates the cryptographic device name.

Displacement to domain name. The displacement from the beginning of the entry to the field that indicates the domain name.

Displacement to email address. The displacement from the beginning of the entry to the field that indicates the email address.

Displacement to first cryptographic device. The displacement from the beginning of the entry to the field that indicates the first cryptographic device.

Displacement to IP address. The displacement from the beginning of the entry to the field that indicates the IP address.

Displacement to issuer's common name. The displacement from the beginning of the entry to the field that indicates the issuer's common name.

Displacement to issuer's country or region. The displacement from the beginning of the entry to the field that indicates the issuer's country or region.

Displacement to issuer's locality. The displacement from the beginning of the entry to the field that indicates the issuer's locality.

Displacement to issuer's organization. The displacement from the beginning of the entry to the field that indicates the issuer's organization.

Displacement to issuer's organizational unit. The displacement from the beginning of the entry to the field that indicates the issuer's organizational unit.

Displacement to issuer's postal code. The displacement from the beginning of the entry to the field that indicates the issuer's postal code.

Displacement to issuer's state or province. The displacement from the beginning of the entry to the field that indicates the issuer's state or province.

Displacement to LDAP server name. The displacement from the beginning of the entry to the field that indicates the LDAP server name.

Displacement to next certificate entry. The displacement from the beginning of this entry to the next entry.

Displacement to next cryptographic device. The displacement from the beginning of the current cryptographic device entry to the next entry.

Displacement to private key label. The displacement from the beginning of the entry to the field that indicates the private key label.

Displacement to serial number. The displacement from the beginning of the entry to the field that indicates the serial number.

Displacement to subject's common name. The displacement from the beginning of the entry to the field that indicates the subject's common name.

Displacement to subject's country or region. The displacement from the beginning of the entry to the field that indicates the subject's country or region.

Displacement to subject's locality. The displacement from the beginning of the entry to the field that indicates the subject's locality.

Displacement to subject's organization. The displacement from the beginning of the entry to the field that indicates the subject's organization.

Displacement to subject's organizational unit. The displacement from the beginning of the entry to the field that indicates the subject's organizational unit.

Displacement to subject's postal code. The displacement from the beginning of the entry to the field that indicates the subject's postal code.

Displacement to subject's state or province. The displacement from the beginning of the entry to the field that indicates the subject's state or province.

Key size. The size of the key in bytes.

Key storage location A single character that indicates where the key is stored.

Possible values:

Key usage extensions The key usage extension values for the certificate. If the certificate has the key usage extension, the field is 1. If not, the field is 0.

This field contains the following fields:

Length of certificate label. The length of the field that contains the certificate label.

Length of CRL location. The length of the field that indicates the CRL location.

Length of cryptographic device name. The length of the field that indicates the cryptographic device name.

Length of domain name. The length of the field that indicates the domain name.

Length of email address. The length of the field that indicates the email address.

Length of IP address. The length of the field that indicates the IP address.

Length of issuer's common name. The length of the field that indicates the issuer's common name.

Length of issuer's country or region. The length of the field that indicates the issuer's country or region.

Length of issuer's locality. The length of the field that indicates the issuer's locality.

Length of issuer's organization. The length of the field that indicates the issuer's organization.

Length of issuer's organizational unit. The length of the field that indicates the issuer's organizational unit.

Length of issuer's postal code. The length of the field that indicates the issuer's postal code.

Length of issuer's state or province. The length of the field that indicates the issuer's state or province.

Length of LDAP server name. The length of the field that indicates the LDAP server name.

Length of private key label. The length of the field that indicates the private key label. Will be 0 if the key storage location is 0.

Length of serial number. The length of the field that indicates the serial number.

Length of subject's common name. The length of the field that indicates the subject's common name.

Length of subject's country or region. The length of the field that indicates the subject's country or region.

Length of subject's locality. The length of the field that indicates the subject's locality.

Length of subject's organization. The length of the field that indicates the subject's organization.

Length of subject's organizational unit. The length of the field that indicates the subject's organizational unit.

Length of subject's postal code. The length of the field that indicates the subject's postal code.

Length of subject's state or province. The length of the field that indicates the subject's state or province.

Number of certificate entries returned. The number of certificate entries returned. If the receiver variable is not large enough to hold all of the information, this number contains only the number of certificate entries actually returned.

Number of cryptographic devices. The number of cryptographic devices returned.

Offset to first certificate entry. The offset to the first certificate entry returned. The offset is from the beginning of the structure. If no entries are returned, the offset is set to zero.

Private key indicator One character indicator that indicates if the certificate has a private key.

Possible values:

Trusted status One character indicator that indicates if the certificate is trusted.

Possible values:

Reserved. An ignored field.

Validity period start. The field that indicates the beginning date of the validity period. The first 8 characters consist of 4 characters for the year, 2 characters for the month, and 2 characters for the day. The last 6 characters consist of 2 characters for the hours, 2 characters for the minutes, and 2 characters for the seconds.

Validity period end. The field that indicates the ending date of the validity period. The first 8 characters consist of 4 characters for the year, 2 characters for the month, and 2 characters for the day. The last 6 characters consist of 2 characters for the hours, 2 characters for the minutes, and 2 characters for the seconds.

Selection Control

The criteria is used to select or match certificates based on specified information.

This parameter is useful to reduce the total number of certificates that are returned in the list. The list of certificates is generated with only the specific selections that are of interest.

The following shows the format of the selection control parameter. For detailed descriptions of the fields in the table, see Selection Control Field Descriptions.



Selection Control Field Descriptions

Length of selection control. The total number of bytes for the length itself, the bytes for the number of selection pairs, and the bytes for the array of displacements. It also includes the sum of the lengths of the selection pairs. The length of the selection control will vary due to the array of displacements and the selection pairs. A length of zero indicates that no selection control pairs are specified.

Number of selection pairs. The number of separate selection pairs in the generated list of certificates. All of the selection pairs must be satisfied for each certificate that is returned. If the number of selection pairs is 0, then all certificates are returned. The maximum allowed number of selection pairs is defined as QYCU_MAX_SEL_NAMES.

Length of selection pair. The length of the selection name and selection value fields and the bytes for the length itself. The length of the selection pair will vary due to the selection value. Valid values that are used are 24 bytes or larger.

Offsets to selection pairs. An array of offsets to selection pairs from the beginning of the selection control.

Selection name. The selection that is used to limit which certificates are returned. Selections indicate which fields of the certificate are to be examined for matching selection values. Selection names cannot be specified more than once.

Valid selection names are:


Error Messages




API introduced: V6R1

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