aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/krb/rd_rep.c
diff options
context:
space:
mode:
authorMarc Horowitz <marc@mit.edu>1998-10-30 02:56:35 +0000
committerMarc Horowitz <marc@mit.edu>1998-10-30 02:56:35 +0000
commit1440ab035ba04550ddbbfbff1ee9b5571e3d95db (patch)
tree9d5e8d2e151a930e044c7d0f7c64053d244577a0 /src/lib/krb5/krb/rd_rep.c
parent61ddbf948ba6ee70c1bc049268c3dfa73bc9983e (diff)
downloadkrb5-1440ab035ba04550ddbbfbff1ee9b5571e3d95db.zip
krb5-1440ab035ba04550ddbbfbff1ee9b5571e3d95db.tar.gz
krb5-1440ab035ba04550ddbbfbff1ee9b5571e3d95db.tar.bz2
pull up 3des implementation from the marc-3des branch
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11001 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/rd_rep.c')
-rw-r--r--src/lib/krb5/krb/rd_rep.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/lib/krb5/krb/rd_rep.c b/src/lib/krb5/krb/rd_rep.c
index d4d559d..411a61d 100644
--- a/src/lib/krb5/krb/rd_rep.c
+++ b/src/lib/krb5/krb/rd_rep.c
@@ -47,7 +47,6 @@ krb5_rd_rep(context, auth_context, inbuf, repl)
{
krb5_error_code retval;
krb5_ap_rep * reply;
- krb5_encrypt_block eblock;
krb5_data scratch;
if (!krb5_is_ap_rep(inbuf))
@@ -60,35 +59,15 @@ krb5_rd_rep(context, auth_context, inbuf, repl)
/* put together an eblock for this encryption */
- if (!valid_enctype(reply->enc_part.enctype)) {
- krb5_free_ap_rep(context, reply);
- return KRB5_PROG_ETYPE_NOSUPP;
- }
- krb5_use_enctype(context, &eblock, reply->enc_part.enctype);
-
scratch.length = reply->enc_part.ciphertext.length;
if (!(scratch.data = malloc(scratch.length))) {
krb5_free_ap_rep(context, reply);
return(ENOMEM);
}
- /* do any necessary key pre-processing */
- if ((retval = krb5_process_key(context, &eblock,
- auth_context->keyblock))) {
- goto errout;
- }
-
- /* call the encryption routine */
- if ((retval = krb5_decrypt(context,
- (krb5_pointer) reply->enc_part.ciphertext.data,
- (krb5_pointer) scratch.data,
- scratch.length, &eblock, 0))) {
- (void) krb5_finish_key(context, &eblock);
- goto errout;
- }
-
- /* finished with the top-level encoding of the ap_rep */
- if ((retval = krb5_finish_key(context, &eblock)))
+ if ((retval = krb5_c_decrypt(context, auth_context->keyblock,
+ KRB5_KEYUSAGE_AP_REP_ENCPART, 0,
+ &reply->enc_part, &scratch)))
goto clean_scratch;
/* now decode the decrypted stuff */