Retrieve Certificate Usage Information (QYCDRCUI, QycdRetrieveCertUsageInfo) API



  Required Parameter Group:


 Service Program:  QICSS/QYCDCUSG

 Default Public Authority:  *USE

 Threadsafe:  Yes

The Retrieve Certificate Usage Information (QYCDRCUI, QycdRetrieveCertUsageInfo) API retrieves information about one or more registered applications that use certificates and their associated certificate information.

Authorities and Locks

Exit Registration
Object locked shared no update.

QUSRSYS/QYCDCERTI *USRIDX
Object locked shared no update.

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the certificate information for the requested applications.

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 may not be predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The format of the certificate information to be returned.

You must use one of the following format names:


Application selection criteria
INPUT; CHAR(*)

The selection criteria to be used when selecting which registered applications are returned. No coded character set ID (CCSID) normalization is performed. It is recommended that you use characters from the invariant character set for the comparison data.

The information must be in the following format:


Error code
I/O; 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.

RCUI0100 Format

The following information is returned for the RCUI0100 format. This format provides information on an application that uses certificates. For a detailed description of each field, see "Field Descriptions".



RCUI0200 Format

The following information is returned for the RCUI0200 format. This format provides information on an application that uses certificates, plus information about the certificate assigned to the application. For a detailed description of each field, see "Field Descriptions".




RCUI0300 Format

The following information is returned for the RCUI0300 format. This format provides information on an application, plus information about the certificate assigned to the application and information about the list of CA certificates that the application can trust. For a detailed description of each field, see "Field Descriptions".




RCUI0350 Format

The following information is returned for the RCUI0350 format. This format provides information on an application, plus information about the certificate assigned to the application and the distinguished name (DN) of the CA certificates that the applications can trust. For a detailed description of each field, see "Field Descriptions".




RCUI0400 Format

The following information is returned for the RCUI0400 format. This format provides information on an application including System TLS information, plus information about the certificate assigned to the application and the distinguished name (DN) of the CA certificates that the applications can trust. For a detailed description of each field, see "Field Descriptions".




Receiver Field Descriptions

Application description indicator. Whether the application description is contained in a message file or text.

The possible values follow:

Application description message file name. The name of the message file that contains the application description. This field will contain blanks when a text description is provided for the application description.

Application description message file library name. The name of the library in which the application description message file resides. This field will contain blanks when a text description is provided for the application description.

Application description message ID. The message identifier for the application description. This field will contain blanks when a text description is provided for the application description.

Application description message text. The first level text for the application description message ID. This value is converted to the CCSID of the job. This field will contain blanks when a text description is provided for the application description.

When the message text is retrieved from the message file, the message file library is added to the product portion of the library list, and *LIBL is specified for the library name. If the library cannot be added to the product portion of the library list, then *LIBL is still used to search for the message. If the message is not found, then the message file library is searched for the message.

Application ID. The ID of the application.

Application text description. The text for the application description. This field will contain blanks when a message file and message identifier are provided for the application description.

Application type. The type of application.

The possible values follow:

Application user profile. The name of the user profile associated with the application. This field will contain blanks if there is no user profile associated with the application.

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.

CCSID of certificate ID. The CCSID that the certificate ID is returned in. The ID should be returned in the CCSID of the job. If a CCSID conversion error occurs, the ID will be returned in UCS-2 (unicode) CCSID.

CCSID of certificate store. The CCSID that the certificate store is returned in. The path name should be returned in the CCSID of the job. If a CCSID conversion error occurs, the path name will be returned in UCS-2 (unicode) CCSID.

Certificate assigned indicator. Whether a certificate is assigned to the application.

The possible values follow:

Certificate ID. If Certificate ID type is 1 this field contains a certificate label. It is a NULL terminated string. If Certificate ID type is 2 this field contains a list of up to four certificate labels. Each certificate label is preceded by the 2 byte length of that label. The length does not include the length bytes. The CCSID of certificate ID field indicates in what CCSID the ID is returned. The certificate ID is a NULL terminated string.

Certificate ID converted indicator. The indicator as to whether or not a CCSID conversion error occurred for the certificate ID.

The possible values follow:

Certificate ID type. The type of the certificate ID.

The possible value follows:

Certificate store. The path name where the certificate is stored. The CCSID of certificate store field indicates what CCSID the path name is returned in. The certificate store is a NULL terminated string.

The following special values may be returned:

Certificate store converted indicator. The indicator as to whether or not a CCSID conversion error occurred for the certificate store.

The possible values follow:

Client authentication required. Client authentication required indicator.

The possible values follow:

Displacement to certificate ID. The displacement in the entry to the start of the certificate ID.

Displacement to certificate store. The displacement in the entry to the start of the certificate store.

Displacement to first trusted CA certificate entry. The displacement in the entry to the first trusted CA certificate entry.

Displacement to list of trusted CA certificate DNs. The displacement in the entry to the list of trusted CA certificate distinguished names (DNs).

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

Exit program library name. The name of the library in which the exit program resides.

Exit program name. The name of the exit program associated with the application.

Extended renegotiation critical mode. The current value for the extended renegotiation critical mode indicator.
Start of changeNote: This field has meaning for TLSv1.2 and prior protocols, it does not apply to TLSv1.3 and newer protocols. End of change
The possible values follow:

Length of application entry. The length of an application entry that is returned. This value should be used in determining the displacement to the next application entry.

