skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 3:... HP Open Source Security for OpenVMS Volume 3:...
go to beginning of chapter: KRB5 (Kerberos V5) Application Programming Interface KRB5 (Kerberos V5) Application Programming Interface
go to previous page: krb5_kt_next_entry  Retrieve the next entry from the key table krb5_kt_next_entry Retrieve the next entry from the key table
go to next page: krb5_kt_remove_entry  Remove an entry from a key tablekrb5_kt_remove_entry Remove an entry from a key table
end of book navigation links

krb5_kt_read_service_key -- Retrieve a service key from the key table 



C Prototype 

krb5_error_code krb5_kt_read_service_key( \funcinout
         krb5_context     context,
         krb5_pointer     keyprocarg,
         krb5_principal   principal,
         krb5_kvno        vno,
         krb5_keytype     keytype,
         krb5_keyblock    **key );

Arguments 

context
(input/output)
 The context structure.
keyprocarg (input)  The name of a keytab, or NULL to use the default keytab.
principal (input)  The service principal.
vno (input)  Key version number. Use a vno of zero to specify the key with the highest version number.
keytype (input) The key encryption type. Use a keytype of zero if an encryption type does not matter.
key (output)  The returned service key.

Description 

The routine opens and searches keytab for the entry identified by principal, keytype, and vno, returning the resulting key in *key or returning an error code if it is not found. If keyprocarg is not NULL, it is taken to be a char* denoting the name of a keytab. Otherwise, the default keytab will be used.

krb5_free_keyblock should be called on *key when the caller is finished with the key.

Return Values 

This routine returns the following KRB5 status code:

0
Successful completion.


go to previous page: krb5_kt_next_entry  Retrieve the next entry from the key table krb5_kt_next_entry Retrieve the next entry from the key table
go to next page: krb5_kt_remove_entry  Remove an entry from a key tablekrb5_kt_remove_entry Remove an entry from a key table