1 | Certificate store path and file name | Input | Char(*) |
2 | Length of certificate store path and file name | Input | Binary(4) |
3 | Format of certificate store path and file name | Input | Char(8) |
4 | Default certificate label | Output | Char(*) |
5 | Length of default certificate label provided | Input | Binary(4) |
6 | Length of default certificate label returned | Output | Binary(4) |
7 | Error code | I/O | Char(*) |
The Get Default Key Item API (OPM, QYKMGDKI; ILE, QykmGetDefaultKeyItem) allows a user to extract the label of the default certificate in a certificate store. If there is no assigned default certificate, no label is returned. Note: Option 34, Digital Certificate Manager, must be installed in order to use this API.
To use this API, option 34 must be installed.
For the file object:
For the directory:
Also, see the open() API for the authority needed to the certificate store.
The path name of the certificate store (kdb) you want to access. This path and file name may be absolute (i.e., entire path name) or relative to the current directory. If you are using format OBJN0100 (see below), this parameter is assumed to be represented in the coded character set identifier (CCSID) 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.
The length of the certificate store path and file 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.
The format of the certificate store path and file name parameter.
OBJN0100 | The certificate store path and file name is a simple path name. |
OBJN0200 | The certificate path and file name is an LG-type path name. |
The label of the default certificate in the certificate store. If there is no assigned default certificate, no label is returned. Also, if the length of the default certificate label provided (see next parameter) is not big enough to hold the label, the label is not returned.
The length provided for the label of the default certificate in the certificate store. This must be big enough to hold the certificate label. If not, the label is not returned, and the length of the default certificate label returned (see next parameter) will contain the minimum value that should be provided.
The actual length of the label of the default certificate in the certificate store. If this value is greater than 0 and no label is returned, then this value is the minimum value that should be provided on the length of the default certificate label provided (see previous parameter).
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
Message ID | Error Message Text |
---|---|
CPF180C E | Function &1 not allowed. |
CPFB001 E | One or more input parameters is NULL or missing. |
CPFB002 E | Certificate store does not exist. |
CPFB004 E | User not authorized to certificate store. |
CPFB006 E | An error occurred. The error code is &1. |
CPFB007 E | User not authorized to directory or file. |
CPFB008 E | The format name for the certificate store is not valid. |
CPFB00A E | Option &2 of the operating system is required to work with certificates. |
Top | Security APIs | APIs by category |