| /freebsd/crypto/krb5/src/lib/krb5/krb/ |
| H A D | auth_con.c | 32 krb5_auth_con_init(krb5_context context, krb5_auth_context *auth_context) in krb5_auth_con_init() argument 34 *auth_context = in krb5_auth_con_init() 36 if (!*auth_context) in krb5_auth_con_init() 40 (*auth_context)->auth_context_flags = in krb5_auth_con_init() 43 (*auth_context)->checksum_func = NULL; in krb5_auth_con_init() 44 (*auth_context)->checksum_func_data = NULL; in krb5_auth_con_init() 45 (*auth_context)->negotiated_etype = ENCTYPE_NULL; in krb5_auth_con_init() 46 (*auth_context)->magic = KV5M_AUTH_CONTEXT; in krb5_auth_con_init() 51 krb5_auth_con_free(krb5_context context, krb5_auth_context auth_context) in krb5_auth_con_free() argument 53 if (auth_context == NULL) in krb5_auth_con_free() [all …]
|
| H A D | ser_actx.c | 40 k5_size_auth_context(krb5_auth_context auth_context, size_t *sizep) in k5_size_auth_context() argument 57 if (auth_context != NULL) { in k5_size_auth_context() 60 required = auth_context->cstate.length; in k5_size_auth_context() 64 if (!kret && auth_context->remote_addr) { in k5_size_auth_context() 65 kret = k5_size_address(auth_context->remote_addr, &required); in k5_size_auth_context() 71 if (!kret && auth_context->remote_port) { in k5_size_auth_context() 72 kret = k5_size_address(auth_context->remote_port, &required); in k5_size_auth_context() 78 if (!kret && auth_context->local_addr) { in k5_size_auth_context() 79 kret = k5_size_address(auth_context->local_addr, &required); in k5_size_auth_context() 85 if (!kret && auth_context->local_port) { in k5_size_auth_context() [all …]
|
| H A D | mk_rep.c | 68 k5_mk_rep(krb5_context context, krb5_auth_context auth_context, in k5_mk_rep() argument 78 if (((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) || in k5_mk_rep() 79 (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_RET_SEQUENCE)) && in k5_mk_rep() 80 (auth_context->local_seq_number == 0)) { in k5_mk_rep() 82 &auth_context->key->keyblock, in k5_mk_rep() 83 &auth_context->local_seq_number))) in k5_mk_rep() 90 repl.ctime = auth_context->authentp->ctime; in k5_mk_rep() 91 repl.cusec = auth_context->authentp->cusec; in k5_mk_rep() 96 else if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_USE_SUBKEY) { in k5_mk_rep() 97 assert(auth_context->negotiated_etype != ENCTYPE_NULL); in k5_mk_rep() [all …]
|
| H A D | mk_req_ext.c | 85 krb5_mk_req_extended(krb5_context context, krb5_auth_context *auth_context, in krb5_mk_req_extended() argument 120 if (*auth_context == NULL) { in krb5_mk_req_extended() 123 *auth_context = new_auth_context; in krb5_mk_req_extended() 126 if ((*auth_context)->key != NULL) { in krb5_mk_req_extended() 127 krb5_k_free_key(context, (*auth_context)->key); in krb5_mk_req_extended() 128 (*auth_context)->key = NULL; in krb5_mk_req_extended() 133 &((*auth_context)->key)))) in krb5_mk_req_extended() 137 if ((((*auth_context)->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) in krb5_mk_req_extended() 138 || ((*auth_context)->auth_context_flags & KRB5_AUTH_CONTEXT_RET_SEQUENCE)) in krb5_mk_req_extended() 139 && ((*auth_context)->local_seq_number == 0)) { in krb5_mk_req_extended() [all …]
|
| H A D | rd_req_dec.c | 473 rd_req_decoded_opt(krb5_context context, krb5_auth_context *auth_context, in rd_req_decoded_opt() argument 494 if ((*auth_context)->key) { /* User to User authentication */ in rd_req_decoded_opt() 496 &(*auth_context)->key->keyblock, in rd_req_decoded_opt() 500 decrypt_key = (*auth_context)->key->keyblock; in rd_req_decoded_opt() 501 (*auth_context)->key->keyblock.contents = NULL; in rd_req_decoded_opt() 503 krb5_k_free_key(context, (*auth_context)->key); in rd_req_decoded_opt() 504 (*auth_context)->key = NULL; in rd_req_decoded_opt() 526 &((*auth_context)->authentp), in rd_req_decoded_opt() 530 if (!krb5_principal_compare(context, (*auth_context)->authentp->client, in rd_req_decoded_opt() 536 if ((*auth_context)->remote_addr && in rd_req_decoded_opt() [all …]
|
| H A D | rd_rep.c | 69 krb5_rd_rep(krb5_context context, krb5_auth_context auth_context, in krb5_rd_rep() argument 95 retval = krb5_k_decrypt(context, auth_context->key, in krb5_rd_rep() 107 if ((enc->ctime != auth_context->authentp->ctime) in krb5_rd_rep() 108 || (enc->cusec != auth_context->authentp->cusec)) { in krb5_rd_rep() 115 retval = krb5_auth_con_setrecvsubkey(context, auth_context, in krb5_rd_rep() 119 retval = krb5_auth_con_setsendsubkey(context, auth_context, in krb5_rd_rep() 122 (void) krb5_auth_con_setrecvsubkey(context, auth_context, NULL); in krb5_rd_rep() 126 auth_context->negotiated_etype = enc->subkey->enctype; in krb5_rd_rep() 130 auth_context->remote_seq_number = enc->seq_number; in krb5_rd_rep() 148 krb5_rd_rep_dce(krb5_context context, krb5_auth_context auth_context, in krb5_rd_rep_dce() argument [all …]
|
| H A D | recvauth.c | 43 krb5_auth_context * auth_context, in recvauth_common() argument 127 if (*auth_context == NULL) { in recvauth_common() 129 *auth_context = new_auth_context; in recvauth_common() 132 krb5_auth_con_getrcache(context, *auth_context, &rcache); in recvauth_common() 136 problem = krb5_auth_con_setrcache(context, *auth_context, rcache); in recvauth_common() 140 problem = krb5_rd_req(context, auth_context, &inbuf, server, in recvauth_common() 200 if ((retval = krb5_mk_rep(context, *auth_context, &outbuf))) { in recvauth_common() 210 krb5_auth_con_free(context, *auth_context); in recvauth_common() 213 krb5_auth_con_setrcache(context, *auth_context, NULL); in recvauth_common() 220 krb5_recvauth(krb5_context context, krb5_auth_context *auth_context, krb5_pointer fd, char *appl_ve… in krb5_recvauth() argument [all …]
|
| H A D | gen_save_subkey.c | 33 krb5_auth_context auth_context, in k5_generate_and_save_subkey() argument 42 retval = krb5_auth_con_setsendsubkey(context, auth_context, kb); in k5_generate_and_save_subkey() 45 retval = krb5_auth_con_setrecvsubkey(context, auth_context, kb); in k5_generate_and_save_subkey() 51 (void) krb5_auth_con_setsendsubkey(context, auth_context, NULL); in k5_generate_and_save_subkey() 52 (void) krb5_auth_con_setrecvsubkey(context, auth_context, NULL); in k5_generate_and_save_subkey()
|
| /freebsd/crypto/heimdal/lib/krb5/ |
| H A D | auth_context.c | 38 krb5_auth_context *auth_context) in krb5_auth_con_init() argument 63 *auth_context = p; in krb5_auth_con_init() 69 krb5_auth_context auth_context) in krb5_auth_con_free() argument 71 if (auth_context != NULL) { in krb5_auth_con_free() 72 krb5_free_authenticator(context, &auth_context->authenticator); in krb5_auth_con_free() 73 if(auth_context->local_address){ in krb5_auth_con_free() 74 free_HostAddress(auth_context->local_address); in krb5_auth_con_free() 75 free(auth_context->local_address); in krb5_auth_con_free() 77 if(auth_context->remote_address){ in krb5_auth_con_free() 78 free_HostAddress(auth_context->remote_address); in krb5_auth_con_free() [all …]
|
| H A D | mk_safe.c | 38 krb5_auth_context auth_context, in krb5_mk_safe() argument 52 if ((auth_context->flags & in krb5_mk_safe() 57 if (auth_context->local_subkey) in krb5_mk_safe() 58 key = auth_context->local_subkey; in krb5_mk_safe() 59 else if (auth_context->remote_subkey) in krb5_mk_safe() 60 key = auth_context->remote_subkey; in krb5_mk_safe() 62 key = auth_context->keyblock; in krb5_mk_safe() 73 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { in krb5_mk_safe() 81 if (auth_context->flags & KRB5_AUTH_CONTEXT_RET_TIME) { in krb5_mk_safe() 86 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { in krb5_mk_safe() [all …]
|
| H A D | mk_priv.c | 38 krb5_auth_context auth_context, in krb5_mk_priv() argument 53 if ((auth_context->flags & in krb5_mk_priv() 58 if (auth_context->local_subkey) in krb5_mk_priv() 59 key = auth_context->local_subkey; in krb5_mk_priv() 60 else if (auth_context->remote_subkey) in krb5_mk_priv() 61 key = auth_context->remote_subkey; in krb5_mk_priv() 63 key = auth_context->keyblock; in krb5_mk_priv() 71 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { in krb5_mk_priv() 79 if (auth_context->flags & KRB5_AUTH_CONTEXT_RET_TIME) { in krb5_mk_priv() 84 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { in krb5_mk_priv() [all …]
|
| H A D | mk_rep.c | 38 krb5_auth_context auth_context, in krb5_mk_rep() argument 54 body.ctime = auth_context->authenticator->ctime; in krb5_mk_rep() 55 body.cusec = auth_context->authenticator->cusec; in krb5_mk_rep() 56 if (auth_context->flags & KRB5_AUTH_CONTEXT_USE_SUBKEY) { in krb5_mk_rep() 57 if (auth_context->local_subkey == NULL) { in krb5_mk_rep() 59 auth_context, in krb5_mk_rep() 60 auth_context->keyblock); in krb5_mk_rep() 66 ret = krb5_copy_keyblock(context, auth_context->local_subkey, in krb5_mk_rep() 76 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { in krb5_mk_rep() 77 if(auth_context->local_seqnumber == 0) in krb5_mk_rep() [all …]
|
| H A D | rd_priv.c | 38 krb5_auth_context auth_context, in krb5_rd_priv() argument 53 if ((auth_context->flags & in krb5_rd_priv() 82 if (auth_context->remote_subkey) in krb5_rd_priv() 83 key = auth_context->remote_subkey; in krb5_rd_priv() 84 else if (auth_context->local_subkey) in krb5_rd_priv() 85 key = auth_context->local_subkey; in krb5_rd_priv() 87 key = auth_context->keyblock; in krb5_rd_priv() 111 && auth_context->remote_address in krb5_rd_priv() 113 auth_context->remote_address, in krb5_rd_priv() 123 && auth_context->local_address in krb5_rd_priv() [all …]
|
| H A D | rd_safe.c | 38 krb5_auth_context auth_context, in verify_checksum() argument 60 if (auth_context->remote_subkey) in verify_checksum() 61 key = auth_context->remote_subkey; in verify_checksum() 62 else if (auth_context->local_subkey) in verify_checksum() 63 key = auth_context->local_subkey; in verify_checksum() 65 key = auth_context->keyblock; in verify_checksum() 85 krb5_auth_context auth_context, in krb5_rd_safe() argument 96 if ((auth_context->flags & in krb5_rd_safe() 133 && auth_context->remote_address in krb5_rd_safe() 135 auth_context->remote_address, in krb5_rd_safe() [all …]
|
| H A D | rd_cred.c | 57 krb5_auth_context auth_context, in krb5_rd_cred() argument 73 if ((auth_context->flags & in krb5_rd_cred() 111 if (auth_context->remote_subkey) { in krb5_rd_cred() 112 ret = krb5_crypto_init(context, auth_context->remote_subkey, in krb5_rd_cred() 130 if (auth_context->remote_subkey == NULL || ret == KRB5KRB_AP_ERR_BAD_INTEGRITY) in krb5_rd_cred() 133 ret = krb5_crypto_init(context, auth_context->keyblock, in krb5_rd_cred() 167 && auth_context->remote_address in krb5_rd_cred() 168 && auth_context->remote_port) { in krb5_rd_cred() 172 auth_context->remote_address, in krb5_rd_cred() 173 auth_context->remote_port); in krb5_rd_cred() [all …]
|
| H A D | mk_req.c | 38 krb5_auth_context *auth_context, in krb5_mk_req_exact() argument 62 if (auth_context && *auth_context && (*auth_context)->keytype) in krb5_mk_req_exact() 63 this_cred.session.keytype = (*auth_context)->keytype; in krb5_mk_req_exact() 71 auth_context, in krb5_mk_req_exact() 82 krb5_auth_context *auth_context, in krb5_mk_req() argument 110 ret = krb5_mk_req_exact (context, auth_context, ap_req_options, in krb5_mk_req()
|
| H A D | mk_req_ext.c | 38 krb5_auth_context *auth_context, in _krb5_mk_req_internal() argument 52 if(auth_context) { in _krb5_mk_req_internal() 53 if(*auth_context == NULL) in _krb5_mk_req_internal() 54 ret = krb5_auth_con_init(context, auth_context); in _krb5_mk_req_internal() 57 ac = *auth_context; in _krb5_mk_req_internal() 141 if(auth_context == NULL) in _krb5_mk_req_internal() 148 krb5_auth_context *auth_context, in krb5_mk_req_extended() argument 155 auth_context, in krb5_mk_req_extended()
|
| H A D | rd_rep.c | 38 krb5_auth_context auth_context, in krb5_rd_rep() argument 64 ret = krb5_crypto_init(context, auth_context->keyblock, 0, &crypto); in krb5_rd_rep() 88 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { in krb5_rd_rep() 89 if ((*repl)->ctime != auth_context->authenticator->ctime || in krb5_rd_rep() 90 (*repl)->cusec != auth_context->authenticator->cusec) in krb5_rd_rep() 100 krb5_auth_con_setremoteseqnumber(context, auth_context, in krb5_rd_rep() 103 krb5_auth_con_setremotesubkey(context, auth_context, (*repl)->subkey); in krb5_rd_rep()
|
| H A D | get_for_creds.c | 105 krb5_auth_context auth_context, in krb5_fwd_tgt_creds() argument 150 auth_context, in krb5_fwd_tgt_creds() 188 krb5_auth_context auth_context, in krb5_get_forwarded_creds() argument 287 if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { in krb5_get_forwarded_creds() 312 if (auth_context->local_address && auth_context->local_port && paddrs) { in krb5_get_forwarded_creds() 316 auth_context->local_address, in krb5_get_forwarded_creds() 317 auth_context->local_port); in krb5_get_forwarded_creds() 322 if (auth_context->remote_address) { in krb5_get_forwarded_creds() 323 if (auth_context->remote_port) { in krb5_get_forwarded_creds() 338 auth_context->remote_address, in krb5_get_forwarded_creds() [all …]
|
| H A D | rd_req.c | 172 krb5_auth_context auth_context, in find_etypelist() argument 185 ad = auth_context->authenticator->authorization_data; in find_etypelist() 316 krb5_auth_context *auth_context, in krb5_verify_ap_req() argument 325 auth_context, in krb5_verify_ap_req() 337 krb5_auth_context *auth_context, in krb5_verify_ap_req2() argument 354 if (auth_context && *auth_context) { in krb5_verify_ap_req2() 355 ac = *auth_context; in krb5_verify_ap_req2() 499 if (auth_context) { in krb5_verify_ap_req2() 500 if (*auth_context == NULL) in krb5_verify_ap_req2() 501 *auth_context = ac; in krb5_verify_ap_req2() [all …]
|
| /freebsd/crypto/heimdal/appl/kf/ |
| H A D | kf.c | 128 krb5_auth_context auth_context; in proto() local 139 status = krb5_auth_con_init (context, &auth_context); in proto() 146 auth_context, in proto() 149 krb5_auth_con_free(context, auth_context); in proto() 160 krb5_auth_con_free(context, auth_context); in proto() 166 &auth_context, in proto() 179 krb5_auth_con_free(context, auth_context); in proto() 189 status = krb5_write_priv_message(context, auth_context, &sock, &data_send); in proto() 191 krb5_auth_con_free(context, auth_context); in proto() 197 status = krb5_write_priv_message(context, auth_context, &sock, &data_send); in proto() [all …]
|
| /freebsd/crypto/heimdal/lib/gssapi/krb5/ |
| H A D | accept_sec_context.c | 111 if (ctx->auth_context->local_subkey) in _gsskrb5i_is_cfx() 112 key = ctx->auth_context->local_subkey; in _gsskrb5i_is_cfx() 114 key = ctx->auth_context->remote_subkey; in _gsskrb5i_is_cfx() 116 if (ctx->auth_context->remote_subkey) in _gsskrb5i_is_cfx() 117 key = ctx->auth_context->remote_subkey; in _gsskrb5i_is_cfx() 119 key = ctx->auth_context->local_subkey; in _gsskrb5i_is_cfx() 122 key = ctx->auth_context->keyblock; in _gsskrb5i_is_cfx() 140 if ((acceptor && ctx->auth_context->local_subkey) || in _gsskrb5i_is_cfx() 141 (!acceptor && ctx->auth_context->remote_subkey)) in _gsskrb5i_is_cfx() 185 ctx->auth_context, in gsskrb5_accept_delegated_token() [all …]
|
| /freebsd/crypto/heimdal/kpasswd/ |
| H A D | kpasswdd.c | 190 reply_priv (krb5_auth_context auth_context, in reply_priv() argument 203 auth_context, in reply_priv() 214 auth_context, in reply_priv() 234 change (krb5_auth_context auth_context, in change() argument 259 reply_priv (auth_context, s, sa, sa_size, KRB5_KPASSWD_MALFORMED, in change() 271 reply_priv (auth_context, s, sa, sa_size, KRB5_KPASSWD_MALFORMED, in change() 280 reply_priv (auth_context, s, sa, sa_size, KRB5_KPASSWD_MALFORMED, in change() 287 reply_priv (auth_context, s, sa, sa_size, in change() 305 reply_priv (auth_context, s, sa, sa_size, in change() 316 reply_priv(auth_context, s, sa, sa_size, in change() [all …]
|
| /freebsd/crypto/krb5/src/lib/gssapi/krb5/ |
| H A D | accept_sec_context.c | 163 rd_and_store_for_creds(krb5_context context, krb5_auth_context auth_context, in rd_and_store_for_creds() argument 173 if ((retval = krb5_auth_con_getflags(context, auth_context, &flags_org))) in rd_and_store_for_creds() 175 krb5_auth_con_setflags(context, auth_context, in rd_and_store_for_creds() 199 if (krb5_rd_cred(context, auth_context, inbuf, &creds, NULL)) { in rd_and_store_for_creds() 276 krb5_auth_con_setflags(context, auth_context, flags_org); in rd_and_store_for_creds() 322 ctx->auth_context, in kg_accept_dce() 371 krb5_auth_context auth_context, in kg_process_extension() argument 387 code = krb5_auth_con_getrecvsubkey_k(context, auth_context, &key); in kg_process_extension() 467 krb5_auth_context auth_context, krb5_flags ap_req_options, in process_checksum() argument 496 code = krb5_auth_con_getkey_k(context, auth_context, &subkey); in process_checksum() [all …]
|
| /freebsd/crypto/krb5/src/lib/krb5/os/ |
| H A D | changepw.c | 49 krb5_auth_context auth_context; member 166 if ((code = krb5_auth_con_setaddrs(ctx->context, ctx->auth_context, in kpasswd_sendto_msg_callback() 170 ctx->auth_context->remote_seq_number = ctx->remote_seq_num; in kpasswd_sendto_msg_callback() 171 ctx->auth_context->local_seq_number = ctx->local_seq_num; in kpasswd_sendto_msg_callback() 175 ctx->auth_context, in kpasswd_sendto_msg_callback() 182 ctx->auth_context, in kpasswd_sendto_msg_callback() 231 &callback_ctx.auth_context))) in change_set_password() 235 &callback_ctx.auth_context, in change_set_password() 242 callback_ctx.remote_seq_num = callback_ctx.auth_context->remote_seq_number; in change_set_password() 243 callback_ctx.local_seq_num = callback_ctx.auth_context->local_seq_number; in change_set_password() [all …]
|