Print this page
3882 remove xmod & friends

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/sasl_plugins/digestmd5/digestmd5.c
          +++ new/usr/src/lib/sasl_plugins/digestmd5/digestmd5.c
↓ open down ↓ 55 lines elided ↑ open up ↑
  56   56  #include <stdlib.h>
  57   57  #include <stdio.h>
  58   58  #include <string.h>
  59   59  #ifndef macintosh
  60   60  #include <sys/types.h>
  61   61  #include <sys/stat.h>
  62   62  #endif
  63   63  #include <fcntl.h>
  64   64  #include <ctype.h>
  65   65  
  66      -/* EXPORT DELETE START */
  67   66  /* DES support */
  68   67  #ifdef WITH_DES
  69   68  # ifdef WITH_SSL_DES
  70   69  #  include <openssl/des.h>
  71   70  # else /* system DES library */
  72   71  #  include <des.h>
  73   72  # endif
  74   73  #endif /* WITH_DES */
  75      -/* EXPORT DELETE END */
  76   74  
  77   75  #ifdef WIN32
  78   76  # include <winsock.h>
  79   77  #else /* Unix */
  80   78  # include <netinet/in.h>
  81   79  #endif /* WIN32 */
  82   80  
  83   81  #ifdef _SUN_SDK_
  84   82  #include <unistd.h>
  85   83  #endif /* _SUN_SDK_ */
