Changeset b22170c


Ignore:
Timestamp:
Mar 1, 2010, 8:33:47 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.5
Children:
b381b55
Parents:
7d6a751
git-author:
Joshua Oreman <oremanj@MIT.EDU> (02/07/10 20:54:00)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/01/10 20:33:47)
Message:
Fix zcrypt when compiling without krb4

OpenSSL's "compatibility" DES API makes des_key_schedule a structure
containing an array, while in krb4 it was an array directly. Thus, we
need to pass a key schedule pointer to owl_zcrypt_string_to_schedule,
instead of passing the key schedule by value. The compatibility macros
defined in OpenSSL's des_old.h allow that function's passing of
*schedule to des_key_sched() to DTRT.

Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Nelson Elhage <nelhage@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zcrypt.c

    ra6ac9fe rb22170c  
    6363#define M_SETKEY          5
    6464
    65 static void owl_zcrypt_string_to_schedule(char *keystring, des_key_schedule schedule) {
     65static void owl_zcrypt_string_to_schedule(char *keystring, des_key_schedule *schedule) {
    6666#ifdef HAVE_KERBEROS_IV
    6767  des_cblock key;
     
    7171
    7272  des_string_to_key(keystring, key);
    73   des_key_sched(key, schedule);
     73  des_key_sched(key, *schedule);
    7474}
    7575
     
    103103  output[0] = '\0';    /* In case no message at all                 */
    104104
    105   owl_zcrypt_string_to_schedule(keystring, schedule);
     105  owl_zcrypt_string_to_schedule(keystring, &schedule);
    106106
    107107  inptr=in;
     
    142142  fclose(fkey);
    143143
    144   owl_zcrypt_string_to_schedule(keystring, schedule);
     144  owl_zcrypt_string_to_schedule(keystring, &schedule);
    145145
    146146  inbuff=in;
Note: See TracChangeset for help on using the changeset viewer.