/*
* lib/krb5/krb/rd_safe.c
*
- * Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991,2007,2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
message->checksum = &our_cksum;
- if ((retval = encode_krb5_safe_with_body(message, &safe_body, &scratch)))
+ retval = encode_krb5_safe_with_body(message, &safe_body, &scratch);
+ message->checksum = his_cksum;
+ if (retval)
goto cleanup;
- message->checksum = his_cksum;
-
retval = krb5_c_verify_checksum(context, keyblock,
KRB5_KEYUSAGE_KRB_SAFE_CKSUM,
scratch, his_cksum, &valid);