HP Open Source Security for OpenVMS Volume 3: Kerberos > Chapter 6 KRB5 (Kerberos V5) Application Programming Interface

krb5_kt_get_entry — Retrieve an entry from the key table

  Table of Contents



C Prototype

krb5_error_code krb5_kt_get_entry(
krb5_context context,
krb5_keytab id,
krb5_principal principal,
krb5_kvno vno,
krb5_keytype keytype,
krb5_keytab_entry *entry );


context (input/output) 

The context structure.

id (input/output)  

A key table handle.

principal (input) 

A principal name.

vno (input) 

Key version number. If vno is zero, the first entry whose principal matches is returned.

keytype (input) 

The key encryption type. Use a keytype of zero if an encryption type does not matter.

entry (output) 

The returned key table entry.


This routine searches the keytab identified by id for an entry whose principal matches principal, whose keytype matches keytype, and whose key version number matches vno. It returns an error code if no suitable entry is found. If an entry is found, the entry is returned in *entry; its contents should be deallocated by calling krb5_kt_free_entry when no longer needed.

Return Values

This routine returns the following KRB5 status code:


Successful completion.