From: John Kohl Date: Tue, 20 Nov 1990 10:51:14 +0000 (+0000) Subject: use new macro for assigning encryption system pointers X-Git-Tag: krb5-1.0-alpha3~119 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=afc18a66e6de247712bfff73b3f08f81dedf7354;p=krb5.git use new macro for assigning encryption system pointers git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1474 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/decrypt_tk.c b/src/lib/krb5/krb/decrypt_tk.c index a6903c659..dac0600a5 100644 --- a/src/lib/krb5/krb/decrypt_tk.c +++ b/src/lib/krb5/krb/decrypt_tk.c @@ -46,7 +46,7 @@ register krb5_ticket *ticket; /* put together an eblock for this encryption */ - eblock.crypto_entry = krb5_csarray[ticket->enc_part.etype]->system; + krb5_use_cstype(&eblock, ticket->enc_part.etype); scratch.length = ticket->enc_part.ciphertext.length; if (!(scratch.data = malloc(ticket->enc_part.ciphertext.length))) diff --git a/src/lib/krb5/krb/encrypt_tk.c b/src/lib/krb5/krb/encrypt_tk.c index 74f18e324..d6f00fb4e 100644 --- a/src/lib/krb5/krb/encrypt_tk.c +++ b/src/lib/krb5/krb/encrypt_tk.c @@ -59,7 +59,7 @@ krb5_free_data(scratch); } /* put together an eblock for this encryption */ - eblock.crypto_entry = krb5_csarray[dec_ticket->enc_part.etype]->system; + krb5_use_cstype(&eblock, dec_ticket->enc_part.etype); dec_ticket->enc_part.ciphertext.length = krb5_encrypt_size(scratch->length, eblock.crypto_entry); diff --git a/src/lib/krb5/krb/kdc_rep_dc.c b/src/lib/krb5/krb/kdc_rep_dc.c index 0ae1cd1c7..efbc58e2f 100644 --- a/src/lib/krb5/krb/kdc_rep_dc.c +++ b/src/lib/krb5/krb/kdc_rep_dc.c @@ -52,7 +52,7 @@ OLDDECLARG(krb5_kdc_rep *, dec_rep) /* put together an eblock for this encryption */ - eblock.crypto_entry = krb5_csarray[dec_rep->enc_part.etype]->system; + krb5_use_cstype(&eblock, dec_rep->enc_part.etype); /* do any necessary key pre-processing */ if (retval = krb5_process_key(&eblock, key)) { diff --git a/src/lib/krb5/krb/mk_priv.c b/src/lib/krb5/krb/mk_priv.c index 420f208d5..5a89400b7 100644 --- a/src/lib/krb5/krb/mk_priv.c +++ b/src/lib/krb5/krb/mk_priv.c @@ -89,7 +89,7 @@ OLDDECLARG(krb5_data *, outbuf) /* put together an eblock for this encryption */ - eblock.crypto_entry = krb5_csarray[etype]->system; + krb5_use_cstype(&eblock, etype); privmsg.enc_part.ciphertext.length = krb5_encrypt_size(scratch->length, eblock.crypto_entry); /* add padding area, and zero it */ diff --git a/src/lib/krb5/krb/mk_rep.c b/src/lib/krb5/krb/mk_rep.c index 926da2d05..1174b20ac 100644 --- a/src/lib/krb5/krb/mk_rep.c +++ b/src/lib/krb5/krb/mk_rep.c @@ -67,7 +67,7 @@ krb5_free_data(scratch); } /* put together an eblock for this encryption */ - eblock.crypto_entry = krb5_csarray[etype]->system; + krb5_use_cstype(&eblock, etype); reply.enc_part.etype = etype; reply.enc_part.kvno = 0; /* XXX user set? */ diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index 22972b247..1041fdcc2 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -132,7 +132,7 @@ krb5_free_data(scratch); } /* put together an eblock for this encryption */ - eblock.crypto_entry = krb5_csarray[etype]->system; + krb5_use_cstype(&eblock, etype); request.authenticator.etype = etype; request.authenticator.kvno = 0; /* XXX user set? */ request.authenticator.ciphertext.length = diff --git a/src/lib/krb5/krb/rd_priv.c b/src/lib/krb5/krb/rd_priv.c index 94b8d82d6..8cc22dfe1 100644 --- a/src/lib/krb5/krb/rd_priv.c +++ b/src/lib/krb5/krb/rd_priv.c @@ -83,7 +83,7 @@ OLDDECLARG(krb5_data *, outbuf) /* put together an eblock for this decryption */ - eblock.crypto_entry = krb5_csarray[privmsg->enc_part.etype]->system; + krb5_use_cstype(&eblock, privmsg->enc_part.etype); scratch.length = privmsg->enc_part.ciphertext.length; if (!(scratch.data = malloc(scratch.length))) { diff --git a/src/lib/krb5/krb/rd_rep.c b/src/lib/krb5/krb/rd_rep.c index 419b3439e..148835fce 100644 --- a/src/lib/krb5/krb/rd_rep.c +++ b/src/lib/krb5/krb/rd_rep.c @@ -60,7 +60,7 @@ krb5_ap_rep_enc_part *repl; krb5_free_ap_rep(reply); return KRB5_PROG_ETYPE_NOSUPP; } - eblock.crypto_entry = krb5_csarray[reply->enc_part.etype]->system; + krb5_use_cstype(&eblock, reply->enc_part.etype); scratch.length = reply->enc_part.ciphertext.length; if (!(scratch.data = malloc(scratch.length))) { diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c index 40f1a9a24..e04f4112b 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -199,7 +199,7 @@ krb5_authenticator **authpp; if (!valid_etype(request->authenticator.etype)) return KRB5_PROG_ETYPE_NOSUPP; - eblock.crypto_entry = krb5_csarray[request->authenticator.etype]->system; + krb5_use_cstype(&eblock, request->authenticator.etype); scratch.length = request->authenticator.ciphertext.length; if (!(scratch.data = malloc(scratch.length)))