Add structure magic numbers
authorTheodore Tso <tytso@mit.edu>
Tue, 4 Oct 1994 19:14:06 +0000 (19:14 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 4 Oct 1994 19:14:06 +0000 (19:14 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4438 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/ChangeLog
src/include/krb5/encryption.h
src/lib/crypto/des/cs_entry.c
src/lib/crypto/md4/md4glue.c
src/lib/crypto/md5/md5glue.c

index 04832224d1b3f3653ca0c1fa6ac9a2e2a6068f97..1567c36d890f3a4ca75a4b345cc5843fd31ff152 100644 (file)
@@ -1,3 +1,7 @@
+Tue Oct  4 14:51:32 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+* encryption.h: Add magic number to encryption structures.
+
 Mon Oct  3 18:45:55 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * kdb.h: Add magic number to _krb5_db_entry.  (This among other
index 08d602471aa383947f3431e7c39fbc7ec8641fcd..5305870db0eff6ae5c6616e75e38fcfe0bb5e7b6 100644 (file)
 #define KRB5_ENCRYPTION__
 
 typedef struct _krb5_keyblock {
+    krb5_magic magic;
     krb5_keytype keytype;
     int length;
     krb5_octet *contents;
 } krb5_keyblock;
 
 typedef struct _krb5_checksum {
+    krb5_magic magic;
     krb5_cksumtype checksum_type;      /* checksum type */
     int length;
     krb5_octet *contents;
 } krb5_checksum;
 
 typedef struct _krb5_encrypt_block {
+    krb5_magic magic;
     struct _krb5_cryptosystem_entry *crypto_entry;
     krb5_keyblock *key;
     krb5_pointer priv;                 /* for private use, e.g. DES
@@ -48,6 +51,7 @@ typedef struct _krb5_encrypt_block {
 } krb5_encrypt_block;
 
 typedef struct _krb5_enc_data {
+    krb5_magic magic;
     krb5_enctype etype;
     krb5_kvno kvno;
     krb5_data ciphertext;
@@ -57,6 +61,7 @@ typedef struct _krb5_enc_data {
 
 /* could be used in a table to find an etype and initialize a block */
 typedef struct _krb5_cryptosystem_entry {
+    krb5_magic magic;
     krb5_error_code (*encrypt_func) NPROTOTYPE((krb5_const_pointer /* in */,
                                               krb5_pointer /* out */,
                                               const size_t,
@@ -93,12 +98,14 @@ typedef struct _krb5_cryptosystem_entry {
 #include <krb5/narrow.h>
 
 typedef struct _krb5_cs_table_entry {
+    krb5_magic magic;
     krb5_cryptosystem_entry *system;
     krb5_pointer random_sequence;      /* from init_random_key() */
 } krb5_cs_table_entry;
 
 /* could be used in a table to find a sumtype */
 typedef struct _krb5_checksum_entry {
+    krb5_magic magic;
     krb5_error_code  (*sum_func) NPROTOTYPE ((krb5_pointer /* in */,
                                             size_t /* in_length */,
                                             krb5_pointer /* key/seed */,
index e17f0f8bd37b5751f4af32c6bed97948c187c878..8baa8778ff3a3c5e40c86f97d09b4e271988d2df 100644 (file)
@@ -32,6 +32,7 @@
 #include "des_int.h"
 
 static krb5_cryptosystem_entry mit_raw_des_cryptosystem_entry = {
+    0,
     mit_raw_des_encrypt_func,
     mit_raw_des_decrypt_func,
     mit_des_process_key,
@@ -48,6 +49,7 @@ static krb5_cryptosystem_entry mit_raw_des_cryptosystem_entry = {
     };
 
 static krb5_cryptosystem_entry mit_des_cryptosystem_entry = {
+    0,
     mit_des_encrypt_func,
     mit_des_decrypt_func, 
     mit_des_process_key,
@@ -64,11 +66,13 @@ static krb5_cryptosystem_entry mit_des_cryptosystem_entry = {
     };
 
 krb5_cs_table_entry krb5_raw_des_cst_entry = {
+    0,
     &mit_raw_des_cryptosystem_entry,
     0
     };
 
 krb5_cs_table_entry krb5_des_cst_entry = {
+    0,
     &mit_des_cryptosystem_entry,
     0
     };
@@ -81,6 +85,7 @@ extern krb5_error_code mit_des_cbc_checksum PROTOTYPE ((krb5_pointer ,
 
 
 krb5_checksum_entry krb5_des_cbc_cksumtable_entry = {
+    0,
     mit_des_cbc_checksum,
     sizeof(mit_des_cblock),
     1,                                 /* is collision proof */
index 457dbea651906e3f90c2d0cc10ec9ded427110b1..d9449f9de128710a3ace9ec3cf47517ffbe628ee 100644 (file)
@@ -54,6 +54,7 @@ krb5_checksum *outcksum;
 }
 
 krb5_checksum_entry rsa_md4_cksumtable_entry = {
+    0,
     md4_sum_func,
     RSA_MD4_CKSUM_LENGTH,
     1,                                 /* is collision proof */
index 97512b2e1f72af9ba3e3905ca71feb3ecf665331..439fcb45de22de4ef38a7f95b8200e0c2e32271d 100644 (file)
@@ -27,6 +27,7 @@ krb5_checksum *outcksum;
 }
 
 krb5_checksum_entry rsa_md5_cksumtable_entry = {
+    0,
     md5_sum_func,
     RSA_MD5_CKSUM_LENGTH,
     1,                                 /* is collision proof */