krb5 commit: Fix ASN.1 test secure cookie comparison
Greg Hudson
ghudson at mit.edu
Mon Mar 4 16:07:21 EST 2019
https://github.com/krb5/krb5/commit/59dd1bebbdfc13df4762030f063a171fdafed345
commit 59dd1bebbdfc13df4762030f063a171fdafed345
Author: Greg Hudson <ghudson at mit.edu>
Date: Mon Mar 4 11:07:45 2019 -0500
Fix ASN.1 test secure cookie comparison
One of the comparisons in ktest_equal_secure_cookie() was
tautological. Use scalar_equal() for consistency with other tests.
Also use scalar_equal() in ktest_equal_kkdcp_message().
src/tests/asn.1/ktest_equal.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tests/asn.1/ktest_equal.c b/src/tests/asn.1/ktest_equal.c
index 714cc43..98a7c79 100644
--- a/src/tests/asn.1/ktest_equal.c
+++ b/src/tests/asn.1/ktest_equal.c
@@ -1055,7 +1055,7 @@ ktest_equal_kkdcp_message(krb5_kkdcp_message *ref, krb5_kkdcp_message *var)
else if (ref == NULL || var == NULL) return FALSE;
p = p && data_eq(ref->kerb_message, var->kerb_message);
p = p && data_eq(ref->target_domain, var->target_domain);
- p = p && (ref->dclocator_hint == var->dclocator_hint);
+ p = p && scalar_equal(dclocator_hint);
return p;
}
@@ -1098,7 +1098,7 @@ ktest_equal_secure_cookie(krb5_secure_cookie *ref, krb5_secure_cookie *var)
if (ref == var) return TRUE;
else if (ref == NULL || var == NULL) return FALSE;
p = p && ktest_equal_sequence_of_pa_data(ref->data, var->data);
- p = p && ref->time == ref->time;
+ p = p && scalar_equal(time);
return p;
}
More information about the cvs-krb5
mailing list