From fad1d6e48be12a7abe8dd80a9101780ace141bc3 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Fri, 7 Jul 1995 20:55:05 +0000 Subject: [PATCH] Add checksum verifier dispatch in checksum entry git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6246 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 6 ++++++ src/include/krb5.hin | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 6d39c6231..9235c7533 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,9 @@ + +Fri Jul 7 15:56:49 EDT 1995 Paul Park (pjpark@mit.edu) + * krb5.hin - Add checksum verifier dispatch in the checksum entry. + This is now the supported method for verifying checksums. Also + add krb5_verify_checksum which uses this dispatch. + Thu Jul 6 17:19:26 1995 Tom Yu * krb5.hin: Change definition of krb5_os_localaddr to include diff --git a/src/include/krb5.hin b/src/include/krb5.hin index f750acb69..ada092c4d 100644 --- a/src/include/krb5.hin +++ b/src/include/krb5.hin @@ -361,9 +361,17 @@ typedef krb5_error_code (*SUM_FUNC) KRB5_NPROTOTYPE ( size_t /* key/seed size */, krb5_checksum FAR * /* out_cksum */)); +typedef krb5_error_code (*SUM_VERF_FUNC) KRB5_NPROTOTYPE ( + (krb5_checksum FAR * /* out_cksum */, + krb5_pointer /* in */, + size_t /* in_length */, + krb5_pointer /* key/seed */, + size_t /* key/seed size */)); + typedef struct _krb5_checksum_entry { krb5_magic magic; - SUM_FUNC sum_func; + SUM_FUNC sum_func; /* Checksum generator */ + SUM_VERF_FUNC sum_verf_func; /* Verifier of checksum */ int checksum_length; /* length of stuff returned by sum_func */ unsigned int is_collision_proof:1; @@ -451,6 +459,7 @@ extern int krb5_max_cksum; /* max entry in array */ */ #define krb5_checksum_size(context, ctype) (krb5_cksumarray[ctype]->checksum_length) #define krb5_calculate_checksum(context, ctype, in, in_length, seed, seed_length, outcksum) ((*krb5_cksumarray[ctype]->sum_func)(in, in_length, seed, seed_length, outcksum)) +#define krb5_verify_checksum(context, ctype, cksum, in, in_length, seed, seed_length) ((*krb5_cksumarray[ctype]->sum_verf_func)(cksum, in, in_length, seed, seed_length)) /* * end "encryption.h" -- 2.26.2