summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/krb5/crypto.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-08-20 06:00:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:35 -0500
commit55f5453bc81d9a3a4fe67ff0a6ba528d8d0f7984 (patch)
tree19d28e75e07ead51f0096328ddf913726cfbd59e /source4/heimdal/lib/krb5/crypto.c
parentb456bfa0155ea70ca60590a83e19232c63ec1ac1 (diff)
downloadsamba-55f5453bc81d9a3a4fe67ff0a6ba528d8d0f7984.tar.gz
samba-55f5453bc81d9a3a4fe67ff0a6ba528d8d0f7984.tar.bz2
samba-55f5453bc81d9a3a4fe67ff0a6ba528d8d0f7984.zip
r9413: Bring Samba4 back up to date with lorikeet-heimdal.
Delete test_crypto_wrapping.c, previously included but unbuilt. Andrew Bartlett (This used to be commit d5fb30fb0cef330e0947969f0c9afc1f58fc4c7d)
Diffstat (limited to 'source4/heimdal/lib/krb5/crypto.c')
-rw-r--r--source4/heimdal/lib/krb5/crypto.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source4/heimdal/lib/krb5/crypto.c b/source4/heimdal/lib/krb5/crypto.c
index c8fa556696..1c3e8d2a10 100644
--- a/source4/heimdal/lib/krb5/crypto.c
+++ b/source4/heimdal/lib/krb5/crypto.c
@@ -2124,8 +2124,7 @@ verify_checksum(krb5_context context,
return KRB5_PROG_SUMTYPE_NOSUPP;
}
if(ct->checksumsize != cksum->checksum.length) {
- krb5_set_error_string (context, "checksum length was %d, but should be %d for checksum type %s",
- cksum->checksum.length, ct->checksumsize, ct->name);
+ krb5_clear_error_string (context);
return KRB5KRB_AP_ERR_BAD_INTEGRITY; /* XXX */
}
keyed_checksum = (ct->flags & F_KEYED) != 0;
@@ -2146,11 +2145,8 @@ verify_checksum(krb5_context context,
(*ct->checksum)(context, dkey, data, len, usage, &c);
- if(c.checksum.length != cksum->checksum.length) {
- krb5_set_error_string (context, "(INTERNAL ERROR) our checksum length was %d, but should be %d for checksum type %s",
- c.checksum.length, ct->checksumsize, ct->name);
- ret = KRB5KRB_AP_ERR_BAD_INTEGRITY;
- } else if (memcmp(c.checksum.data, cksum->checksum.data, c.checksum.length)) {
+ if(c.checksum.length != cksum->checksum.length ||
+ memcmp(c.checksum.data, cksum->checksum.data, c.checksum.length)) {
krb5_clear_error_string (context);
ret = KRB5KRB_AP_ERR_BAD_INTEGRITY;
} else {