亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mschapv2.c

?? 可以用作很多客戶端的XSUPPLICANT的源代碼。比如用在802.1x或者無線AP上
?? C
?? 第 1 頁 / 共 2 頁
字號:
/** * A client-side 802.1x implementation supporting EAP/TLS * * This code is released under both the GPL version 2 and BSD licenses. * Either license may be used.  The respective licenses are found below. * * Copyright (C) 2002 Bryan D. Payne & Nick L. Petroni Jr. * All Rights Reserved * * --- GPL Version 2 License --- * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * --- BSD License --- * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * *  - Redistributions of source code must retain the above copyright notice, *    this list of conditions and the following disclaimer. *  - Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. *  - All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *       This product includes software developed by the University of *       Maryland at College Park and its contributors. *  - Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *//******************************************************************* * EAPMSCHAPv2 Function implementations * * File: mschapv2.c * * Authors: Chris.Hessing@utah.edu * * $Id: mschapv2.c,v 1.7 2004/04/05 17:19:30 chessing Exp $ * $Date: 2004/04/05 17:19:30 $ * $Log: mschapv2.c,v $ * Revision 1.7  2004/04/05 17:19:30  chessing * * Added additional checks against pointers to try to help prevent segfaults.  (This still needs to be completed.)  Fixed a problem with PEAP where a NULL input packet would result in a huge unencrypted packet, and a segfault.  (This was triggered when using one of the gui password tools.  When the password was in the config file, it wouldn't be triggered.) * * Revision 1.6  2004/04/02 20:50:20  chessing * * Attempt to fix PEAP with IAS. At this point, we can get through the TLS piece of the PEAP authentication, and successfully attempt a phase 2 authentication.  But, for some reason MS-CHAPv2 is failing when used with IAS.  (But at least we are one step closer!)  Also, removed the des pieces that were needed for eap-mschapv2, since we can use the OpenSSL routines instead.  The proper way to handle DES was found while looking at the CVS code for wpa_supplicant.  The fix for phase 1 of PEAP was found while looking at the commit notes for wpa_supplicant.  (wpa_supplicant is part of hostap, and is written/maintained by Jouni Malinen.) * * Revision 1.5  2004/02/06 06:13:31  chessing * * Cleaned up some unneeded stuff in the configure.in file as per e-mail from Rakesh Patel.  Added all 12 patches from Jouni Malinen (Including wpa_supplicant patch, until we can add true wpa support in xsupplicant.) * * Revision 1.4  2003/11/27 02:33:25  chessing * * Added LEAP code from Marios Karagiannopoulos.  Keying still needs to be completed. * * Revision 1.3  2003/11/21 05:09:47  chessing * * PEAP now works! * * Revision 1.2  2003/11/20 00:05:32  chessing * * EAP-MSCHAPv2 now supports generation of keys.  (New feature) * * Revision 1.1.1.1  2003/11/19 04:13:28  chessing * New source tree * * *******************************************************************/// This code was taken from the pseudo code in RFC 2759.#include <openssl/ssl.h>#include <string.h>#include <strings.h>#include <ctype.h>#include <stdint.h>#include "../../xsup_debug.h"#include "../../xsup_err.h"void ChallengeHash(char *PeerChallenge, char *AuthenticatorChallenge,		   char *UserName, char *Challenge){  EVP_MD_CTX cntx;  char Digest[30];  int retLen;  if ((!PeerChallenge) || (!AuthenticatorChallenge) || (!UserName) ||      (!Challenge))    {      debug_printf(DEBUG_NORMAL, "Invalid data passed in to ChallengeHash()!\n");      return;    }  bzero(Digest, 30);  EVP_DigestInit(&cntx, EVP_sha1());  EVP_DigestUpdate(&cntx, PeerChallenge, 16);  EVP_DigestUpdate(&cntx, AuthenticatorChallenge, 16);  EVP_DigestUpdate(&cntx, UserName, strlen(UserName));  EVP_DigestFinal(&cntx, (char *)&Digest, &retLen);  memcpy(Challenge, Digest, 8);}char *to_unicode(char *non_uni){  char *retUni;  int i;  if (!non_uni)    {      debug_printf(DEBUG_NORMAL, "Invalid value passed in to to_unicode()!\n");      return NULL;    }  retUni = (char *)malloc((strlen(non_uni)+1)*2);  if (retUni == NULL)    {      debug_printf(DEBUG_NORMAL, "Error with MALLOC in to_unicode()!\n");      return NULL;    }  bzero(retUni, ((strlen(non_uni)+1)*2));  for (i=0; i<strlen(non_uni); i++)    {      retUni[(2*i)] = non_uni[i];    }  return retUni;}void NtPasswordHash(char *Password, char *PasswordHash){  EVP_MD_CTX cntx;  char retVal[20];  int i, len;  char *uniPassword;  if ((!Password) || (!PasswordHash))    {      debug_printf(DEBUG_NORMAL, "Invalid data passed in to NtPasswordHash()!\n");      return;    }  bzero(retVal, 20);  uniPassword = to_unicode(Password);  len = (strlen(Password))*2;  EVP_DigestInit(&cntx, EVP_md4());  EVP_DigestUpdate(&cntx, uniPassword, len);  EVP_DigestFinal(&cntx, (char *)&retVal, (int *)&i);  memcpy(PasswordHash, &retVal, 16);  free(uniPassword);}void HashNtPasswordHash(char *PasswordHash, char *PasswordHashHash){  EVP_MD_CTX cntx;  int i;  if ((!PasswordHash) || (!PasswordHashHash))    {      debug_printf(DEBUG_NORMAL, "Invalid values passed in to HashNtPasswordHash()!\n");      return;    }  EVP_DigestInit(&cntx, EVP_md4());  EVP_DigestUpdate(&cntx, PasswordHash, 16);  EVP_DigestFinal(&cntx, PasswordHashHash, &i);}// Shamelessly take from the hostap code written by Jouni Malinenvoid des_encrypt(uint8_t *clear, uint8_t *key, uint8_t *cypher){  uint8_t pkey[8], next, tmp;  int i;  DES_key_schedule ks;  if ((!clear) || (!key) || (!cypher))    {      debug_printf(DEBUG_NORMAL, "Invalid parameters passed to des_encrypt()!\n");      return;    }  /* Add parity bits to key */  next = 0;  for (i=0; i<7; i++)    {      tmp = key[i];      pkey[i] = (tmp >> i) | next | 1;      next = tmp << (7-i);    }  pkey[i] = next | 1;  DES_set_key(&pkey, &ks);  DES_ecb_encrypt((DES_cblock *) clear, (DES_cblock *) cypher, &ks,		  DES_ENCRYPT);}char ctonibble(char cnib){  char retVal=0x00;  char testval=0x00;  if ((cnib>='0') && (cnib<='9'))    {      retVal = cnib - '0';    } else {      testval = toupper(cnib);      if ((testval>='A') && (testval<='F'))	{	  retVal = ((testval - 'A') +10);	} else {	  debug_printf(DEBUG_NORMAL, "Error in conversion!  (Check ctonibble()) -- %02x\n",testval);	}    }  return retVal;}// Convert an ASCII string to a binary version of it.void process_hex(char *instr, int size, char *outstr){  int i;  if ((!instr) || (!outstr))    {      debug_printf(DEBUG_NORMAL, "Invalid parameter passed in to process_hex()!\n");      return;    }  // Make sure we don't try to convert something that isn't byte aligned.  if ((size % 2) != 0)    {      debug_printf(DEBUG_NORMAL, "Hex string isn't an even number of chars!!!\n");      return;    }  for (i=0;i<(size/2);i++)    {      if (instr[i*2] != 0x00)	{	  outstr[i] = (ctonibble(instr[i*2]) << 4) + ctonibble(instr[(i*2)+1]);	}    }}void GenerateAuthenticatorResponse(char *Password, char *NTResponse,				   char *PeerChallenge, 				   char *AuthenticatorChallenge, char *UserName,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区欧美一区| 久久综合九色欧美综合狠狠 | 综合久久国产九一剧情麻豆| 国产在线不卡视频| 国产清纯白嫩初高生在线观看91 | 国产精品乱码妇女bbbb| 国产麻豆成人传媒免费观看| 久久久www成人免费无遮挡大片| 国产综合久久久久影院| 国产欧美日韩在线| 色中色一区二区| 亚洲成人免费视频| 日韩视频不卡中文| 国产一区欧美日韩| 综合激情网...| 欧美亚一区二区| 天堂va蜜桃一区二区三区漫画版| 在线综合视频播放| 国产福利一区二区三区| 亚洲视频免费观看| 日韩一区二区在线免费观看| 国产一区二区三区日韩 | 欧美一三区三区四区免费在线看| 日韩高清不卡一区二区三区| 26uuu亚洲综合色| 成人禁用看黄a在线| 亚洲在线视频网站| 欧美成人性战久久| 91一区二区三区在线播放| 亚洲国产中文字幕在线视频综合| 精品噜噜噜噜久久久久久久久试看 | 精品一区二区三区在线播放视频| 久久久久久久久久久久久久久99 | 经典三级在线一区| 最新不卡av在线| 日韩精品一区国产麻豆| 91在线丨porny丨国产| 日av在线不卡| 亚洲人成精品久久久久久| 日韩午夜av一区| 99久久婷婷国产| 奇米影视在线99精品| 中文字幕综合网| 精品理论电影在线观看| 欧美亚洲自拍偷拍| 成人免费毛片a| 日本视频中文字幕一区二区三区| 国产精品黄色在线观看| 日韩一卡二卡三卡四卡| 在线亚洲高清视频| 成人理论电影网| 久久99久久久久| 亚洲丶国产丶欧美一区二区三区| 国产精品美女久久久久久久| 日韩欧美中文字幕精品| 欧美中文字幕一区二区三区| 成人午夜又粗又硬又大| 卡一卡二国产精品 | 91精品国产综合久久精品| av资源网一区| 国产一区二区三区免费在线观看| 男人的天堂亚洲一区| 亚洲成a人片在线不卡一二三区| 日韩一区在线免费观看| 欧美国产激情一区二区三区蜜月| 日韩三级在线观看| 欧美一区二区三区免费| 欧美影院一区二区三区| 色综合天天视频在线观看| 成人福利视频在线| 国产成人一区在线| 国产一区二区三区香蕉| 国内外成人在线| 麻豆国产欧美日韩综合精品二区| 日日欢夜夜爽一区| 午夜伦欧美伦电影理论片| 一区二区三区久久| 亚洲自拍偷拍麻豆| 亚洲一区在线电影| 亚洲一卡二卡三卡四卡无卡久久 | 精品国产亚洲一区二区三区在线观看| 欧美日韩在线亚洲一区蜜芽| 欧美综合亚洲图片综合区| 在线观看区一区二| 欧美影片第一页| 欧美日韩成人在线| 欧美疯狂做受xxxx富婆| 欧美一卡二卡三卡四卡| 日韩欧美视频一区| www国产精品av| 国产亚洲欧洲997久久综合| 国产视频亚洲色图| 国产日本欧美一区二区| 1000精品久久久久久久久| 国产精品不卡一区| 洋洋成人永久网站入口| 污片在线观看一区二区| 久久精品噜噜噜成人av农村| 国产经典欧美精品| 北条麻妃一区二区三区| 欧洲av在线精品| 欧美高清视频一二三区 | 国产肉丝袜一区二区| 国产精品午夜免费| 亚洲精品午夜久久久| 午夜精品一区二区三区免费视频| 免费成人在线观看视频| 国产福利一区二区三区| 在线这里只有精品| 欧美videossexotv100| 久久精品欧美日韩| 曰韩精品一区二区| 蜜桃视频一区二区三区在线观看 | 午夜精品福利在线| 久久99国产精品久久99| av一二三不卡影片| 9191国产精品| 久久久综合激的五月天| 亚洲美腿欧美偷拍| 久久99精品网久久| 99久久夜色精品国产网站| 777久久久精品| 国产日产欧美一区二区三区| 一区二区三区在线高清| 久久91精品久久久久久秒播| 99热精品国产| 欧美一区二区美女| 中文字幕亚洲视频| 免费观看91视频大全| 91色porny| 精品国产乱码久久久久久久久| 国产精品久久久久aaaa樱花 | 欧美撒尿777hd撒尿| 久久天天做天天爱综合色| 亚洲午夜电影网| av午夜一区麻豆| 日韩免费在线观看| 亚洲国产日韩在线一区模特 | 日韩专区欧美专区| 99精品视频中文字幕| 精品国产91乱码一区二区三区 | 欧美色网站导航| 国产性色一区二区| 麻豆视频一区二区| 欧美亚洲高清一区二区三区不卡| 国产精品麻豆久久久| 国模冰冰炮一区二区| 欧美精品1区2区3区| 亚洲一区在线电影| 9色porny自拍视频一区二区| 亚洲精品在线三区| 美女网站在线免费欧美精品| 91福利在线看| 中文字幕一区二区三区在线不卡| 精品一区二区三区在线播放 | 日韩欧美在线123| 亚洲成人一区在线| 欧美视频在线不卡| 亚洲欧美激情小说另类| 成人精品电影在线观看| 国产亲近乱来精品视频| 狠狠色综合日日| 精品欧美黑人一区二区三区| 日韩在线一二三区| 欧美男男青年gay1069videost | 亚洲成av人片一区二区梦乃| 91黄色在线观看| 亚洲精选免费视频| 91麻豆123| 亚洲精品中文字幕在线观看| 色婷婷精品久久二区二区蜜臀av| 亚洲欧美综合在线精品| 91小视频免费看| 中文字幕一区在线观看| 成人毛片老司机大片| 日韩伦理av电影| 色婷婷综合久久久久中文| 亚洲欧美日韩国产成人精品影院| aaa亚洲精品| 一区二区三区精品视频| 欧美一a一片一级一片| 亚洲v日本v欧美v久久精品| 欧美日本韩国一区| 六月婷婷色综合| 国产午夜精品一区二区三区视频| 夫妻av一区二区| 亚洲精品日韩综合观看成人91| 欧美综合一区二区| 免费观看日韩电影| 国产喂奶挤奶一区二区三区| 北条麻妃一区二区三区| 亚洲综合在线第一页| 欧美日韩精品一区视频| 麻豆精品一区二区三区| 久久久青草青青国产亚洲免观| 不卡的av电影| 亚洲一区二区五区| 日韩欧美一级二级三级| 成人黄色国产精品网站大全在线免费观看| 最近日韩中文字幕|