summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/rd_req.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/krb5/rd_req.c')
-rw-r--r--crypto/heimdal/lib/krb5/rd_req.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/heimdal/lib/krb5/rd_req.c b/crypto/heimdal/lib/krb5/rd_req.c
index 922137a..b7059e1 100644
--- a/crypto/heimdal/lib/krb5/rd_req.c
+++ b/crypto/heimdal/lib/krb5/rd_req.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#include <krb5_locl.h>
-RCSID("$Id: rd_req.c,v 1.44 2000/11/15 23:16:28 assar Exp $");
+RCSID("$Id: rd_req.c,v 1.45 2001/05/14 06:14:50 assar Exp $");
static krb5_error_code
decrypt_tkt_enc_part (krb5_context context,
@@ -113,14 +113,17 @@ krb5_decode_ap_req(krb5_context context,
return ret;
if (ap_req->pvno != 5){
free_AP_REQ(ap_req);
+ krb5_clear_error_string (context);
return KRB5KRB_AP_ERR_BADVERSION;
}
if (ap_req->msg_type != krb_ap_req){
free_AP_REQ(ap_req);
+ krb5_clear_error_string (context);
return KRB5KRB_AP_ERR_MSG_TYPE;
}
if (ap_req->ticket.tkt_vno != 5){
free_AP_REQ(ap_req);
+ krb5_clear_error_string (context);
return KRB5KRB_AP_ERR_BADVERSION;
}
return 0;
@@ -150,10 +153,12 @@ krb5_decrypt_ticket(krb5_context context,
|| (t.flags.invalid
&& !(flags & KRB5_VERIFY_AP_REQ_IGNORE_INVALID))) {
free_EncTicketPart(&t);
+ krb5_clear_error_string (context);
return KRB5KRB_AP_ERR_TKT_NYV;
}
if(now - t.endtime > context->max_skew) {
free_EncTicketPart(&t);
+ krb5_clear_error_string (context);
return KRB5KRB_AP_ERR_TKT_EXPIRED;
}
}
@@ -320,6 +325,7 @@ krb5_verify_ap_req2(krb5_context context,
krb5_free_principal (context, p2);
if (!res) {
ret = KRB5KRB_AP_ERR_BADMATCH;
+ krb5_clear_error_string (context);
goto out2;
}
}
@@ -332,6 +338,7 @@ krb5_verify_ap_req2(krb5_context context,
ac->remote_address,
t.ticket.caddr)) {
ret = KRB5KRB_AP_ERR_BADADDR;
+ krb5_clear_error_string (context);
goto out2;
}
OpenPOWER on IntegriCloud