↓ open down ↓ 628 lines elided ↑ open up ↑
 714  712          endpair[0] = '\0';
 715  713          endpair++; /* skipping <,> */
 716  714      } else if (endpair[0] != '\0') { 
 717  715          *name = NULL;
 718  716          return;
 719  717      }
 720  718      
 721  719      *in = endpair;
 722  720  }
 723  721  
 724      -/* EXPORT DELETE START */
 725  722  #ifdef WITH_DES
 726  723  struct des_context_s {
 727  724      des_key_schedule keysched;  /* key schedule for des initialization */
 728  725      des_cblock ivec;            /* initial vector for encoding */
 729  726      des_key_schedule keysched2; /* key schedule for 3des initialization */
 730  727  };
 731  728  
 732  729  typedef struct des_context_s des_context_t;
 733  730  
 734  731  /* slide the first 7 bytes of 'inbuf' into the high seven bits of the
↓ open down ↓ 447 lines elided ↑ open up ↑
1182 1179      
1183 1180      /* encrypt the HMAC part */
1184 1181      rc4_encrypt((rc4_context_t *) text->cipher_enc_context, 
1185 1182                  (const char *) digest, 
1186 1183                  (output)+inputlen, 10);
1187 1184      
1188 1185      return SASL_OK;
1189 1186  }
1190 1187  
1191 1188  #endif /* WITH_RC4 */
1192      -/* EXPORT DELETE END */
1193 1189  
1194 1190  struct digest_cipher available_ciphers[] =
1195 1191  {
1196      -    /* EXPORT DELETE START */
1197 1192  #ifdef WITH_RC4
1198 1193      { "rc4-40", 40, 5, 0x01, &enc_rc4, &dec_rc4, &init_rc4, &free_rc4 },
1199 1194      { "rc4-56", 56, 7, 0x02, &enc_rc4, &dec_rc4, &init_rc4, &free_rc4 },
1200 1195      { "rc4", 128, 16, 0x04, &enc_rc4, &dec_rc4, &init_rc4, &free_rc4 },
1201 1196  #endif
1202 1197  #ifdef WITH_DES
1203 1198      { "des", 55, 16, 0x08, &enc_des, &dec_des, &init_des, &free_des },
1204 1199      { "3des", 112, 16, 0x10, &enc_3des, &dec_3des, &init_3des, &free_des },
1205 1200  #endif
1206      -    /* EXPORT DELETE END */
1207 1201      { NULL, 0, 0, 0, NULL, NULL, NULL, NULL }
1208 1202  };
1209 1203  
1210 1204  
1211 1205  #ifdef USE_UEF
1212 1206  DEFINE_STATIC_MUTEX(uef_init_mutex);
1213 1207  #define DES_CIPHER_INDEX        3
1214 1208  #define DES3_CIPHER_INDEX       4
1215 1209  
1216 1210  static int got_uef_slot = FALSE;
↓ open down ↓ 2464 lines elided ↑ open up ↑
3681 3675      
3682 3676      if (!stext || !utils) return;
3683 3677      
3684 3678      digestmd5_common_mech_dispose(conn_context, utils);
3685 3679  }
3686 3680  
3687 3681  static sasl_server_plug_t digestmd5_server_plugins[] =
3688 3682  {
3689 3683      {
3690 3684          "DIGEST-MD5",                   /* mech_name */
3691      -        /* EXPORT DELETE START */
3692 3685  #ifdef WITH_RC4
3693 3686          128,                            /* max_ssf */
3694 3687  #elif WITH_DES
3695 3688          112,
3696 3689  #else 
3697      -        /* EXPORT DELETE END */
3698 3690          0,
3699      -        /* EXPORT DELETE START */
3700 3691  #endif
3701      -        /* EXPORT DELETE END */
3702 3692          SASL_SEC_NOPLAINTEXT
3703 3693          | SASL_SEC_NOANONYMOUS
3704 3694          | SASL_SEC_MUTUAL_AUTH,         /* security_flags */
3705 3695          SASL_FEAT_ALLOWS_PROXY,         /* features */
3706 3696          NULL,                           /* glob_context */
3707 3697          &digestmd5_server_mech_new,     /* mech_new */
3708 3698          &digestmd5_server_mech_step,    /* mech_step */
3709 3699          &digestmd5_server_mech_dispose, /* mech_dispose */
3710 3700          &digestmd5_common_mech_free,    /* mech_free */
3711 3701          NULL,                           /* setpass */
↓ open down ↓ 60 lines elided ↑ open up ↑
3772 3762      }
3773 3763  
3774 3764      digestmd5_server_plugins[0].glob_context = reauth_cache;
3775 3765  
3776 3766  #ifdef _SUN_SDK_
3777 3767  #ifdef USE_UEF_CLIENT
3778 3768      digestmd5_server_plugins[0].max_ssf = uef_max_ssf;
3779 3769  #endif /* USE_UEF_CLIENT */
3780 3770  #endif /* _SUN_SDK_ */
3781 3771  
3782      -    /* EXPORT DELETE START */
3783      -    /* CRYPT DELETE START */
3784 3772  #ifdef _INTEGRATED_SOLARIS_
3785 3773      /*
3786 3774       * Let libsasl know that we are a "Sun" plugin so that privacy
3787 3775       * and integrity will be allowed.
3788 3776       */
3789 3777      REG_PLUG("DIGEST-MD5", digestmd5_server_plugins);
3790 3778  #endif /* _INTEGRATED_SOLARIS_ */
3791      -    /* CRYPT DELETE END */
3792      -    /* EXPORT DELETE END */
3793 3779  
3794 3780      *out_version = SASL_SERVER_PLUG_VERSION;
3795 3781      *pluglist = digestmd5_server_plugins;
3796 3782      *plugcount = 1;
3797 3783      
3798 3784      return SASL_OK;
3799 3785  }
3800 3786  
3801 3787  /*****************************  Client Section  *****************************/
3802 3788  
↓ open down ↓ 1368 lines elided ↑ open up ↑
5171 5157  
5172 5158      if (ctext->free_password) _plug_free_secret(utils, &ctext->password);
5173 5159  
5174 5160      digestmd5_common_mech_dispose(conn_context, utils);
5175 5161  }
5176 5162  
5177 5163  static sasl_client_plug_t digestmd5_client_plugins[] =
5178 5164  {
5179 5165      {
5180 5166          "DIGEST-MD5",
5181      -        /* EXPORT DELETE START */
5182 5167  #ifdef WITH_RC4                         /* mech_name */
5183 5168          128,                            /* max ssf */
5184 5169  #elif WITH_DES
5185 5170          112,
5186 5171  #else
5187      -        /* EXPORT DELETE END */
5188 5172          0,
5189      -        /* EXPORT DELETE START */
5190 5173  #endif
5191      -        /* EXPORT DELETE END */
5192 5174          SASL_SEC_NOPLAINTEXT
5193 5175          | SASL_SEC_NOANONYMOUS
5194 5176          | SASL_SEC_MUTUAL_AUTH,         /* security_flags */
5195 5177          SASL_FEAT_ALLOWS_PROXY,         /* features */
5196 5178          NULL,                           /* required_prompts */
5197 5179          NULL,                           /* glob_context */
5198 5180          &digestmd5_client_mech_new,     /* mech_new */
5199 5181          &digestmd5_client_mech_step,    /* mech_step */
5200 5182          &digestmd5_client_mech_dispose, /* mech_dispose */
5201 5183          &digestmd5_common_mech_free,    /* mech_free */
↓ open down ↓ 42 lines elided ↑ open up ↑
5244 5226          return SASL_NOMEM;
5245 5227      memset(reauth_cache->e, 0, reauth_cache->size * sizeof(reauth_entry_t));
5246 5228  
5247 5229      digestmd5_client_plugins[0].glob_context = reauth_cache;
5248 5230  #ifdef _SUN_SDK_
5249 5231  #ifdef USE_UEF_CLIENT
5250 5232      digestmd5_client_plugins[0].max_ssf = uef_max_ssf;
5251 5233  #endif /* USE_UEF_CLIENT */
5252 5234  #endif /* _SUN_SDK_ */
5253 5235  
5254      -    /* EXPORT DELETE START */
5255      -    /* CRYPT DELETE START */
5256 5236  #ifdef _INTEGRATED_SOLARIS_
5257 5237      /*
5258 5238       * Let libsasl know that we are a "Sun" plugin so that privacy
5259 5239       * and integrity will be allowed.
5260 5240       */
5261 5241      REG_PLUG("DIGEST-MD5", digestmd5_client_plugins);
5262 5242  #endif /* _INTEGRATED_SOLARIS_ */
5263      -    /* CRYPT DELETE END */
5264      -    /* EXPORT DELETE END */
5265 5243  
5266 5244      *out_version = SASL_CLIENT_PLUG_VERSION;
5267 5245      *pluglist = digestmd5_client_plugins;
5268 5246      *plugcount = 1;
5269 5247      
5270 5248      return SASL_OK;
5271 5249  }
5272 5250  
5273 5251  #ifdef _SUN_SDK_
5274 5252  #ifdef USE_UEF
↓ open down ↓ 159 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX