Make authcontext->keyblock a pointer.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3916 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-11-11 01:51:35 +00:00
parent b0f33bd5de
commit fb0f4ca9c3
8 changed files with 19 additions and 20 deletions

View File

@@ -66,7 +66,7 @@ krb5_mk_priv(krb5_context context,
else if (auth_context->remote_subkey.keytype)
key = &auth_context->remote_subkey;
else
key = &auth_context->key;
key = auth_context->keyblock;
if (auth_context->enctype)
enctype = auth_context->enctype;

View File

@@ -59,19 +59,19 @@ krb5_mk_rep(krb5_context context,
body.subkey = NULL;
if ((*auth_context)->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
krb5_generate_seq_number (context,
&(*auth_context)->key,
(*auth_context)->keyblock,
&(*auth_context)->local_seqnumber);
body.seq_number = malloc (sizeof(*body.seq_number));
*(body.seq_number) = (*auth_context)->local_seqnumber;
} else
body.seq_number = NULL;
ap.enc_part.etype = (*auth_context)->key.keytype;
ap.enc_part.etype = (*auth_context)->keyblock->keytype;
ap.enc_part.kvno = NULL;
encode_EncAPRepPart (buf + sizeof(buf) - 1, sizeof(buf), &body, &len);
ret = krb5_encrypt (context, buf + sizeof(buf) - len, len,
ap.enc_part.etype,
&(*auth_context)->key, &ap.enc_part.cipher);
(*auth_context)->keyblock, &ap.enc_part.cipher);
if (ret)
return ret;

View File

@@ -66,21 +66,20 @@ krb5_mk_req_extended(krb5_context context,
if(r)
return r;
free_EncryptionKey (&ac->key);
copy_EncryptionKey (&in_creds->session,
&ac->key);
krb5_free_keyblock(context, ac->keyblock);
krb5_copy_keyblock(context, &in_creds->session, &ac->keyblock);
if (ac->cksumtype)
cksumtype = ac->cksumtype;
else
krb5_keytype_to_cksumtype (context, ac->key.keytype, &cksumtype);
krb5_keytype_to_cksumtype (context, ac->keyblock->keytype, &cksumtype);
if (in_data) {
r = krb5_create_checksum (context,
cksumtype,
in_data->data,
in_data->length,
&ac->key,
ac->keyblock,
&c);
c_opt = &c;
} else {

View File

@@ -61,7 +61,7 @@ krb5_mk_safe(krb5_context context,
cksumtype = auth_context->cksumtype;
else {
r = krb5_keytype_to_cksumtype (context,
auth_context->key.keytype,
auth_context->keyblock->keytype,
&cksumtype);
if (r)
return r;
@@ -102,7 +102,7 @@ krb5_mk_safe(krb5_context context,
cksumtype,
buf + sizeof(buf) - len,
len,
&auth_context->key,
auth_context->keyblock,
&s.cksum);
if (r)
return r;

View File

@@ -73,7 +73,7 @@ krb5_rd_priv(krb5_context context,
else if (auth_context->remote_subkey.keytype)
key = &auth_context->remote_subkey;
else
key = &auth_context->key;
key = auth_context->keyblock;
r = krb5_decrypt (context,
priv.enc_part.cipher.data,

View File

@@ -70,7 +70,7 @@ krb5_rd_rep(krb5_context context,
ap_rep.enc_part.cipher.data,
ap_rep.enc_part.cipher.length,
ap_rep.enc_part.etype,
&auth_context->key,
auth_context->keyblock,
&data);
if (ret)
goto out;

View File

@@ -169,12 +169,12 @@ krb5_verify_ap_req(krb5_context context,
}else
krb5_auth_con_init(context, &ac);
if (ap_req->ap_options.use_session_key && auth_context->keyblock){
if (ap_req->ap_options.use_session_key && ac->keyblock){
ret = krb5_decrypt_ticket(context, &ap_req->ticket,
auth_context->keyblock,
ac->keyblock,
&t.ticket);
krb5_free_keyblock(context, auth_context->keyblock);
auth_context->keyblock = NULL;
krb5_free_keyblock(context, ac->keyblock);
ac->keyblock = NULL;
}else
ret = krb5_decrypt_ticket(context, &ap_req->ticket,
keyblock,
@@ -192,7 +192,7 @@ krb5_verify_ap_req(krb5_context context,
/* save key */
copy_EncryptionKey(&t.ticket.key, &ac->key);
krb5_copy_keyblock(context, &t.ticket.key, &ac->keyblock);
ret = decrypt_authenticator (context,
&t.ticket.key,

View File

@@ -133,7 +133,7 @@ krb5_rd_safe(krb5_context context,
r = krb5_verify_checksum (context,
buf + sizeof(buf) - len,
len,
&auth_context->key,
auth_context->keyblock,
&c);
free_Checksum (&c);
if (r)