+2001-10-24 Ezra Peisach <epeisach@mit.edu>
+
+ * t_encrypt.c: Argument to krb5_c_encrypt_length must be size_t
+ instead of int (which is the length in krb5_data) or unaligned
+ access occurs on Dec OSF machines.
+
2001-10-23 Sam Hartman <hartmans@mit.edu>
* Makefile.in (RUN_SETUP): Include so make check works correctly
krb5_context context ;
krb5_data in, out, check;
int i;
+ size_t len;
krb5_enc_data enc_out;
krb5_error_code retval;
krb5_keyblock key;
printf ("Testing enctype %d\n", enctype);
test ("Generating random key",
krb5_c_make_random_key (context, enctype, &key));
- enc_out.ciphertext = out;
- krb5_c_encrypt_length (context, key.enctype, in.length, &enc_out.ciphertext.length);
+ enc_out.ciphertext.data = out.data;
+ enc_out.ciphertext.length = out.length;
+ /* We use an intermediate `len' because size_t may be different size
+ than `int' */
+ krb5_c_encrypt_length (context, key.enctype, in.length, &len);
+ enc_out.ciphertext.length = len;
test ("Encrypting",
krb5_c_encrypt (context, &key, 7, 0, &in, &enc_out));
test ("Decrypting",