Print this page
first pass

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/gss_mechs/mech_krb5/crypto/des/afsstring2key.c
          +++ new/usr/src/lib/gss_mechs/mech_krb5/crypto/des/afsstring2key.c
↓ open down ↓ 73 lines elided ↑ open up ↑
  74   74  #define min(a,b) ((a)>(b)?(b):(a))
  75   75  
  76   76  /*ARGSUSED*/
  77   77  krb5_error_code
  78   78  mit_afs_string_to_key (krb5_context context,
  79   79                      krb5_keyblock *keyblock, const krb5_data *data,
  80   80                      const krb5_data *salt)
  81   81  {
  82   82      /* Solaris Kerberos */
  83   83      krb5_error_code retval = KRB5_PROG_ETYPE_NOSUPP;
  84      -/* EXPORT DELETE START */
  85   84    /* totally different approach from MIT string2key. */
  86   85    /* much of the work has already been done by the only caller 
  87   86       which is mit_des_string_to_key; in particular, *keyblock is already 
  88   87       set up. */
  89   88    
  90   89      char *realm = salt->data;
  91   90      unsigned int i, j;
  92   91      krb5_octet *key = keyblock->contents;
  93   92      /* Solaris Kerberos */
  94   93      krb5_keyblock usekey;
↓ open down ↓ 83 lines elided ↑ open up ↑
 178  177        }
 179  178        /* clean & free the input string */
 180  179        memset(password, 0, (size_t) pw_len);
 181  180        krb5_xfree(password);
 182  181      }
 183  182  #if 0
 184  183      /* must free here because it was copied for this special case */
 185  184      krb5_xfree(salt->data);
 186  185  #endif
 187  186  
 188      -/* EXPORT DELETE END */
 189  187      return retval;
 190  188  }
 191  189  
 192  190  
 193  191  /* Portions of this code:
 194  192     Copyright 1989 by the Massachusetts Institute of Technology
 195  193     */
 196  194   
 197  195  /*
 198  196   * Copyright (c) 1990 Regents of The University of Michigan.
↓ open down ↓ 10 lines elided ↑ open up ↑
 209  207   * is without expressed or implied warranties of any kind.
 210  208   *
 211  209   *      ITD Research Systems
 212  210   *      University of Michigan
 213  211   *      535 W. William Street
 214  212   *      Ann Arbor, Michigan
 215  213   *      +1-313-936-2652
 216  214   *      netatalk@terminator.cc.umich.edu
 217  215   */
 218  216  
 219      -/* EXPORT DELETE START */
 220      -
 221  217  static void krb5_afs_crypt_setkey (char*, char*, char(*)[48]);
 222  218  static void krb5_afs_encrypt (char*,char*,char (*)[48]);
 223  219  
 224  220  /*
 225  221   * Initial permutation,
 226  222   */
 227  223  static const char       IP[] = {
 228  224          58,50,42,34,26,18,10, 2,
 229  225          60,52,44,36,28,20,12, 4,
 230  226          62,54,46,38,30,22,14, 6,
↓ open down ↓ 364 lines elided ↑ open up ↑
 595  591                  L[j] = R[j];
 596  592                  R[j] = t;
 597  593          }
 598  594          /*
 599  595           * The final output
 600  596           * gets the inverse permutation of the very original.
 601  597           */
 602  598          for (j=0; j<64; j++)
 603  599                  block[j] = L[FP[j]-1];
 604  600  }
 605      -/* EXPORT DELETE END */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX