The keyring-util program leverages R_datalib callable service to perform various operations on digital certificates and RACF key rings.
Execute the build.sh
script
keyring-util function userid keyring label
Parametres:
function
see Functions section belowuserid
- an owner of thekeyring
andlabel
certificatekeyring
- a name of the keyringlabel
- a label of the certificateextra-parm-0
- specific to a used functionextra-parm-1
- specific to a used functionextra-parm-2
- specific to a used function
-
NEWRING
- creates a keyring- Example:
keyring-util NEWRING USER01 RING02
- Example:
-
DELRING
- deletes a keyring- Example:
keyring-util DELRING USER01 RING02
- Example:
-
DELCERT
- remove a certificate from a keyring or deletes a certificate from RACF databaseCurrent Limitation: The
DELCERT
function can only manipulate a certificate that is owned by theuserid
, i.e. it can't work with certificates owned by the CERTAUTH, SITE or different userid.The following example removes
CERT03
certificate owned by theUSER01
from theRING02
keyring owned by theUSER01
userid- Example:
keyring-util DELCERT USER01 RING02 CERT03
The following example removes
CERT03
certificate owned by theUSER01
from the RACF database. The command fails if the certificate is still connected to some keyring.- Example:
keyring-util DELCERT USER01 '*' CERT03
- Example:
-
EXPORT
- exports a certificate in PEM format. The file is created in apwd
directory with a name of<cert_alias>.pem
-
Example:
keyring-util EXPORT USER01 RING02 CERT03
Creates a file CERT03.pem.
-
-
IMPORT
- imports a certificate from the PKCS12 format. The certificate can be connected to a keyring asPERSONAL
orCERTAUTH
.Warning: The scenario where a private key is also imported currently works only with RACF.
- Example:
keyring-util IMPORT USER01 RING02 CERT03 PERSONAL /path/to/file.p12 pkcs12_password
- Example:
-
REFRESH
- refreshes DIGTCERT class- Example:
keyring-util REFRESH
- Example:
For any return and reason codes, check R_datalib return and reason codes
There is room for improvement:
- command line argument processing and syntax (perhaps using the argp library from ambitus project)
- an extension of functionality of the current R_datalib functions
- adding support for other R_datalib functions
Work with the following resource if you want to add support for other R_datalib functions Data areas for R_datalib callable service