Length of certificate ID. The length of the certificate ID. The length does not include the NULL terminator.

Length of certificate store. The length of the certificate store. The length does not include the NULL terminator.

Length of list of trusted CA certificate DNs. The length of the list of trusted CA certificate distinguished names (DNs).

Limit CA certificates trusted indicator. Whether the application wants the system to manage the list of CA certificates the application trusts.

The possible values follow:

List of trusted CA certificate DNs. The list of distinguished names (DNs) that identify the trusted CA certificates for the application. A DN is the X.509 distinguished name of the subject of the certificate (ASN.1 DER encoding). The list is a contiguous list of DNs. The list of DNs can be parsed using the information within each DN.

The format of a DN is:

Multithreaded job action. The action to take when calling an exit program in a multithreaded job.

The possible values follow:

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

Number of certificates. The number of certificate labels returned in Certificate ID. If Certificate ID type is 1 the number of certificates will be 1. If Certificate ID type is 2 the number of certificates will be 2, 3, or 4.

Number of trusted CA certificate DNs. The number of trusted CA certificate DNs in the list of trusted CA certificates DNs. If the application is managing the CA certificates that it trusts, or the system is managing the CA certificates that the application trusts and there are no trusted CA certificates, then this value will be 0.

Number of trusted CA certificate entries. The number of trusted CA certificate entries. If the application is managing the CA certificates that it trusts, or the system is managing the CA certificates that the application trusts and there are no trusted CA certificates, then this value will be 0.

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

Online Certificate Status Protocol (OCSP) URL. The URL of the OCSP responder to query during certificate validation. This value will be padded with hexadecimal zeros. The possible values follow:

Perform CRL processing. Perform Certificate Revocation List (CRL) processing indicator.

The possible values follow:

Perform Online Certificate Status Protocol (OCSP) checking. The current value for the perform OCSP checking indicator. The possible values follow:

QMLTTHDACN system value usage. A flag that indicates whether the QMLTTHDACN system value was used in determining the multithreaded job action.

The possible values follow:

Reserved. An ignored field.

Server Name Indication (SNI). Server name indication value. This value will be padded with hexadecimal zeros.

Special indicators. Text field containing special indicators. This value will be padded with hexadecimal zeros.

Threadsafe. The thread safety status of the exit program entry.

The possible values follow:

Transport Layer Security (TLS) cipher specifications list. The list of cipher suites that are supported by this application. Unused array elements will contain hexadecimal zeros. The possible values follow:

Transport Layer Security (TLS) protocols. The TLS protocol versions supported by this application. Unused array elements will contain hexadecimal zeros. The possible values follow:

Start of changeTransport Layer Security (TLS) session cache time to live. The length of time in seconds previously established TLS handshake session attributes remain valid for use in establishing a new secure connection. The possible values follow:

Transport Layer Security (TLS) signature algorithms for certificate. The TLS signature algorithms for a certificate supported by this application. This list only has meaning when the TLS version 1.2 or newer protocol is negotiated. Unused array elements will contain hexadecimal zeros. The possible values follow:

Start of changeTransport Layer Security (TLS) signature algorithms for key exchange. The TLS signature algorithms for key exchange supported by this application. This list only has meaning when the TLS version 1.2 or newer protocol is negotiated. Unused array elements will contain hexadecimal zeros. The possible values follow:

Trusted CA certificate entries. The entries for each of the trusted CA certificates. Refer to "Trusted CA Certificate Entry" for the format of an entry.

Trusted CA Certificate Entry

The following table shows the layout of the trusted CA certificate entry. For a detailed description of each field, see "Field Descriptions".



Field Descriptions

CCSID of trusted CA certificate ID. The CCSID that the trusted CA certificate ID is returned in. The ID should be returned in the CCSID of the job. If a CCSID conversion error occurs, the ID will be returned in UCS-2 (unicode) CCSID.

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

Displacement to trusted CA certificate ID. The displacement in the entry to the start of the trusted CA certificate ID.

Length of trusted CA certificate ID. The length of the trusted CA certificate ID. The length does not include the NULL terminator.

Reserved. An ignored field.

Trusted CA certificate ID. The ID for the trusted CA certificate. The CCSID of trusted CA certificate ID field indicates what CCSID the ID is returned in. The trusted CA certificate ID is a NULL terminated string.

Trusted CA certificate ID converted indicator. The indicator as to whether or not a CCSID conversion error occurred for the trusted CA certificate ID.

The possible values follow:

Trusted CA certificate ID type. The type of the trusted CA certificate ID.

The possible value follows:

Format for Application Selection Criteria

This table shows the format for the application selection criteria parameter. For a detailed description of each field, see "Field Descriptions".



Field Descriptions

Application control key. The application control to be compared. Refer to "Application Control Keys" for more information.

Comparison data. The data to compare to the application information.

Comparison operator. The comparison value to be used when comparing the application information with the comparison data.

The following value can be specified:

Length of comparison data. The length of the data to compare to the application information. The length of the comparison data must be valid for the application control key that is specified.

Size of criteria entry. The size of the selection criteria entry, including this field.

Application Control Keys

The following table shows the valid application control keys for the key field area of the selection control record. For a detailed description of each field, see "Field Descriptions".



Field Descriptions

Application ID. The name of the applications to select.

The following can be specified for the application ID.

Application type. The type of applications to select.

The following can be specified for the application type.



Error Messages



API introduced: IBM® i 7.4