/*
Parses a KRB_AP_REQ message, returning its contents.
- server specifies the expected server's name for the ticket.
+ server specifies the expected server's name for the ticket; if NULL, then
+ any server will be accepted if the key can be found, and the caller should
+ verify that the principal is something it trusts.
sender_addr specifies the address(es) expected to be present in the
ticket.
krb5_timestamp currenttime;
- if (!krb5_principal_compare(server, req->ticket->server))
+ if ((server != NULL) &&
+ (!krb5_principal_compare(server, req->ticket->server))
return KRB5KRB_AP_WRONG_PRINC;
/* if (req->ap_options & AP_OPTS_USE_SESSION_KEY)