Register Application for Certificate Use (QSYRGAP, QsyRegisterAppForCertUse) API


  Required Parameter Group for QSYRGAP:


  Default Public Authority: *EXCLUDE

  Threadsafe: Yes



  Syntax for QsyRegisterAppForCertUse:
 #include <qsyrgap1.h>

 void QsyRegisterAppForCertUse
        (char                *Application_ID,
         int                 *Length_of_application_ID,
         Qsy_App_Controls_T  *Application_controls,
         void                *Error_code);

  Service Program: QSYRGAP1

  Default Public Authority: *EXCLUDE

  Threadsafe: Yes

The Register Application For Certificate Use (OPM, QSYRGAP; ILE, QsyRegisterAppForCertUse) API registers an application with the registration facility. The application controls provide additional information needed to define the application.

You can update an application entry by reregistering the application (using the replace control key) with new values for the application control keys.

The application type control key is set the first time the application is registered and cannot be changed.

When an application is registered, the registration information is stored using the Registration Facility.


Authorities and Locks

API Public Authority
*EXCLUDE

Registration Lock
*EXCL

Required Parameter Group

Application ID
INPUT; CHAR(*)

The application ID to register. IBM-supplied IBM i applications are named QIBM_ccc_name, where ccc is the component identifier. User-supplied application IDs should not preface their application ID with QIBM. User-supplied application IDs should start with the company name to eliminate most problems that involve unique names. Application IDs should use an underscore (_) to separate parts of the name (for example, QIBM_I5OS_HOSTSERVER). Also, IDs for related applications should start with the same name (for example, QIBM_DIRSRV_SERVER and QIBM_DIRSRV_REPLICATION).

The first character of the application ID must be one of the following:

The remaining characters in the application ID must be made up of the following characters:


Length of application ID
INPUT; BINARY(4)

The length of the specified application ID. The length must be a value from 1 to 100. If the application type is 4 (object signing application), then the length must be a value from 1 to 30.

Application controls
INPUT; CHAR(*)

The application control fields for defining the application. Any field not specified will be given the default value. 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.


Format for Variable Length Record

The following table shows the layout of the variable length record. For a detailed description of each field, see Field Descriptions.


If the length of the data is longer than the key field's data length, the data is truncated at the right. No message is issued.

If the length of the data is shorter than the key field's data length and the key contains binary data, an error message is issued. If the key does not contain binary data, the field is padded with blanks.

It is not an error to specify a key more than once. If duplicate keys are specified, the last specified value for that key is used.

Each variable length record must be 4-byte aligned. If not, unpredictable results may occur.

Refer to Application Control Keys for more information about the valid values for these fields.


Field Descriptions

Application control key. The application control to be set. Refer to the "Key" column in the Application Control Keys table for the list of valid control keys.

Data. The value to which a specific application control is to be set.

Length of data. The length of the application control value.

Length of variable length record. The length of the record, including this field.


Application Control Keys

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



Field Descriptions

Application description. The text for the application description. When this key is specified, the qualified message file name and message identifier for application description key must not be specified. The default value is blanks.

Application type. The type of application. This control is set when the application is registered and cannot be changed. The default value is 1. Valid values for this key are:

Application user profile. The user profile associated with the application. This is the user profile under which the application runs. If a user profile name is specified, then the specified user profile is given access to the QIBM_QSY_SYSTEM_CERT_STORE function (see Register Function (QSYRGFN, QsyRegisterFunction) API). This function gives the specified user profile access to the *SYSTEM certificate store without having to be authorized to the actual object, but only when using the certificate associated with the application to establish a secure session. The default value is *NONE. The following special value may be specified:

Client authentication required. Whether client authentication is required. Start of changeThe value of this field augments the existing client authentication support configured internally in the program. End of changeThe default value is 0.

Client authentication supported. Start of changeThis field has been deprecated. Its value has no meaning to the application.End of change

Start of changeExtended renegotiation critical mode. RFC 5746 renegotiation indication requirement level. The default value is 0. Valid values for this key are:

Limit CA certificates trusted. Whether the application trusts all of the CA certificates that are trusted in the *SYSTEM certificate store or a subset of the CA certificates. A client application uses the list of trusted CA certificates to validate the peer certificate that is sent to the application. A server application that supports client authentication uses the list of trusted CA certificates to validate the certificate that is sent from the client. The default value is 1.

Multithreaded job action. The action to take in a multithreaded job. This key has no direct relationship with the threadsafe key; however, the value for the threadsafe key can be used to determine the multithreaded job action. The default value is 0. Valid values for this key are:

If you do use the threadsafe value to determine the value for the multithreaded job action, consider the following recommendations:

  1. If the threadsafe value is 0, the multithreaded job action should be set to 3.

  2. If the threadsafe value is 1, the multithreaded job action should be set to 0.

  3. If the threadsafe value is 2, the multithreaded job action should be set to 1.

Start of changeOnline Certificate Status Protocol (OCSP) URL. The URL of the Online Certificate Status Protocol (OCSP) responder to query during certificate validation. This attribute has precedence over Authority Information Access (AIA) OCSP.

