krb5_kt_read_service_key()--Get Service Key from Key Table


  Syntax
 #include <krb5.h>

 krb5_error_code krb5_kt_read_service_key(  
     krb5_context       context,
     krb5_pointer     keytab_name,   
     krb5_principal     principal,
     krb5_kvno        vno,
     krb5_enctype     enctype,
     krb5_keyblock **     key); 
  Service Program Name: QSYS/QKRBGSS

  Default Public Authority: *USE

  Threadsafe: Yes

The krb5_kt_read_service_key() function returns the service key from the key table.


Authorities

Object Referred to Data Authority Required
All directories in path *X
Keytab file *R


Parameters

context  (Input)
The Kerberos context.

keytab_name  (Input)
The key table name. If a NULL address is specified, the default key table is used.

principal  (Input)
The service principal.

vno  (Input)
The key version number for the key to be retrieved. Specify a version number of zero to retrieve the key with the highest version number.

enctype  (Input)
The key encryption type. Specify an encryption type of zero if the encryption type does not matter.

key  (Output)
The retrieved key. The krb5_free_keyblock() routine should be called to release the key when it is no longer needed.

Return Value

If no errors occur, the return value is 0. Otherwise, a Kerberos error code is returned.


Error Messages

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.



API introduced: V5R1

[ Back to top | Security APIs | UNIX-Type APIs | APIs by category ]