int shishi_ticket_realm_get
(Shishi * handle, Shishi_asn1 ticket, char ** realm, size_t * realmlen)
handle: shishi handle as allocated by shishi_init().
ticket: input variable with ticket info.
realm: output array with newly allocated name of realm in ticket.
realmlen: size of output array.
Extract realm from ticket.
Return value: Returns SHISHI_OK iff successful.
int shishi_ticket_realm_set
(Shishi * handle, Shishi_asn1 ticket, const char * realm)
handle: shishi handle as allocated by shishi_init().
ticket: input variable with ticket info.
realm: input array with name of realm.
Set the realm field in the Ticket.
Return value: Returns SHISHI_OK iff successful.
int shishi_ticket_sname_set
(Shishi * handle, Shishi_asn1 ticket, Shishi_name_type name_type, char * [] sname)
handle: shishi handle as allocated by shishi_init().
ticket: Ticket variable to set server name field in.
name_type: type of principial, see Shishi_name_type, usually SHISHI_NT_UNKNOWN.
sname: input array with principal name.
Set the server name field in the Ticket.
Return value: Returns SHISHI_OK iff successful.
int shishi_ticket_get_enc_part_etype
(Shishi * handle, Shishi_asn1 ticket, int32_t * etype)
handle: shishi handle as allocated by shishi_init().
ticket: Ticket variable to get value from.
etype: output variable that holds the value.
Extract Ticket.enc-part.etype.
Return value: Returns SHISHI_OK iff successful.
int shishi_ticket_set_enc_part
(Shishi * handle, Shishi_asn1 ticket, int etype, int kvno, char * buf, size_t buflen)
handle: shishi handle as allocated by shishi_init().
ticket: Ticket to add enc-part field to.
etype: encryption type used to encrypt enc-part.
kvno: key version number.
buf: input array with encrypted enc-part.
buflen: size of input array with encrypted enc-part.
Set the encrypted enc-part field in the Ticket. The encrypted data is usually created by calling shishi_encrypt() on the DER encoded enc-part. To save time, you may want to use shishi_ticket_add_enc_part() instead, which calculates the encrypted data and calls this function in one step.
Return value: Returns SHISHI_OK iff successful.
int shishi_ticket_add_enc_part
(Shishi * handle, Shishi_asn1 ticket, Shishi_key * key, Shishi_asn1 encticketpart)
handle: shishi handle as allocated by shishi_init().
ticket: Ticket to add enc-part field to.
key: key used to encrypt enc-part.
encticketpart: EncTicketPart to add.
Encrypts DER encoded EncTicketPart using key and stores it in the Ticket.
Return value: Returns SHISHI_OK iff successful.