See description of Perform Online Certificate Status Protocol (OCSP) checking to see how this field interoperates with that field.

The url-value is case insensitive and cannot contain imbedded blanks. The default value is *PGM. The length specified for the length of data can be from 4 to 128 bytes. Valid values for this key are:

Perform certificate revocation processing. Whether certificate revocation processing is performed when the certificate associated with the application is validated. The default value is 0.

Start of changePerform Online Certificate Status Protocol (OCSP) checking. Perform OCSP certificate revocation checking using Authority Information Access (AIA) certificate extension information. If the certificate being validated has an AIA extension, the first OCSP responder identified in the AIA extension will be queried for revocation status. The default value is 0.

There are two ways to enable OCSP that can be used either separately or together:

When both attributes are set the Perform Online Certificate Status Protocol (OCSP) checking functionality will only be used if OCSP URL functionality results in an undetermined revocation status. The definition of undetermined revocation status is located in the Secure Sockets Layer topic.

Note: Using OCSP results in a performance impact to System SSL.

Valid values for this key are:

Qualified exit program name. The exit program name and library for the application. The first 10 characters contain the exit program name; the next 10 characters contain the library name in which the exit program resides. The exit program does not need to exist at registration time. A specific library name must be specified. The special values *LIBL and *CURLIB are not supported. The default value is program QSY_NOPGM in library QSY_NOLIB.

This exit program is called when a certificate is assigned to the application, an assigned certificate is changed, or an assigned certificate is removed. It is called when a Certificate Authority (CA) certificate is added to or removed from the list of trusted CA certificates for the application. It also is called when an attempt is made to deregister the application. The exit program can determine whether or not the application can be deregistered. This exit program also is called when the information for a registered application is updated. See Digital Certificate Management Exit Programs for detailed information about the information that is passed to the exit program for each of the possible calls to the program.If the exit program is the default value, then it will not be called.

Qualified message file name and message identifier for application description. A message file and message identifier that contains the application description. When this key is specified, the application description key must not be specified. The message file and message identifier do not have to exist at the time of registration. The default value is blanks. See Qualified Message File Format for the format of this field.

Replace. Whether to replace an existing registered application. The default value is 0.

Start of changeSecure sockets layer (SSL) cipher specifications list. The list of cipher suites that are supported by this application. Multiple values may be specified with a maximum of 64 values. The order of use is determined by the order of specification within the array. The first value in the array is the first cipher specification used, the second value in the array is the second cipher specification used, etc. The length specified for the length of data should include only the elements in the array containing data. If '3C2F35' is specified for the data, the length of data should be 6. Cipher suites that are specified in the array but not enabled by the QSSLCSL system value are ignored when at least one cipher suite specified in the array is enabled in QSSLCSL.

Use extreme caution when considering specifying a list. A change from the default could weaken security due to positioning a relatively weak encryption algorithm before a relatively strong encryption algorithm. The flexibility of the user defined list allows for a weaker security configuration than may be possible with the default value.

The default value is 00. Valid values for this key are:

Start of changeSecure sockets layer (SSL) protocols. The SSL protocol versions supported by this application. Multiple values may be specified with a maximum of 10 values. The length specified for the length of data should include only the elements in the array containing data. If '234' is specified for the data, the length of data should be 3. The default value is 0. Valid values for this key are:

Start of changeSecure sockets layer (SSL) signature algorithms. The SSL signature algorithms supported by this application. This list only has meaning when the TLS version 1.2 protocol is negotiated. Multiple values may be specified with a maximum of 32 values. The order of use is determined by the order of specification within the array. The first value in the array is the first signature algorithm used, the second value in the array is the second signature algorithm used, etc. The length specified for the length of data should include only the elements in the array containing data. If '234' is specified for the data, the length of data should be 3. The default value is 0. Valid values for this key are:

Start of changeServer Name Indication (SNI). A fully qualified domain name (FQDN) to be set for the server. If the client TLS SNI request is not matched, the server session will use the configured certificate with no SNI acknowledgement. Robust use of SNI support requires using the GSKit APIs. The SNI is case insensitive and cannot contain imbedded blanks. The default value is hexadecimal zeros. The length specified for the length of data can be from 0 to 128. Specify a length of 0 to remove an existing SNI value.End of change

Start of changeSpecial indicators. Text field containing special indicators. Do not use this field unless instructed by IBM. The default value is hexadecimal zeros. The length specified for the length of data can be from 0 to 16. Specify a length of 0 to remove an existing special indicators value.End of change

Threadsafe. Whether the exit program entry is threadsafe. This key has no direct relationship with the multithreaded job action key. It is intended for documentation purposes only. The default value is 1. Valid values for this key are:



Qualified Message File Format

The following table shows the layout of the qualified message file name and message identifier for the application description field. For a detailed description of each field, see Field Descriptions.



Field Descriptions

Message file library name. The library name in which the message file resides. The special value *CURLIB is not supported. The possible values are:

Message file name. The name of the message file that contains the application description.

Message identifier. The message identifier for the application description.


Error Messages



API introduced: V4R4

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