+Wed Sep 06 14:20:57 1995 Chris Provenzano (proven@mit.edu)
+
+ * auth_con.c, decrypt_tk.c, encode_kdc.c, encrypt_tk.c,
+ * gc_frm_kdc.c, gen_seqnum.c, get_creds.c, get_in_tkt.c,
+ * in_tkt_ktb.c, in_tkt_pwd.c, in_tkt_sky.c, init_ctx.c,
+ * kdc_rep_dc.c, mk_cred.c, mk_priv.c, mk_rep.c, mk_req._ext.c,
+ * preauth.c, rd_cred.c, rd_priv.c, rd_rep.c, rd_req_dec.c,
+ * send_tgs.c, sendauth.c, ser_actx.c, ser_ctx.c, ser_eblk.c,
+ * ser_key.c, t_ser.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g
+
Tue Sep 05 22:10:34 1995 Chris Provenzano (proven@mit.edu)
* decode_kdc.c, decrypt_tk.c, encode_kdc.c, encrypt_tk.c, gc_frm_kdc.c
krb5_auth_context auth_context;
{
if (auth_context->keyblock) {
- int size = krb5_keytype_array[auth_context->keyblock->keytype]->
+ int size = krb5_enctype_array[auth_context->keyblock->enctype]->
system->block_length;
if ((auth_context->i_vector = (krb5_pointer)malloc(size))) {
krb5_data scratch;
krb5_error_code retval;
- if (!valid_keytype(ticket->enc_part.keytype))
+ if (!valid_enctype(ticket->enc_part.enctype))
return KRB5_PROG_ETYPE_NOSUPP;
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, ticket->enc_part.keytype);
+ krb5_use_enctype(context, &eblock, ticket->enc_part.enctype);
scratch.length = ticket->enc_part.ciphertext.length;
if (!(scratch.data = malloc(ticket->enc_part.ciphertext.length)))
krb5_error_code retval;
krb5_enc_kdc_rep_part tmp_encpart;
- if (!valid_keytype(dec_rep->enc_part.keytype))
+ if (!valid_enctype(dec_rep->enc_part.enctype))
return KRB5_PROG_ETYPE_NOSUPP;
switch (type) {
goto clean_prockey;
}
- dec_rep->enc_part.keytype = krb5_eblock_keytype(context, eblock);
+ dec_rep->enc_part.enctype = krb5_eblock_enctype(context, eblock);
/* do some cleanup */
cleanup_scratch();
goto clean_prockey;
}
- dec_ticket->enc_part.keytype = krb5_eblock_keytype(context, eblock);
+ dec_ticket->enc_part.enctype = krb5_eblock_enctype(context, eblock);
/* ticket is now assembled-- do some cleanup */
cleanup_scratch();
/* didn't find it in the cache so try and get one */
/* with current tgt. */
- if (!valid_keytype(tgt.keyblock.keytype)) {
- retval = KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(tgt.keyblock.enctype)) {
+ retval = KRB5_PROG_ETYPE_NOSUPP;
goto cleanup;
}
/* not in the cache so try and get one with our current tgt. */
- if (!valid_keytype(tgt.keyblock.keytype)) {
- retval = KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(tgt.keyblock.enctype)) {
+ retval = KRB5_PROG_ETYPE_NOSUPP;
goto cleanup;
}
/* got/finally have tgt! try for the creds */
- if (!valid_keytype(tgt.keyblock.keytype)) {
- retval = KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(tgt.keyblock.enctype)) {
+ retval = KRB5_PROG_ETYPE_NOSUPP;
goto cleanup;
}
krb5_octet *intmp = 0, *outtmp = 0;
int esize;
- if (!valid_keytype(key->keytype))
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(key->enctype))
+ return KRB5_PROG_ETYPE_NOSUPP;
- krb5_use_keytype(context, &eblock, key->keytype);
+ krb5_use_enctype(context, &eblock, key->enctype);
if ((retval = krb5_init_random_key(context, &eblock, key, &random_state)))
return(retval);
krb5_encrypt_block eblock;
krb5_error_code retval;
- if (!valid_keytype(key->keytype))
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(key->enctype))
+ return KRB5_PROG_ETYPE_NOSUPP;
- krb5_use_keytype(context, &eblock, key->keytype);
+ krb5_use_enctype(context, &eblock, key->enctype);
if ((retval = krb5_init_random_key(context, &eblock, key, &random_state)))
return(retval);
client identified by in_creds->client, the server identified by
in_creds->server, with options options, expiration date specified in
in_creds->times.endtime (0 means as long as possible), session key type
- specified in in_creds->keyblock.keytype (if non-zero)
+ specified in in_creds->keyblock.enctype (if non-zero)
Any returned ticket and intermediate ticket-granting tickets are
stored in ccache.
/* some typedef's for the function args to make things look a bit cleaner */
typedef krb5_error_code (*git_key_proc) PROTOTYPE((krb5_context,
- const krb5_keytype,
+ const krb5_enctype,
krb5_data *,
krb5_const_pointer,
krb5_keyblock **));
krb5_context context;
const krb5_flags options;
krb5_address * const * addrs;
- krb5_keytype * ktypes;
+ krb5_enctype * ktypes;
krb5_preauthtype * ptypes;
git_key_proc key_proc;
krb5_const_pointer keyseed;
krb5_ccache ccache;
krb5_kdc_rep ** ret_as_reply;
{
- krb5_keytype keytype, ktype;
+ krb5_enctype enctype, ktype;
krb5_kdc_req request;
krb5_kdc_rep *as_reply = 0;
krb5_error *err_reply;
* default. But if we're changing salts, because of a
* realm renaming, or some such, this won't work.
*/
-/* retval = (*key_proc)(context, keytype, &decrypt_key, keyseed, 0); */
+/* retval = (*key_proc)(context, enctype, &decrypt_key, keyseed, 0); */
if (retval)
return retval;
request.padata = (krb5_pa_data **) malloc(sizeof(krb5_pa_data *)
goto cleanup;
}
- /* Encryption type, keytype, */
- keytype = as_reply->ticket->enc_part.keytype;
+ /* Encryption type, enctype, */
+ enctype = as_reply->ticket->enc_part.enctype;
/* and salt */
if (as_reply->padata) {
/* it was a kdc_rep--decrypt & check */
/* Generate the key, if we haven't done so already. */
if (!decrypt_key) {
- if ((retval = (*key_proc)(context, keytype, & salt, keyseed,
+ if ((retval = (*key_proc)(context, enctype, & salt, keyseed,
&decrypt_key)))
goto cleanup;
}
*/
krb5_error_code keytab_keyproc
PROTOTYPE((krb5_context,
- const krb5_keytype,
+ const krb5_enctype,
krb5_data *,
krb5_const_pointer,
krb5_keyblock **));
krb5_error_code
keytab_keyproc(context, type, salt, keyseed, key)
krb5_context context;
- const krb5_keytype type;
+ const krb5_enctype type;
krb5_data * salt;
krb5_const_pointer keyseed;
krb5_keyblock ** key;
kt_id = arg->keytab;
- if (!valid_keytype(type))
+ if (!valid_enctype(type))
return KRB5_PROG_ETYPE_NOSUPP;
if (kt_id == NULL)
goto cleanup;
}
- if (realkey->keytype != type) {
+ if (realkey->enctype != type) {
(void) krb5_kt_free_entry(context, &kt_ent);
krb5_free_keyblock(context, realkey);
retval = KRB5_PROG_ETYPE_NOSUPP;
krb5_context context;
const krb5_flags options;
krb5_address * const * addrs;
- krb5_keytype * ktypes;
+ krb5_enctype * ktypes;
krb5_preauthtype * pre_auth_types;
const krb5_keytab keytab;
krb5_ccache ccache;
*/
krb5_error_code pwd_keyproc
PROTOTYPE((krb5_context,
- const krb5_keytype,
+ const krb5_enctype,
krb5_data *,
krb5_const_pointer,
krb5_keyblock **));
krb5_error_code
pwd_keyproc(context, type, salt, keyseed, key)
krb5_context context;
- const krb5_keytype type;
+ const krb5_enctype type;
krb5_data * salt;
krb5_const_pointer keyseed;
krb5_keyblock ** key;
krb5_data * password;
int pwsize = sizeof(pwdbuf);
- if (!valid_keytype(type))
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(type))
+ return KRB5_PROG_ETYPE_NOSUPP;
- krb5_use_keytype(context, &eblock, type);
+ krb5_use_enctype(context, &eblock, type);
password = (krb5_data *)keyseed;
krb5_context context;
const krb5_flags options;
krb5_address * const * addrs;
- krb5_keytype * ktypes;
+ krb5_enctype * ktypes;
krb5_preauthtype * pre_auth_types;
const char * password;
krb5_ccache ccache;
*/
krb5_error_code skey_keyproc
PROTOTYPE((krb5_context,
- const krb5_keytype,
+ const krb5_enctype,
krb5_data *,
krb5_const_pointer,
krb5_keyblock **));
krb5_error_code
skey_keyproc(context, type, salt, keyseed, key)
krb5_context context;
- const krb5_keytype type;
+ const krb5_enctype type;
krb5_data * salt;
krb5_const_pointer keyseed;
krb5_keyblock ** key;
keyblock = (const krb5_keyblock *)keyseed;
- if (!valid_keytype(type))
+ if (!valid_enctype(type))
return KRB5_PROG_ETYPE_NOSUPP;
if ((retval = krb5_copy_keyblock(context, keyblock, &realkey)))
return retval;
- if (realkey->keytype != type) {
+ if (realkey->enctype != type) {
krb5_free_keyblock(context, realkey);
return KRB5_PROG_ETYPE_NOSUPP;
}
krb5_context context;
const krb5_flags options;
krb5_address * const * addrs;
- krb5_keytype * ktypes;
+ krb5_enctype * ktypes;
krb5_preauthtype * pre_auth_types;
const krb5_keyblock * key;
krb5_ccache ccache;
krb5_error_code
krb5_set_default_in_tkt_ktypes(context, ktypes)
krb5_context context;
- const krb5_keytype *ktypes;
+ const krb5_enctype *ktypes;
{
- krb5_keytype * new_ktypes;
+ krb5_enctype * new_ktypes;
int i;
if (ktypes) {
for (i = 0; ktypes[i]; i++) {
- if (!valid_keytype(ktypes[i]))
+ if (!valid_enctype(ktypes[i]))
return KRB5_PROG_ETYPE_NOSUPP;
}
/* Now copy the default ktypes into the context pointer */
- if ((new_ktypes = (krb5_keytype *)malloc(sizeof(krb5_keytype) * i)))
- memcpy(new_ktypes, ktypes, sizeof(krb5_keytype) * i);
+ if ((new_ktypes = (krb5_enctype *)malloc(sizeof(krb5_enctype) * i)))
+ memcpy(new_ktypes, ktypes, sizeof(krb5_enctype) * i);
else
return ENOMEM;
i = 2;
/* Should reset the list to the runtime defaults */
- if ((new_ktypes = (krb5_keytype *)malloc(sizeof(krb5_keytype) * i))) {
- new_ktypes[0] = KEYTYPE_DES_CBC_MD5;
- new_ktypes[1] = KEYTYPE_DES_CBC_CRC;
+ if ((new_ktypes = (krb5_enctype *)malloc(sizeof(krb5_enctype) * i))) {
+ new_ktypes[0] = ENCTYPE_DES_CBC_MD5;
+ new_ktypes[1] = ENCTYPE_DES_CBC_CRC;
} else {
return ENOMEM;
}
krb5_error_code
krb5_get_default_in_tkt_ktypes(context, ktypes)
krb5_context context;
- krb5_keytype **ktypes;
+ krb5_enctype **ktypes;
{
- krb5_keytype * old_ktypes;
+ krb5_enctype * old_ktypes;
- if ((old_ktypes = (krb5_keytype *)malloc(sizeof(krb5_keytype) *
+ if ((old_ktypes = (krb5_enctype *)malloc(sizeof(krb5_enctype) *
(context->ktype_count + 1)))) {
- memcpy(old_ktypes, context->ktypes, sizeof(krb5_keytype) *
+ memcpy(old_ktypes, context->ktypes, sizeof(krb5_enctype) *
context->ktype_count);
old_ktypes[context->ktype_count] = 0;
} else {
krb5_data scratch;
krb5_enc_kdc_rep_part *local_encpart;
- if (!valid_keytype(dec_rep->enc_part.keytype))
+ if (!valid_enctype(dec_rep->enc_part.enctype))
return KRB5_PROG_ETYPE_NOSUPP;
/* set up scratch decrypt/decode area */
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, dec_rep->enc_part.keytype);
+ krb5_use_enctype(context, &eblock, dec_rep->enc_part.enctype);
/* do any necessary key pre-processing */
if ((retval = krb5_process_key(context, &eblock, key))) {
krb5_encrypt_block eblock;
krb5_data * scratch;
- if (!valid_keytype(pkeyblock->keytype))
+ if (!valid_enctype(pkeyblock->enctype))
return KRB5_PROG_ETYPE_NOSUPP;
/* start by encoding to-be-encrypted part of the message */
/* put together an eblock for this encryption */
pencdata->kvno = 0;
- pencdata->keytype = pkeyblock->keytype;
+ pencdata->enctype = pkeyblock->enctype;
- krb5_use_keytype(context, &eblock, pkeyblock->keytype);
+ krb5_use_enctype(context, &eblock, pkeyblock->enctype);
pencdata->ciphertext.length = krb5_encrypt_size(scratch->length,
eblock.crypto_entry);
krb5_priv_enc_part privmsg_enc_part;
krb5_data *scratch1, *scratch2;
- if (!valid_keytype(keyblock->keytype))
+ if (!valid_enctype(keyblock->enctype))
return KRB5_PROG_ETYPE_NOSUPP;
privmsg.enc_part.kvno = 0; /* XXX allow user-set? */
- privmsg.enc_part.keytype = keyblock->keytype;
+ privmsg.enc_part.enctype = keyblock->enctype;
privmsg_enc_part.user_data = *userdata;
privmsg_enc_part.s_address = local_addr;
return retval;
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, keyblock->keytype);
+ krb5_use_enctype(context, &eblock, keyblock->enctype);
privmsg.enc_part.ciphertext.length = krb5_encrypt_size(scratch1->length,
eblock.crypto_entry);
/* add padding area, and zero it */
krb5_data * outbuf;
{
krb5_error_code retval;
- krb5_keytype keytype;
+ krb5_enctype enctype;
krb5_ap_rep_enc_part repl;
krb5_encrypt_block eblock;
krb5_ap_rep reply;
krb5_data * scratch;
krb5_data * toutbuf;
- /* verify a valid keytype is available */
- if (!valid_keytype(keytype = auth_context->keyblock->keytype))
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ /* verify a valid enctype is available */
+ if (!valid_enctype(enctype = auth_context->keyblock->enctype))
+ return KRB5_PROG_ETYPE_NOSUPP;
/* Make the reply */
if (((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) ||
return retval;
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, keytype);
- reply.enc_part.keytype = keytype;
+ krb5_use_enctype(context, &eblock, enctype);
+ reply.enc_part.enctype = enctype;
reply.enc_part.kvno = 0; /* XXX user set? */
reply.enc_part.ciphertext.length = krb5_encrypt_size(scratch->length,
if ((retval = decode_krb5_ticket(&(in_creds)->ticket, &request.ticket)))
return(retval);
- /* verify a valid keytype is available */
- if (!valid_keytype(request.ticket->enc_part.keytype)) {
- retval = KRB5_PROG_KEYTYPE_NOSUPP;
+ /* verify a valid enctype is available */
+ if (!valid_enctype(request.ticket->enc_part.enctype)) {
+ retval = KRB5_PROG_ETYPE_NOSUPP;
goto cleanup;
}
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, request.ticket->enc_part.keytype);
- request.authenticator.keytype = request.ticket->enc_part.keytype;
+ krb5_use_enctype(context, &eblock, request.ticket->enc_part.enctype);
+ request.authenticator.enctype = request.ticket->enc_part.enctype;
request.authenticator.kvno = 0;
request.authenticator.ciphertext.length =
krb5_encrypt_size(scratch->length, eblock.crypto_entry);
retval = KRB5_PREAUTH_NO_KEY;
goto error_out;
}
- krb5_use_keytype(context, &eblock, encrypt_key->keytype);
+ krb5_use_enctype(context, &eblock, encrypt_key->enctype);
/* do any necessay key pre-processing */
retval = krb5_process_key(context, &eblock, encrypt_key);
if (!decrypt_key)
return(EINVAL);
- krb5_use_keytype(context, &eblock, decrypt_key->keytype);
+ krb5_use_enctype(context, &eblock, decrypt_key->enctype);
scratch.length = data->length;
if (!(scratch.data = (char *)malloc(scratch.length))) {
krb5_error_code retval;
krb5_data scratch;
- if (!valid_keytype(pcred->enc_part.keytype))
+ if (!valid_enctype(pcred->enc_part.enctype))
return KRB5_PROG_ETYPE_NOSUPP;
/* put together an eblock for this decryption */
- krb5_use_keytype(context, &eblock, pcred->enc_part.keytype);
+ krb5_use_enctype(context, &eblock, pcred->enc_part.enctype);
scratch.length = pcred->enc_part.ciphertext.length;
if (!(scratch.data = (char *)malloc(scratch.length)))
if ((retval = decode_krb5_priv(inbuf, &privmsg)))
return retval;
- if (!valid_keytype(privmsg->enc_part.keytype)) {
+ if (!valid_enctype(privmsg->enc_part.enctype)) {
retval = KRB5_PROG_ETYPE_NOSUPP;
goto cleanup_privmsg;
}
/* put together an eblock for this decryption */
- krb5_use_keytype(context, &eblock, privmsg->enc_part.keytype);
+ krb5_use_enctype(context, &eblock, privmsg->enc_part.enctype);
scratch.length = privmsg->enc_part.ciphertext.length;
if (!(scratch.data = malloc(scratch.length))) {
/* put together an eblock for this encryption */
- if (!valid_keytype(reply->enc_part.keytype)) {
+ if (!valid_enctype(reply->enc_part.enctype)) {
krb5_free_ap_rep(context, reply);
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ return KRB5_PROG_ETYPE_NOSUPP;
}
- krb5_use_keytype(context, &eblock, reply->enc_part.keytype);
+ krb5_use_enctype(context, &eblock, reply->enc_part.enctype);
scratch.length = reply->enc_part.ciphertext.length;
if (!(scratch.data = malloc(scratch.length))) {
{
krb5_error_code retval;
- krb5_keytype keytype;
+ krb5_enctype enctype;
krb5_keytab_entry ktent;
/*
- * OK we know the encryption type req->ticket->enc_part.keytype,
- * and now we need to get the keytype
+ * OK we know the encryption type req->ticket->enc_part.enctype,
+ * and now we need to get the enctype
*/
- keytype = req->ticket->enc_part.keytype;
+ enctype = req->ticket->enc_part.enctype;
if ((retval = krb5_kt_get_entry(context, keytab, req->ticket->server,
req->ticket->enc_part.kvno,
- keytype, &ktent)))
+ enctype, &ktent)))
return retval;
if ((retval = krb5_decrypt_tkt_part(context, &ktent.key, req->ticket)))
sesskey = request->ticket->enc_part2->session;
- if (!valid_keytype(sesskey->keytype))
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(sesskey->enctype))
+ return KRB5_PROG_ETYPE_NOSUPP;
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, request->authenticator.keytype);
+ krb5_use_enctype(context, &eblock, request->authenticator.enctype);
scratch.length = request->authenticator.ciphertext.length;
if (!(scratch.data = malloc(scratch.length)))
Sends a request to the TGS and waits for a response.
options is used for the options in the KRB_TGS_REQ.
timestruct values are used for from, till, rtime " " "
- keytype is used for keytype " " ", and to encrypt the authorization data,
+ enctype is used for enctype " " ", and to encrypt the authorization data,
sname is used for sname " " "
addrs, if non-NULL, is used for addresses " " "
authorization_dat, if non-NULL, is used for authorization_dat " " "
goto cleanup_data;
/* put together an eblock for this encryption */
- krb5_use_keytype(context, &eblock, request.ticket->enc_part.keytype);
- request.authenticator.keytype = request.ticket->enc_part.keytype;
+ krb5_use_enctype(context, &eblock, request.ticket->enc_part.enctype);
+ request.authenticator.enctype = request.ticket->enc_part.enctype;
request.authenticator.ciphertext.length =
krb5_encrypt_size(scratch->length, eblock.crypto_entry);
krb5_context context;
const krb5_flags kdcoptions;
const krb5_ticket_times * timestruct;
- const krb5_keytype * ktypes;
+ const krb5_enctype * ktypes;
krb5_const_principal sname;
krb5_address * const * addrs;
krb5_authdata * const * authorization_data;
if ((retval = encode_krb5_authdata((const krb5_authdata**)authorization_data,
&scratch)))
return(retval);
- krb5_use_keytype(context, &eblock, in_cred->keyblock.keytype);
- tgsreq.authorization_data.keytype = in_cred->keyblock.keytype;
+ krb5_use_enctype(context, &eblock, in_cred->keyblock.enctype);
+ tgsreq.authorization_data.enctype = in_cred->keyblock.enctype;
tgsreq.authorization_data.kvno = 0; /* ticket session key has */
/* no version */
tgsreq.authorization_data.ciphertext.length =
if (ktypes) {
/* Check passed ktypes and make sure they're valid. */
for (tgsreq.nktypes = 0; ktypes[tgsreq.nktypes]; tgsreq.nktypes++) {
- if (!valid_keytype(ktypes[tgsreq.nktypes]))
- return KRB5_PROG_KEYTYPE_NOSUPP;
+ if (!valid_enctype(ktypes[tgsreq.nktypes]))
+ return KRB5_PROG_ETYPE_NOSUPP;
}
- tgsreq.ktype = (krb5_keytype *)ktypes;
+ tgsreq.ktype = (krb5_enctype *)ktypes;
} else {
/* Get the default ktypes */
krb5_get_default_in_tkt_ktypes(context, &(tgsreq.ktype));
}
/* creds.times.endtime = 0; -- memset 0 takes care of this
zero means "as long as possible" */
- /* creds.keyblock.keytype = 0; -- as well as this.
- zero means no session keytype
+ /* creds.keyblock.enctype = 0; -- as well as this.
+ zero means no session enctype
preference */
in_creds = &creds;
}
/* Calculate size required by i_vector - ptooey */
if (auth_context->i_vector && auth_context->keyblock)
required += (size_t)
- krb5_keytype_array[auth_context->keyblock->keytype]->
+ krb5_enctype_array[auth_context->keyblock->enctype]->
system->block_length;
/* Calculate size required by remote_addr, if appropriate */
/* Now figure out the number of bytes for i_vector and write it */
obuf = (!auth_context->i_vector) ? 0 : (krb5_int32)
- krb5_keytype_array[auth_context->keyblock->keytype]->
+ krb5_enctype_array[auth_context->keyblock->enctype]->
system->block_length;
(void) krb5_ser_pack_int32(obuf, &bp, &remain);
if (!(kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain))) {
/* Reduce it to a count */
context->ktype_count = ibuf;
- if ((context->ktypes = (krb5_keytype *)
- malloc(sizeof(krb5_keytype) *
+ if ((context->ktypes = (krb5_enctype *)
+ malloc(sizeof(krb5_enctype) *
(context->ktype_count+1)))) {
memset(context->ktypes,
0,
- sizeof(krb5_keytype) *
+ sizeof(krb5_enctype) *
(context->ktype_count + 1));
for (i=0; i<context->ktype_count; i++) {
if ((kret = krb5_ser_unpack_int32(&ibuf,
&bp, &remain)))
break;
- context->ktypes[i] = (krb5_keytype) ibuf;
+ context->ktypes[i] = (krb5_enctype) ibuf;
}
}
}
size_t required;
/*
- * NOTE: This ASSuMES that keytype are sufficient to recreate
+ * NOTE: This ASSuMES that enctype are sufficient to recreate
* the _krb5_cryptosystem_entry. If this is not true, then something else
* had better be encoded here.
*
* krb5_encrypt_block base requirements:
* krb5_int32 for KV5M_ENCRYPT_BLOCK
- * krb5_int32 for keytype
+ * krb5_int32 for enctype
* krb5_int32 for private length
* encrypt_block->priv_size for private contents
* krb5_int32 for KV5M_ENCRYPT_BLOCK
/* Our identifier */
(void) krb5_ser_pack_int32(KV5M_ENCRYPT_BLOCK, &bp, &remain);
- /* Our keytype */
+ /* Our enctype */
(void) krb5_ser_pack_int32((krb5_int32) encrypt_block->
- crypto_entry->proto_keytype,
+ crypto_entry->proto_enctype,
&bp, &remain);
/* Our length */
krb5_error_code kret;
krb5_encrypt_block *encrypt_block;
krb5_int32 ibuf;
- krb5_keytype ktype;
+ krb5_enctype ktype;
krb5_octet *bp;
size_t remain;
malloc(sizeof(krb5_encrypt_block)))) {
memset(encrypt_block, 0, sizeof(krb5_encrypt_block));
- /* Get the keytype */
+ /* Get the enctype */
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
- ktype = (krb5_keytype) ibuf;
+ ktype = (krb5_enctype) ibuf;
/* Use the ktype to determine the crypto_system entry. */
- krb5_use_keytype(kcontext, encrypt_block, ktype);
+ krb5_use_enctype(kcontext, encrypt_block, ktype);
/* Get the length */
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
/*
* krb5_keyblock requires:
* krb5_int32 for KV5M_KEYBLOCK
- * krb5_int32 for keytype
+ * krb5_int32 for enctype
* krb5_int32 for length
* keyblock->length for contents
* krb5_int32 for KV5M_KEYBLOCK
/* Our identifier */
(void) krb5_ser_pack_int32(KV5M_KEYBLOCK, &bp, &remain);
- /* Our keytype */
- (void) krb5_ser_pack_int32((krb5_int32) keyblock->keytype,
+ /* Our enctype */
+ (void) krb5_ser_pack_int32((krb5_int32) keyblock->enctype,
&bp, &remain);
/* Our length */
(keyblock = (krb5_keyblock *) malloc(sizeof(krb5_keyblock)))) {
memset(keyblock, 0, sizeof(krb5_keyblock));
- /* Get the keytype */
+ /* Get the enctype */
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
- keyblock->keytype = (krb5_keytype) ibuf;
+ keyblock->enctype = (krb5_enctype) ibuf;
/* Get the length */
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
KV5M_AUTH_CONTEXT))) {
memset(&ukeyblock, 0, sizeof(ukeyblock));
memset(keydata, 0, sizeof(keydata));
- ukeyblock.keytype = KEYTYPE_DES_CBC_MD5;
+ ukeyblock.enctype = ENCTYPE_DES_CBC_MD5;
ukeyblock.length = sizeof(keydata);
ukeyblock.contents = keydata;
keydata[0] = 0xde;
memset(&eblock, 0, sizeof(krb5_encrypt_block));
eblock.magic = KV5M_ENCRYPT_BLOCK;
- krb5_use_keytype(kcontext, &eblock, DEFAULT_KDC_KEYTYPE);
+ krb5_use_enctype(kcontext, &eblock, DEFAULT_KDC_ENCTYPE);
if (!(kret = ser_data(verbose, "> NULL eblock",
(krb5_pointer) &eblock, KV5M_ENCRYPT_BLOCK))) {
eblock.priv = (krb5_pointer) ser_eblock_test;
KV5M_ENCRYPT_BLOCK))) {
memset(&ukeyblock, 0, sizeof(ukeyblock));
memset(keydata, 0, sizeof(keydata));
- ukeyblock.keytype = KEYTYPE_DES_CBC_MD5;
+ ukeyblock.enctype = ENCTYPE_DES_CBC_MD5;
ukeyblock.length = sizeof(keydata);
ukeyblock.contents = keydata;
keydata[0] = 0xde;