From 5088347b9dfab7eca7e5395e10af74079b55c832 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 5 Dec 1998 05:45:10 +0000 Subject: [PATCH] Added KRB5_DLLIMP and KRB5_CALLCONV so that these files build under Windows. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11069 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/checksum_length.c | 2 +- src/lib/crypto/coll_proof_cksum.c | 3 +- src/lib/crypto/enctype_compare.c | 2 +- src/lib/crypto/keyed_checksum_types.c | 4 +-- src/lib/crypto/keyed_cksum.c | 3 +- src/lib/crypto/make_checksum.c | 2 +- src/lib/crypto/old_api_glue.c | 45 ++++++++++++++++++--------- src/lib/crypto/prng.c | 4 +-- src/lib/crypto/valid_cksumtype.c | 3 +- src/lib/crypto/valid_enctype.c | 3 +- src/lib/crypto/verify_checksum.c | 2 +- 11 files changed, 46 insertions(+), 27 deletions(-) diff --git a/src/lib/crypto/checksum_length.c b/src/lib/crypto/checksum_length.c index 38773cae0..ee89fe851 100644 --- a/src/lib/crypto/checksum_length.c +++ b/src/lib/crypto/checksum_length.c @@ -27,7 +27,7 @@ #include "k5-int.h" #include "cksumtypes.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_checksum_length(context, cksumtype, length) krb5_context context; krb5_cksumtype cksumtype; diff --git a/src/lib/crypto/coll_proof_cksum.c b/src/lib/crypto/coll_proof_cksum.c index 07925c641..31bf1feb8 100644 --- a/src/lib/crypto/coll_proof_cksum.c +++ b/src/lib/crypto/coll_proof_cksum.c @@ -27,7 +27,8 @@ #include "k5-int.h" #include "cksumtypes.h" -krb5_boolean is_coll_proof_cksum(ctype) +KRB5_DLLIMP krb5_boolean KRB5_CALLCONV +is_coll_proof_cksum(ctype) krb5_cksumtype ctype; { int i; diff --git a/src/lib/crypto/enctype_compare.c b/src/lib/crypto/enctype_compare.c index 897258968..25bcaceb4 100644 --- a/src/lib/crypto/enctype_compare.c +++ b/src/lib/crypto/enctype_compare.c @@ -27,7 +27,7 @@ #include "k5-int.h" #include "etypes.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_enctype_compare(context, e1, e2, similar) krb5_context context; krb5_enctype e1; diff --git a/src/lib/crypto/keyed_checksum_types.c b/src/lib/crypto/keyed_checksum_types.c index cf0b736f2..aeb1e8fcd 100644 --- a/src/lib/crypto/keyed_checksum_types.c +++ b/src/lib/crypto/keyed_checksum_types.c @@ -46,7 +46,7 @@ static int etype_match(e1, e2) (krb5_enctypes_list[i1].enc == krb5_enctypes_list[i2].enc)); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_keyed_checksum_types(context, enctype, count, cksumtypes) krb5_context context; krb5_enctype enctype; @@ -83,7 +83,7 @@ krb5_c_keyed_checksum_types(context, enctype, count, cksumtypes) return(0); } -void +KRB5_DLLIMP void KRB5_CALLCONV krb5_free_cksumtypes(context, val) krb5_context context; krb5_cksumtype FAR * val; diff --git a/src/lib/crypto/keyed_cksum.c b/src/lib/crypto/keyed_cksum.c index 0ff6d3e38..39979c056 100644 --- a/src/lib/crypto/keyed_cksum.c +++ b/src/lib/crypto/keyed_cksum.c @@ -27,7 +27,8 @@ #include "k5-int.h" #include "cksumtypes.h" -krb5_boolean is_keyed_cksum(ctype) +KRB5_DLLIMP krb5_boolean KRB5_CALLCONV +is_keyed_cksum(ctype) krb5_cksumtype ctype; { int i; diff --git a/src/lib/crypto/make_checksum.c b/src/lib/crypto/make_checksum.c index b2faef191..2be79ccb4 100644 --- a/src/lib/crypto/make_checksum.c +++ b/src/lib/crypto/make_checksum.c @@ -28,7 +28,7 @@ #include "cksumtypes.h" #include "etypes.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_make_checksum(context, cksumtype, key, usage, input, cksum) krb5_context context; krb5_cksumtype cksumtype; diff --git a/src/lib/crypto/old_api_glue.c b/src/lib/crypto/old_api_glue.c index 64be9b889..ff8921a75 100644 --- a/src/lib/crypto/old_api_glue.c +++ b/src/lib/crypto/old_api_glue.c @@ -26,7 +26,8 @@ #include "k5-int.h" -krb5_error_code krb5_encrypt(context, inptr, outptr, size, eblock, ivec) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_encrypt(context, inptr, outptr, size, eblock, ivec) krb5_context context; krb5_const krb5_pointer inptr; krb5_pointer outptr; @@ -64,7 +65,8 @@ krb5_error_code krb5_encrypt(context, inptr, outptr, size, eblock, ivec) &inputd, &outputd)); } -krb5_error_code krb5_decrypt(context, inptr, outptr, size, eblock, ivec) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_decrypt(context, inptr, outptr, size, eblock, ivec) krb5_context context; krb5_const krb5_pointer inptr; krb5_pointer outptr; @@ -100,7 +102,8 @@ krb5_error_code krb5_decrypt(context, inptr, outptr, size, eblock, ivec) &inputd, &outputd)); } -krb5_error_code krb5_process_key(context, eblock, key) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_process_key(context, eblock, key) krb5_context context; krb5_encrypt_block FAR * eblock; krb5_const krb5_keyblock FAR * key; @@ -110,14 +113,16 @@ krb5_error_code krb5_process_key(context, eblock, key) return(0); } -krb5_error_code krb5_finish_key(context, eblock) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_finish_key(context, eblock) krb5_context context; krb5_encrypt_block FAR * eblock; { return(0); } -krb5_error_code krb5_string_to_key(context, eblock, keyblock, data, salt) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_string_to_key(context, eblock, keyblock, data, salt) krb5_context context; krb5_const krb5_encrypt_block FAR * eblock; krb5_keyblock FAR * keyblock; @@ -128,7 +133,8 @@ krb5_error_code krb5_string_to_key(context, eblock, keyblock, data, salt) keyblock)); } -krb5_error_code krb5_init_random_key(context, eblock, keyblock, ptr) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_init_random_key(context, eblock, keyblock, ptr) krb5_context context; krb5_const krb5_encrypt_block FAR * eblock; krb5_const krb5_keyblock FAR * keyblock; @@ -142,7 +148,8 @@ krb5_error_code krb5_init_random_key(context, eblock, keyblock, ptr) return(krb5_c_random_seed(context, &data)); } -krb5_error_code krb5_finish_random_key(context, eblock, ptr) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_finish_random_key(context, eblock, ptr) krb5_context context; krb5_const krb5_encrypt_block FAR * eblock; krb5_pointer FAR * ptr; @@ -150,7 +157,8 @@ krb5_error_code krb5_finish_random_key(context, eblock, ptr) return(0); } -krb5_error_code krb5_random_key(context, eblock, ptr, keyblock) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_random_key(context, eblock, ptr, keyblock) krb5_context context; krb5_const krb5_encrypt_block FAR * eblock; krb5_pointer ptr; @@ -170,14 +178,16 @@ krb5_error_code krb5_random_key(context, eblock, ptr, keyblock) return(ret); } -krb5_enctype krb5_eblock_enctype(context, eblock) +KRB5_DLLIMP krb5_enctype KRB5_CALLCONV +krb5_eblock_enctype(context, eblock) krb5_context context; krb5_const krb5_encrypt_block FAR * eblock; { return(eblock->crypto_entry); } -krb5_error_code krb5_use_enctype(context, eblock, enctype) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_use_enctype(context, eblock, enctype) krb5_context context; krb5_encrypt_block FAR * eblock; krb5_const krb5_enctype enctype; @@ -187,7 +197,8 @@ krb5_error_code krb5_use_enctype(context, eblock, enctype) return(0); } -size_t krb5_encrypt_size(length, crypto) +KRB5_DLLIMP size_t KRB5_CALLCONV +krb5_encrypt_size(length, crypto) size_t length; krb5_enctype crypto; { @@ -199,7 +210,8 @@ size_t krb5_encrypt_size(length, crypto) return(ret); } -size_t krb5_checksum_size(context, ctype) +KRB5_DLLIMP size_t KRB5_CALLCONV +krb5_checksum_size(context, ctype) krb5_context context; krb5_cksumtype ctype; { @@ -211,7 +223,8 @@ size_t krb5_checksum_size(context, ctype) return(ret); } -krb5_error_code krb5_calculate_checksum(context, ctype, in, in_length, +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_calculate_checksum(context, ctype, in, in_length, seed, seed_length, outcksum) krb5_context context; krb5_const krb5_cksumtype ctype; @@ -251,7 +264,8 @@ krb5_error_code krb5_calculate_checksum(context, ctype, in, in_length, return(0); } -krb5_error_code krb5_verify_checksum(context, ctype, cksum, in, in_length, +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_verify_checksum(context, ctype, cksum, in, in_length, seed, seed_length) krb5_context context; krb5_cksumtype ctype; @@ -282,7 +296,8 @@ krb5_error_code krb5_verify_checksum(context, ctype, cksum, in, in_length, return(0); } -krb5_error_code krb5_random_confounder(size, ptr) +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV +krb5_random_confounder(size, ptr) size_t size; krb5_pointer ptr; { diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index 2d4f6647d..57b2d36ba 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -58,7 +58,7 @@ static unsigned char *random_state; #define NEWSTATE (KEYCONTENTS+keylength) #define ALLSTATESIZE (keybytes+blocksize*2+keylength+keybytes+blocksize) -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_random_seed(krb5_context context, krb5_data *data) { unsigned char *fold_input; @@ -93,7 +93,7 @@ krb5_c_random_seed(krb5_context context, krb5_data *data) return(0); } -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_random_make_octets(krb5_context context, krb5_data *data) { krb5_error_code ret; diff --git a/src/lib/crypto/valid_cksumtype.c b/src/lib/crypto/valid_cksumtype.c index 24108a3ec..68000bedf 100644 --- a/src/lib/crypto/valid_cksumtype.c +++ b/src/lib/crypto/valid_cksumtype.c @@ -27,7 +27,8 @@ #include "k5-int.h" #include "cksumtypes.h" -krb5_boolean valid_cksumtype(ctype) +KRB5_DLLIMP krb5_boolean KRB5_CALLCONV +valid_cksumtype(ctype) krb5_cksumtype ctype; { int i; diff --git a/src/lib/crypto/valid_enctype.c b/src/lib/crypto/valid_enctype.c index 03944c068..39e48c0d7 100644 --- a/src/lib/crypto/valid_enctype.c +++ b/src/lib/crypto/valid_enctype.c @@ -27,7 +27,8 @@ #include "k5-int.h" #include "etypes.h" -krb5_boolean valid_enctype(etype) +KRB5_DLLIMP krb5_boolean KRB5_CALLCONV +valid_enctype(etype) krb5_enctype etype; { int i; diff --git a/src/lib/crypto/verify_checksum.c b/src/lib/crypto/verify_checksum.c index f2749c8de..c25e921a8 100644 --- a/src/lib/crypto/verify_checksum.c +++ b/src/lib/crypto/verify_checksum.c @@ -27,7 +27,7 @@ #include "k5-int.h" #include "cksumtypes.h" -krb5_error_code +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_c_verify_checksum(context, key, usage, data, cksum, valid) krb5_context context; krb5_const krb5_keyblock *key; -- 2.26.2