crypto: Fixes for recent Heimdal changes
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 25 Mar 2011 17:34:51 +0000 (17:34 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 27 Mar 2011 05:18:42 +0000 (22:18 -0700)
The last Heimdal import changed the name of a number of structures
so that they are private to the krb5 code. Mirror this by changing our
prototypes to match the new names.

This solves the key_type problem that we previously fixed by #defining
key_type to hc_key_type, so remove that define.

Change-Id: I9b3f1712b0bf6641a780cc4002e73f8a511ff080
Reviewed-on: http://gerrit.openafs.org/4340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/crypto/hcrypto/kernel/config.h
src/crypto/rfc3961/kernel/algs.c
src/crypto/rfc3961/krb5_locl.h

index 6959ce1..29e9947 100644 (file)
 #define inline
 #endif
 
-/* Both Linux and hcrypto want to use 'struct key_type', so we rename our
- * local version */
-#define key_type hc_key_type
-
 /* We need wrappers for the various memory management functions */
 #define calloc _afscrypto_calloc
 void * _afscrypto_calloc(int, size_t);
index a623a5f..78dd8dd 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "krb5_locl.h"
 
-struct checksum_type *_krb5_checksum_types[] = {
+struct _krb5_checksum_type *_krb5_checksum_types[] = {
     &_krb5_checksum_sha1,
     &_krb5_checksum_hmac_sha1_aes128,
     &_krb5_checksum_hmac_sha1_aes256,
@@ -37,7 +37,7 @@ struct checksum_type *_krb5_checksum_types[] = {
 int _krb5_num_checksums
         = sizeof(_krb5_checksum_types) / sizeof(_krb5_checksum_types[0]);
 
-struct encryption_type *_krb5_etypes[] = {
+struct _krb5_encryption_type *_krb5_etypes[] = {
     &_krb5_enctype_aes256_cts_hmac_sha1,
     &_krb5_enctype_aes128_cts_hmac_sha1,
 };
index a3eae68..924dc89 100644 (file)
@@ -164,20 +164,22 @@ int ct_memcmp(const void *p1, const void *p2, size_t len);
 
 #include "crypto.h"
 
-struct checksum_type * _krb5_find_checksum (krb5_cksumtype);
-struct encryption_type * _krb5_find_enctype (krb5_enctype);
-void _krb5_free_key_data (krb5_context, struct key_data *,
-                         struct encryption_type *);
-void _krb5_evp_cleanup (krb5_context, struct key_data *);
-krb5_error_code _krb5_evp_encrypt (krb5_context, struct key_data *, void *,
-                                  size_t, krb5_boolean, int, void *);
-krb5_error_code _krb5_evp_encrypt_cts (krb5_context, struct key_data *,
+struct _krb5_checksum_type * _krb5_find_checksum (krb5_cksumtype);
+struct _krb5_encryption_type * _krb5_find_enctype (krb5_enctype);
+void _krb5_free_key_data (krb5_context, struct _krb5_key_data *,
+                         struct _krb5_encryption_type *);
+void _krb5_evp_cleanup (krb5_context, struct _krb5_key_data *);
+
+krb5_error_code _krb5_evp_encrypt (krb5_context, struct _krb5_key_data *,
+                                  void *, size_t, krb5_boolean, int,
+                                  void *);
+krb5_error_code _krb5_evp_encrypt_cts (krb5_context, struct _krb5_key_data *,
                                       void *,size_t, krb5_boolean,
                                       int, void *);
-void _krb5_evp_schedule (krb5_context, struct key_type *,struct key_data *);
-
+void _krb5_evp_schedule (krb5_context, struct _krb5_key_type *,
+                        struct _krb5_key_data *);
 krb5_error_code _krb5_SP_HMAC_SHA1_checksum (krb5_context,
-                                            struct key_data *,
+                                            struct _krb5_key_data *,
                                             const void *,
                                             size_t, unsigned, Checksum *);