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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sm_handler.c

?? 可以用作很多客戶端的XSUPPLICANT的源代碼。比如用在802.1x或者無線AP上
?? C
?? 第 1 頁 / 共 2 頁
字號:
/** * A client-side 802.1x implementation supporting EAP/SIM * * 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) 2003 Chris Hessing * 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. *//******************************************************************** EAPOL Function implementations for supplicant *  * File: sm_handler.c * * Authors: Chris.Hessing@utah.edu * * $Id: sm_handler.c,v 1.8 2004/05/23 03:48:01 chessing Exp $ * $Date: 2004/05/23 03:48:01 $ * $Log: sm_handler.c,v $ * Revision 1.8  2004/05/23 03:48:01  chessing * * Small fix to EAP-SIM code to make it work correctly. * * Revision 1.7  2004/04/13 22:13:30  chessing * * Additional error checking in all eap methods. * * Revision 1.6  2004/02/07 07:19:37  chessing * * Fixed EAP-SIM so that it works with FreeRADIUS correctly.  Fixed a bunch of memory leaks in the EAP-SIM, and related code. * * Revision 1.5  2004/01/20 00:07:07  chessing * * EAP-SIM fixes. * * Revision 1.4  2004/01/13 01:55:56  chessing * * Major changes to EAP related code.  We no longer pass in an interface_data struct to EAP handlers.  Instead, we hand in a generic_eap_data struct which containsnon-interface specific information.  This will allow EAP types to be reused as phase 2 type easier.  However, this new code may create issues with EAP types that make use of the identity in the eap type.  Somehow, the identity value needs to propigate down to the EAP method.  It currently does not.  This should be any easy fix, but more testing will be needed. * * Revision 1.3  2003/12/14 06:11:03  chessing * * Fixed some stuff with SIM in relation to the new config structures.  Cleaned out CR/LF from LEAP source files.  Added user certificate support to TTLS and PEAP. Some additions to the IPC code. (Not tested yet.) * * Revision 1.2  2003/11/29 04:46:02  chessing * * EAP-SIM changes : EAP-SIM will now try to use the IMSI as the username, when the preferred EAP type is SIM, and the username value is NULL.  Also, if simautogen is TRUE, then we will also build and attach a realm as specified in the RFC. * * Revision 1.1  2003/11/24 02:14:08  chessing * * Added EAP-SIM (draft 11 still needs work), various small changes to eap calls, new hex dump code including ASCII dump (used mostly for dumping frames) * * *******************************************************************//******************************************************************* * * The development of the EAP/SIM support was funded by Internet * Foundation Austria (http://www.nic.at/ipa) * *******************************************************************//* Interface to Smart Cards using PCSC with 802.1x.  *//* Taken from code by Michael Haberler    mah@eunet.at *//* which was based on work by marek@bmlv.gv.at */#ifdef EAP_SIM_ENABLE#include <stdio.h>#include <winscard.h>#include <ctype.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include "../mschapv2/mschapv2.h"  // Needed for ctonibble function.#include "profile.h"#include "config.h"#include "eap.h"#include "xsup_debug.h"#include "xsup_err.h"#include "sm_handler.h"int need_init = 1;   // By default, we need an init to start with.#ifndef SCDEBUG#define SCDEBUG  1#endif#define MAXBUFF  (512)#define SELECT_MF       "A0A40000023F00"#define SELECT_DF_GSM   "A0A40000027F20"#define SELECT_EF_IMSI  "A0A40000026F07"#define RUN_GSM         "A088000010"#define GET_IMSI        "A0B0000009"char *o_readername;SCARDCONTEXT g_sc_context;SCARDHANDLE g_card_hdl = 0;SCARD_IO_REQUEST scir;unsigned long o_stdprotocol;DWORD readerstrlen;int debug;void print_sc_error(long err){  switch (err)    {    case SCARD_S_SUCCESS:      printf("Successful card call!\n");      break;    case SCARD_E_CANCELLED:      printf("Error : Card Request Cancelled!\n");      break;    case SCARD_E_CANT_DISPOSE:      printf("Error : Can't dispose (!?)\n");      break;    case SCARD_E_INSUFFICIENT_BUFFER:      printf("Error : Insufficient Buffer\n");      break;    case SCARD_E_INVALID_ATR:      printf("Error : Invalid ATR\n");      break;    case SCARD_E_INVALID_HANDLE:      printf("Error : Invalid handle\n");      break;    case SCARD_E_INVALID_PARAMETER:      printf("Error : Invalid parameter\n");      break;    case SCARD_E_INVALID_TARGET:      printf("Error : Invalid target\n");      break;    case SCARD_E_INVALID_VALUE:      printf("Error : Invalid Value\n");      break;    case SCARD_E_NO_MEMORY:      printf("Error : No memory\n");      break;    case SCARD_F_COMM_ERROR:      printf("Error : Communication error \n");      break;    case SCARD_F_INTERNAL_ERROR:      printf("Error : Internal error\n");      break;    case SCARD_F_WAITED_TOO_LONG:      printf("Error : Waited too long\n");      break;    case SCARD_E_UNKNOWN_READER:      printf("Error : Unknown reader\n");      break;    case SCARD_E_TIMEOUT:      printf("Error : Timeout\n");      break;    case SCARD_E_SHARING_VIOLATION:      printf("Error : Sharing Violation\n");      break;    case SCARD_E_NO_SMARTCARD:      printf("Error : No smartcard!\n");      break;    case SCARD_E_UNKNOWN_CARD:      printf("Error : Unknown card!\n");      break;    case SCARD_E_PROTO_MISMATCH:      printf("Error : Protocol mismatch!\n");      break;    case SCARD_E_NOT_READY:      printf("Error : Not ready!\n");      break;    case SCARD_E_SYSTEM_CANCELLED:      printf("Error : System Cancelled\n");      break;    case SCARD_E_NOT_TRANSACTED:      printf("Error : Not Transacted\n");      break;    case SCARD_E_READER_UNAVAILABLE:      printf("Error : Reader unavailable\n");      break;    case SCARD_F_UNKNOWN_ERROR:    default:      printf("Unknown error!\n");      break;    }}void strtohex(char *instr, char *outstr, int *blen){  int i;  char val1,val2;  if ((!instr) || (!outstr) || (!blen))    {      debug_printf(DEBUG_NORMAL, "Invalid data passed to strtohex()!\n");      return;    }  for (i=0;i<(strlen(instr)/2);i++)    {      val1=ctonibble(instr[i*2]);      val2=ctonibble(instr[(i*2)+1]);      outstr[i]=((val1<<4)+val2);    }  *blen = (strlen(instr)/2);}  int card_io(char *cmd, LPBYTE outbuff, LPDWORD olen){  static char g_getresponse[5]= {0xa0,0xc0,0x00,0x00 };  int cmdlen, ret;  char *bcmd;  if (!cmd)    {      debug_printf(DEBUG_NORMAL, "Invalid command passed to card_io()!\n");      return XESIMBADCMD;    }  cmdlen = strlen(cmd)/2;  bcmd = (char *)malloc(cmdlen);  // Get a little more than we need.  if (bcmd == NULL) return -1;  strtohex(cmd, bcmd, &cmdlen);  ret=SCardTransmit(g_card_hdl,		    o_stdprotocol==SCARD_PROTOCOL_T1 ? 		    SCARD_PCI_T1 : SCARD_PCI_T0,		    bcmd, cmdlen, &scir,		    (BYTE *) outbuff,olen);  free(bcmd);  bcmd = NULL;  if (ret != 0)    {      print_sc_error(ret);      return ret;    }    if (*olen==2) {    switch ((unsigned char)outbuff[0]) {    case 0x61:    case 0x9f:      if (outbuff[1]==0)         {          break;        }      g_getresponse[4]=outbuff[1];      *olen=MAXBUFF;      ret=SCardTransmit(g_card_hdl,			o_stdprotocol==SCARD_PROTOCOL_T1 ? SCARD_PCI_T1 : SCARD_PCI_T0,			g_getresponse,sizeof(g_getresponse),&scir,			(BYTE *)outbuff,olen);  if (ret != 0)    {      print_sc_error(ret);      return ret;    }    }  }  return 0;}unsigned charhinibble(unsigned char c){  unsigned char k;  k = (c >> 4) & 0x0f;  if (k == 0x0f)    return 0;  else    return (k + '0');}unsigned charlonibble(unsigned char c){  unsigned char k;  k = c & 0x0f;  if (k == 0x0f)    return 0;  else    return (k + '0');}int do_gsm(unsigned char *challenge, unsigned char *response, 	   unsigned char *ckey){  unsigned char buf[MAXBUFF], buff2[MAXBUFF], buff3[MAXBUFF];  int i;  DWORD len;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
污片在线观看一区二区| 亚洲精品在线三区| 日韩精品中文字幕一区二区三区 | 国产蜜臀av在线一区二区三区| 一区在线观看视频| 国产乱码一区二区三区| 91精品国产乱码| 一区二区三区产品免费精品久久75 | 天堂av在线一区| 成人免费毛片片v| 久久影视一区二区| 日韩精品国产精品| 日本乱人伦aⅴ精品| 亚洲欧洲精品天堂一级 | 国产日韩欧美电影| 激情欧美一区二区| 日韩一级完整毛片| 日本一道高清亚洲日美韩| 在线一区二区三区四区五区| 中国色在线观看另类| 国产揄拍国内精品对白| 欧美一区二区在线免费播放| 丝袜美腿亚洲色图| 欧美精品亚洲一区二区在线播放| 一区二区三区高清不卡| 91久久精品一区二区三| 亚洲伦理在线精品| 在线观看免费一区| 一个色综合av| 欧美日韩极品在线观看一区| 亚洲bdsm女犯bdsm网站| 欧美美女直播网站| 日韩avvvv在线播放| 日韩一区二区免费在线电影| 日韩福利视频导航| 精品久久人人做人人爱| 国产精品888| 国产精品久久久久影视| 色综合久久天天| 一区二区免费在线播放| 911精品产国品一二三产区| 美国精品在线观看| 久久久久国产成人精品亚洲午夜| 成人免费va视频| 亚洲一区二区三区小说| 欧美一级一区二区| 国产精品自在在线| 国产精品成人免费| 色94色欧美sute亚洲13| 亚洲高清中文字幕| 精品免费99久久| 成人精品国产福利| 石原莉奈一区二区三区在线观看| 91精品国产全国免费观看| 国产精品亚洲一区二区三区妖精 | 亚洲成人tv网| 久久综合久色欧美综合狠狠| 成人深夜视频在线观看| 亚洲一二三四久久| 精品国产乱码久久久久久牛牛| 成人小视频在线| 日韩黄色在线观看| 中文字幕欧美国产| 91麻豆精品国产综合久久久久久 | 激情图区综合网| 国产精品久久久久久福利一牛影视| 91麻豆国产福利精品| 日产欧产美韩系列久久99| 日本一区二区三区电影| 欧美日韩精品一区二区三区 | 日本不卡一区二区三区| 中文字幕av一区 二区| 精品视频资源站| 成人一级片网址| 日韩精品每日更新| 最新欧美精品一区二区三区| 日韩三区在线观看| 91福利资源站| 国产成人综合自拍| 欧美bbbbb| 亚洲一区二区av电影| 亚洲欧美日韩国产手机在线| 日韩视频一区在线观看| 91久久精品国产91性色tv| 国产综合色视频| 天堂成人国产精品一区| 亚洲少妇30p| 国产色产综合产在线视频| 欧美绝品在线观看成人午夜影视| 波多野结衣中文字幕一区| 国产乱子轮精品视频| 日本特黄久久久高潮| 一区二区三区中文字幕精品精品| 国产女同性恋一区二区| 精品久久国产老人久久综合| 欧美日本一道本在线视频| 99re热视频精品| 成人午夜av电影| 国产69精品久久久久777| 美美哒免费高清在线观看视频一区二区 | 日本成人在线视频网站| 亚洲国产视频一区| 亚洲精选视频在线| 日韩一区有码在线| 国产精品久久777777| 欧美国产视频在线| 国产精品久久久久久久久果冻传媒| 精品国产伦一区二区三区免费| 日韩欧美在线1卡| 日韩午夜激情免费电影| 欧美mv日韩mv| 精品久久国产老人久久综合| 精品对白一区国产伦| www亚洲一区| 精品国精品国产尤物美女| 欧美一区二区三区四区在线观看| 欧美日韩一区二区电影| 欧美日韩成人一区| 欧美日精品一区视频| 4438x成人网最大色成网站| 4hu四虎永久在线影院成人| 日韩一区二区在线观看视频 | 欧美一级欧美一级在线播放| 7777精品伊人久久久大香线蕉的| 欧美三级一区二区| 7777精品伊人久久久大香线蕉经典版下载 | 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美日韩在线三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 91福利精品视频| 欧美无人高清视频在线观看| 欧美日本一道本在线视频| 日韩午夜精品视频| 欧美国产一区二区在线观看| 亚洲天堂成人在线观看| 亚洲一区二区视频| 美女脱光内衣内裤视频久久网站 | 欧美日韩精品一区二区天天拍小说| 精品视频一区二区不卡| 欧美成人vr18sexvr| 国产日韩欧美一区二区三区综合| 亚洲天堂久久久久久久| 日韩影院免费视频| 国产成人精品综合在线观看 | 成人免费视频网站在线观看| 91麻豆精品一区二区三区| 日韩一区二区在线看| 国产精品白丝在线| 免费三级欧美电影| 国产mv日韩mv欧美| 欧美视频在线播放| 欧美激情一区二区在线| 爽爽淫人综合网网站| 国产精品久久久久久久午夜片| 一区二区高清在线| 国产亚洲精品久| 一区二区三区中文字幕电影 | 亚洲欧美另类小说| 久久99热狠狠色一区二区| 99精品视频中文字幕| 精品国产乱码久久久久久夜甘婷婷| 国产精品欧美一区喷水| 视频一区二区三区中文字幕| 成人av电影免费在线播放| 日韩欧美久久一区| 一二三四社区欧美黄| 成人亚洲一区二区一| 欧美不卡一区二区三区四区| 一区二区三区视频在线观看| 国产精品综合一区二区| 欧美精品一二三四| 亚洲精品日产精品乱码不卡| 国产成人激情av| 亚洲精品一区在线观看| 欧美96一区二区免费视频| 欧美视频一区在线观看| 国产精品久久久久影院老司| 国产精品一区二区无线| 日韩免费性生活视频播放| 亚洲大片精品永久免费| 欧美亚洲免费在线一区| 伊人一区二区三区| 99国产精品视频免费观看| 国产精品毛片久久久久久久| 国产成人亚洲综合色影视| 精品1区2区在线观看| 蜜桃91丨九色丨蝌蚪91桃色| 7878成人国产在线观看| 亚洲风情在线资源站| 欧美手机在线视频| 一区二区三区免费网站| 色999日韩国产欧美一区二区| **欧美大码日韩| 91日韩精品一区| 1000精品久久久久久久久| 99精品视频一区二区三区| 国产精品久久久久一区| 成人av网址在线| 日韩美女啊v在线免费观看| 99久久久久免费精品国产|