* encrypt the enc_part of krb5_cred
*/
static krb5_error_code
-encrypt_credencpart(krb5_context context, krb5_cred_enc_part *pcredpart, krb5_keyblock *pkeyblock, krb5_enc_data *pencdata)
+encrypt_credencpart(krb5_context context, krb5_cred_enc_part *pcredpart,
+ krb5_keyblock *pkeyblock, krb5_enc_data *pencdata)
{
krb5_error_code retval;
krb5_data * scratch;
/*----------------------- krb5_mk_ncred_basic -----------------------*/
static krb5_error_code
-krb5_mk_ncred_basic(krb5_context context, krb5_creds **ppcreds, krb5_int32 nppcreds, krb5_keyblock *keyblock, krb5_replay_data *replaydata, krb5_address *local_addr, krb5_address *remote_addr, krb5_cred *pcred)
+krb5_mk_ncred_basic(krb5_context context,
+ krb5_creds **ppcreds, krb5_int32 nppcreds,
+ krb5_keyblock *keyblock, krb5_replay_data *replaydata,
+ krb5_address *local_addr, krb5_address *remote_addr,
+ krb5_cred *pcred)
{
krb5_cred_enc_part credenc;
krb5_error_code retval;
* outputs an encoded KRB_CRED message suitable for krb5_rd_cred
*/
krb5_error_code KRB5_CALLCONV
-krb5_mk_ncred(krb5_context context, krb5_auth_context auth_context, krb5_creds **ppcreds, krb5_data **ppdata, krb5_replay_data *outdata)
+krb5_mk_ncred(krb5_context context, krb5_auth_context auth_context,
+ krb5_creds **ppcreds, krb5_data **ppdata,
+ krb5_replay_data *outdata)
{
krb5_address * premote_fulladdr = NULL;
krb5_address * plocal_fulladdr = NULL;
* A convenience function that calls krb5_mk_ncred.
*/
krb5_error_code KRB5_CALLCONV
-krb5_mk_1cred(krb5_context context, krb5_auth_context auth_context, krb5_creds *pcreds, krb5_data **ppdata, krb5_replay_data *outdata)
+krb5_mk_1cred(krb5_context context, krb5_auth_context auth_context,
+ krb5_creds *pcreds, krb5_data **ppdata,
+ krb5_replay_data *outdata)
{
krb5_error_code retval;
krb5_creds **ppcreds;
returns system errors
*/
krb5_error_code KRB5_CALLCONV
-krb5_mk_error(krb5_context context, const krb5_error *dec_err, krb5_data *enc_err)
+krb5_mk_error(krb5_context context, const krb5_error *dec_err,
+ krb5_data *enc_err)
{
krb5_error_code retval;
krb5_data *new_enc_err;
#include "auth_con.h"
static krb5_error_code
-krb5_mk_priv_basic(krb5_context context, const krb5_data *userdata, const krb5_keyblock *keyblock, krb5_replay_data *replaydata, krb5_address *local_addr, krb5_address *remote_addr, krb5_pointer i_vector, krb5_data *outbuf)
+krb5_mk_priv_basic(krb5_context context, const krb5_data *userdata,
+ const krb5_keyblock *keyblock, krb5_replay_data *replaydata,
+ krb5_address *local_addr, krb5_address *remote_addr,
+ krb5_pointer i_vector, krb5_data *outbuf)
{
krb5_error_code retval;
krb5_priv privmsg;
*/
krb5_error_code KRB5_CALLCONV
-krb5_mk_rep(krb5_context context, krb5_auth_context auth_context, krb5_data *outbuf)
+krb5_mk_rep(krb5_context context, krb5_auth_context auth_context,
+ krb5_data *outbuf)
{
krb5_error_code retval;
krb5_ap_rep_enc_part repl;
}
static krb5_error_code
-krb5_generate_authenticator(krb5_context context, krb5_authenticator *authent, krb5_principal client, krb5_checksum *cksum, krb5_keyblock *key, krb5_ui_4 seq_number, krb5_authdata **authorization)
+krb5_generate_authenticator(krb5_context context, krb5_authenticator *authent,
+ krb5_principal client, krb5_checksum *cksum,
+ krb5_keyblock *key, krb5_ui_4 seq_number,
+ krb5_authdata **authorization)
{
krb5_error_code retval;
}
krb5_error_code KRB5_CALLCONV
-krb5_mk_safe(krb5_context context, krb5_auth_context auth_context, const krb5_data *userdata, krb5_data *outbuf, krb5_replay_data *outdata)
+krb5_mk_safe(krb5_context context, krb5_auth_context auth_context,
+ const krb5_data *userdata, krb5_data *outbuf,
+ krb5_replay_data *outdata)
{
krb5_error_code retval;
krb5_keyblock * keyblock;
* decrypt the enc_part of a krb5_cred
*/
static krb5_error_code
-decrypt_credencdata(krb5_context context, krb5_cred *pcred, krb5_keyblock *pkeyblock, krb5_cred_enc_part *pcredenc)
+decrypt_credencdata(krb5_context context, krb5_cred *pcred,
+ krb5_keyblock *pkeyblock, krb5_cred_enc_part *pcredenc)
{
krb5_cred_enc_part * ppart = NULL;
krb5_error_code retval;
/*----------------------- krb5_rd_cred_basic -----------------------*/
static krb5_error_code
-krb5_rd_cred_basic(krb5_context context, krb5_data *pcreddata, krb5_keyblock *pkeyblock, krb5_replay_data *replaydata, krb5_creds ***pppcreds)
+krb5_rd_cred_basic(krb5_context context, krb5_data *pcreddata,
+ krb5_keyblock *pkeyblock, krb5_replay_data *replaydata,
+ krb5_creds ***pppcreds)
{
krb5_error_code retval;
krb5_cred * pcred;
* outputs the nonce and an array of the forwarded credentials.
*/
krb5_error_code KRB5_CALLCONV
-krb5_rd_cred(krb5_context context, krb5_auth_context auth_context, krb5_data *pcreddata, krb5_creds ***pppcreds, krb5_replay_data *outdata)
+krb5_rd_cred(krb5_context context, krb5_auth_context auth_context,
+ krb5_data *pcreddata, krb5_creds ***pppcreds,
+ krb5_replay_data *outdata)
{
krb5_error_code retval;
krb5_keyblock * keyblock;
return KRB5_RC_REQUIRED;
-/* If decrypting with the first keyblock we try fails, perhaps the
- * credentials are stored in the session key so try decrypting with
- * that.
-*/
+ /*
+ * If decrypting with the first keyblock we try fails, perhaps the
+ * credentials are stored in the session key so try decrypting with
+ * that.
+ */
if ((retval = krb5_rd_cred_basic(context, pcreddata, keyblock,
&replaydata, pppcreds))) {
if ((retval = krb5_rd_cred_basic(context, pcreddata,
auth_context->keyblock,
&replaydata, pppcreds))) {
return retval;
+ }
}
- }
-
+
if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_TIME) {
krb5_donot_replay replay;
krb5_timestamp currenttime;
*/
krb5_error_code KRB5_CALLCONV
-krb5_rd_error(krb5_context context, const krb5_data *enc_errbuf, krb5_error **dec_error)
+krb5_rd_error(krb5_context context, const krb5_data *enc_errbuf,
+ krb5_error **dec_error)
{
if (!krb5_is_krb_error(enc_errbuf))
return KRB5KRB_AP_ERR_MSG_TYPE;
*/
static krb5_error_code
-krb5_rd_priv_basic(krb5_context context, const krb5_data *inbuf, const krb5_keyblock *keyblock, const krb5_address *local_addr, const krb5_address *remote_addr, krb5_pointer i_vector, krb5_replay_data *replaydata, krb5_data *outbuf)
+krb5_rd_priv_basic(krb5_context context, const krb5_data *inbuf,
+ const krb5_keyblock *keyblock,
+ const krb5_address *local_addr,
+ const krb5_address *remote_addr, krb5_pointer i_vector,
+ krb5_replay_data *replaydata, krb5_data *outbuf)
{
krb5_error_code retval;
krb5_priv * privmsg;
}
krb5_error_code KRB5_CALLCONV
-krb5_rd_priv(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_data *outbuf, krb5_replay_data *outdata)
+krb5_rd_priv(krb5_context context, krb5_auth_context auth_context,
+ const krb5_data *inbuf, krb5_data *outbuf,
+ krb5_replay_data *outdata)
{
krb5_error_code retval;
krb5_keyblock * keyblock;
*/
krb5_error_code KRB5_CALLCONV
-krb5_rd_rep(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_ap_rep_enc_part **repl)
+krb5_rd_rep(krb5_context context, krb5_auth_context auth_context,
+ const krb5_data *inbuf, krb5_ap_rep_enc_part **repl)
{
krb5_error_code retval;
krb5_ap_rep * reply;
*/
krb5_error_code KRB5_CALLCONV
-krb5_rd_req(krb5_context context, krb5_auth_context *auth_context, const krb5_data *inbuf, krb5_const_principal server, krb5_keytab keytab, krb5_flags *ap_req_options, krb5_ticket **ticket)
-
-
-
- /* XXX do we really need this */
-
-
-
+krb5_rd_req(krb5_context context, krb5_auth_context *auth_context,
+ const krb5_data *inbuf, krb5_const_principal server,
+ krb5_keytab keytab, krb5_flags *ap_req_options,
+ krb5_ticket **ticket)
{
krb5_error_code retval;
krb5_ap_req * request;
/* Get an rcache if necessary. */
if (((*auth_context)->rcache == NULL)
&& ((*auth_context)->auth_context_flags & KRB5_AUTH_CONTEXT_DO_TIME)
-&& server) {
+ && server) {
if ((retval = krb5_get_server_rcache(context,
- krb5_princ_component(context,server,0), &(*auth_context)->rcache)))
+ krb5_princ_component(context,
+ server,0),
+ &(*auth_context)->rcache)))
goto cleanup_auth_context;
}
static krb5_error_code decrypt_authenticator
(krb5_context, const krb5_ap_req *, krb5_authenticator **,
- int);
+ int);
#define in_clock_skew(date) (labs((date)-currenttime) < context->clockskew)
static krb5_error_code
-krb5_rd_req_decrypt_tkt_part(krb5_context context, const krb5_ap_req *req, krb5_keytab keytab)
+krb5_rd_req_decrypt_tkt_part(krb5_context context, const krb5_ap_req *req,
+ krb5_keytab keytab)
{
krb5_error_code retval;
krb5_enctype enctype;
returns system errors, integrity errors
*/
static krb5_error_code
-krb5_rd_safe_basic(krb5_context context, const krb5_data *inbuf, const krb5_keyblock *keyblock, const krb5_address *recv_addr, const krb5_address *sender_addr, krb5_replay_data *replaydata, krb5_data *outbuf)
+krb5_rd_safe_basic(krb5_context context, const krb5_data *inbuf,
+ const krb5_keyblock *keyblock,
+ const krb5_address *recv_addr,
+ const krb5_address *sender_addr,
+ krb5_replay_data *replaydata, krb5_data *outbuf)
{
krb5_error_code retval;
krb5_safe * message;
}
krb5_error_code KRB5_CALLCONV
-krb5_rd_safe(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_data *outbuf, krb5_replay_data *outdata)
+krb5_rd_safe(krb5_context context, krb5_auth_context auth_context,
+ const krb5_data *inbuf, krb5_data *outbuf,
+ krb5_replay_data *outdata)
{
krb5_error_code retval;
krb5_keyblock * keyblock;