"better" error codes

This commit is contained in:
Love Hornquist Astrand
2011-05-16 22:53:54 -07:00
committed by Love Hörnquist Åstrand
parent 067072f81e
commit 5d1ae998f9

View File

@@ -1713,7 +1713,7 @@ fast_unwrap_as_rep(krb5_context context, int32_t nonce,
goto out; goto out;
} else { } else {
ret = EINVAL; ret = KRB5KDC_ERR_PREAUTH_FAILED;
goto out; goto out;
} }
@@ -1740,15 +1740,17 @@ fast_unwrap_as_rep(krb5_context context, int32_t nonce,
} }
if (nonce != fastrep.nonce) { if (nonce != fastrep.nonce) {
ret = EINVAL; ret = KRB5KDC_ERR_PREAUTH_FAILED;
goto out; goto out;
} }
if (fastrep.finished) { if (fastrep.finished) {
PrincipalName cname; PrincipalName cname;
krb5_realm crealm = NULL; krb5_realm crealm = NULL;
if (chksumdata == NULL) if (chksumdata == NULL) {
return EINVAL; ret = KRB5KDC_ERR_PREAUTH_FAILED;
goto out;
}
ret = krb5_verify_checksum(context, state->armor_crypto, ret = krb5_verify_checksum(context, state->armor_crypto,
KRB5_KU_FAST_FINISHED, KRB5_KU_FAST_FINISHED,
@@ -1777,7 +1779,7 @@ fast_unwrap_as_rep(krb5_context context, int32_t nonce,
} else if (chksumdata) { } else if (chksumdata) {
/* expected fastrep.finish but didn't get it */ /* expected fastrep.finish but didn't get it */
ret = EINVAL; ret = KRB5KDC_ERR_PREAUTH_FAILED;
} }
out: out: