Start of changeGet Default Key Item (QYKMGDKI, QykmGetDefaultKeyItem)


  Required Parameter Group:

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(*)

  Service Program Name: QYKMSYNC

  Default Public Authority: *USE

  Threadsafe: No

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.

Authorities and Locks

Authority Required

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.

Locks
Object will be locked shared read.

Required Parameter Group

Certificate store path and file name
INPUT; Char(*)

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.

Length of certificate store path and file name
INPUT; Binary(4)

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.

Format of certificate store path and file name
INPUT; CHAR(8)

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.

Default certificate label
INPUT; CHAR(*)

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.

Length of the default certificate label provided
INPUT; Binary(4)

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.

Length of the default certificate label returned
OUTPUT; Binary(4)

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).

Error code
OUTPUT; CHAR(*)

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


Error Messages

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.

End of change

API introduced: V5R4
Top | Security APIs | APIs by category