From ebfe6dc471c206300fd82c7c0fd145f683aa52f6 Mon Sep 17 00:00:00 2001 From: assar Date: Tue, 13 Feb 2001 16:46:19 +0000 Subject: import of heimdal 0.3e --- crypto/heimdal/lib/krb5/build_auth.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crypto/heimdal/lib/krb5/build_auth.c') diff --git a/crypto/heimdal/lib/krb5/build_auth.c b/crypto/heimdal/lib/krb5/build_auth.c index a38393b..c75b2f1 100644 --- a/crypto/heimdal/lib/krb5/build_auth.c +++ b/crypto/heimdal/lib/krb5/build_auth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -33,7 +33,7 @@ #include -RCSID("$Id: build_auth.c,v 1.32 1999/12/02 17:05:08 joda Exp $"); +RCSID("$Id: build_auth.c,v 1.34 2000/11/15 06:58:51 assar Exp $"); krb5_error_code krb5_build_authenticator (krb5_context context, @@ -42,7 +42,8 @@ krb5_build_authenticator (krb5_context context, krb5_creds *cred, Checksum *cksum, Authenticator **auth_result, - krb5_data *result) + krb5_data *result, + krb5_key_usage usage) { Authenticator *auth; u_char *buf = NULL; @@ -126,9 +127,11 @@ krb5_build_authenticator (krb5_context context, } while(ret == ASN1_OVERFLOW); ret = krb5_crypto_init(context, &cred->session, enctype, &crypto); + if (ret) + goto fail; ret = krb5_encrypt (context, crypto, - KRB5_KU_AP_REQ_AUTH, + usage /* KRB5_KU_AP_REQ_AUTH */, buf + buf_size - len, len, result); -- cgit v1.1