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

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

?? cb.c

?? radius server在linux下的源碼
?? C
字號:
/* * cb.c * * Version:     $Id: cb.c,v 1.16 2004/05/27 22:10:17 mgriego Exp $ * *   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 * * Copyright 2001  hereUare Communications, Inc. <raghud@hereuare.com> */#include "eap_tls.h"#ifndef NO_OPENSSLvoid cbtls_info(const SSL *s, int where, int ret){	const char *str, *state;	int w;	w = where & ~SSL_ST_MASK;	if (w & SSL_ST_CONNECT) str="    TLS_connect";	else if (w & SSL_ST_ACCEPT) str="    TLS_accept";	else str="    (other)";	state = SSL_state_string_long(s);	state = state ? state : "NULL";	if (where & SSL_CB_LOOP) {		if (debug_flag) radlog(L_INFO, "%s: %s\n", str, state);	} else if (where & SSL_CB_HANDSHAKE_START) {		if (debug_flag) radlog(L_INFO, "%s: %s\n", str, state);	} else if (where & SSL_CB_HANDSHAKE_DONE) {		radlog(L_INFO, "%s: %s\n", str, state);	} else if (where & SSL_CB_ALERT) {		str=(where & SSL_CB_READ)?"read":"write";		radlog(L_ERR,"TLS Alert %s:%s:%s\n", str,			SSL_alert_type_string_long(ret),			SSL_alert_desc_string_long(ret));	} else if (where & SSL_CB_EXIT) {		if (ret == 0)			radlog(L_ERR, "%s:failed in %s\n", str, state);		else if (ret < 0)			radlog(L_ERR, "%s:error in %s\n", str, state);	}}/* *	Before trusting a certificate, you must make sure that the *	certificate is 'valid'. There are several steps that your *	application can take in determining if a certificate is *	valid. Commonly used steps are: * *	1.Verifying the certificate's signature, and verifying that *	the certificate has been issued by a trusted Certificate *	Authority. * *	2.Verifying that the certificate is valid for the present date *	(i.e. it is being presented within its validity dates). * *	3.Verifying that the certificate has not been revoked by its *	issuing Certificate Authority, by checking with respect to a *	Certificate Revocation List (CRL). * *	4.Verifying that the credentials presented by the certificate *	fulfill additional requirements specific to the application, *	such as with respect to access control lists or with respect *	to OCSP (Online Certificate Status Processing). * *	NOTE: This callback will be called multiple times based on the *	depth of the root certificate chain */int cbtls_verify(int ok, X509_STORE_CTX *ctx){	char subject[256]; /* Used for the subject name */	char issuer[256]; /* Used for the issuer name */	char buf[256];	char cn_str[256];	EAP_HANDLER *handler = NULL;	X509 *client_cert;	SSL *ssl;	int err, depth;	EAP_TLS_CONF *conf;	int my_ok = ok;	client_cert = X509_STORE_CTX_get_current_cert(ctx);	err = X509_STORE_CTX_get_error(ctx);	depth = X509_STORE_CTX_get_error_depth(ctx);	if(!my_ok)		radlog(L_ERR,"--> verify error:num=%d:%s\n",err,			X509_verify_cert_error_string(err));	/*	 *	Catch too long Certificate chains	 */	/*	 * Retrieve the pointer to the SSL of the connection currently treated	 * and the application specific data stored into the SSL object.	 */	ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());	handler = (EAP_HANDLER *)SSL_get_ex_data(ssl, 0);	conf = (EAP_TLS_CONF *)SSL_get_ex_data(ssl, 1);	/*	 *	Get the Subject & Issuer	 */	subject[0] = issuer[0] = '\0';	X509_NAME_oneline(X509_get_subject_name(client_cert), subject, 256);	X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), issuer, 256);	/*	 *	Get the Common Name	 */	X509_NAME_get_text_by_NID(X509_get_subject_name(client_cert),             NID_commonName, buf, 256);	switch (ctx->error) {	case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:		radlog(L_ERR, "issuer= %s\n", issuer);		break;	case X509_V_ERR_CERT_NOT_YET_VALID:	case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:		radlog(L_ERR, "notBefore=");#if 0		ASN1_TIME_print(bio_err, X509_get_notBefore(ctx->current_cert));#endif		break;	case X509_V_ERR_CERT_HAS_EXPIRED:	case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:		radlog(L_ERR, "notAfter=");#if 0		ASN1_TIME_print(bio_err, X509_get_notAfter(ctx->current_cert));#endif		break;	}	/*	 *	If we're at the actual client cert and the conf tells	 *	us to, check the CN in the cert against the xlat'ed	 *	value	 */	if (depth == 0 && conf->check_cert_cn != NULL) {		if (!radius_xlat(cn_str, sizeof(cn_str), conf->check_cert_cn, handler->request, NULL)) {			radlog(L_ERR, "rlm_eap_tls (%s): xlat failed.",                               conf->check_cert_cn);			/* if this fails, fail the verification */			my_ok = 0;		}		DEBUG2("    rlm_eap_tls: checking certificate CN (%s) with xlat'ed value (%s)", buf, cn_str);		if (strncmp(cn_str, buf, sizeof(buf)) != 0) {			my_ok = 0;			radlog(L_AUTH, "rlm_eap_tls: Certificate CN (%s) does not match specified value (%s)!", buf, cn_str);		}	}	if (debug_flag > 0) {		radlog(L_INFO, "chain-depth=%d, ", depth);		/*		  if (depth > 0) {		  return ok;		  }		*/		radlog(L_INFO, "error=%d", err);		radlog(L_INFO, "--> User-Name = %s", handler->identity);		radlog(L_INFO, "--> BUF-Name = %s", buf);		radlog(L_INFO, "--> subject = %s", subject);		radlog(L_INFO, "--> issuer  = %s", issuer);		radlog(L_INFO, "--> verify return:%d", my_ok);	}	return my_ok;}/* *	Fill in our 'info' with TLS data. */void cbtls_msg(int write_p, int msg_version, int content_type,	       const void *buf, size_t len,	       SSL *ssl UNUSED, void *arg){	tls_session_t *state = (tls_session_t *)arg;	state->info.origin = (unsigned char)write_p;	state->info.content_type = (unsigned char)content_type;	state->info.record_len = len;	state->info.version = msg_version;	state->info.initialized = 1;	if (content_type == SSL3_RT_ALERT) {		state->info.alert_level = ((const unsigned char*)buf)[0];		state->info.alert_description = ((const unsigned char*)buf)[1];		state->info.handshake_type = 0x00;	} else if (content_type == SSL3_RT_HANDSHAKE) {		state->info.handshake_type = ((const unsigned char*)buf)[0];		state->info.alert_level = 0x00;		state->info.alert_description = 0x00;	}	tls_session_information(state);}int cbtls_password(char *buf,		   int num UNUSED,		   int rwflag UNUSED,		   void *userdata){	strcpy(buf, (char *)userdata);	return(strlen((char *)userdata));}RSA *cbtls_rsa(SSL *s UNUSED, int is_export UNUSED, int keylength){	static RSA *rsa_tmp=NULL;	if (rsa_tmp == NULL) {		radlog(L_INFO, "Generating temp (%d bit) RSA key...", keylength);		rsa_tmp=RSA_generate_key(keylength, RSA_F4, NULL, NULL);	}	return(rsa_tmp);}#endif /* !defined(NO_OPENSSL) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区四区 | 久久精品欧美一区二区三区不卡 | 中文字幕在线不卡视频| 高清不卡一区二区在线| 欧美激情一区二区三区蜜桃视频 | 99久久777色| 亚洲午夜一区二区| 欧美日韩一区精品| 美国精品在线观看| 精品久久99ma| 成人av资源在线| 一区二区三区四区在线播放 | 欧美日韩国产一二三| 琪琪一区二区三区| 国产人久久人人人人爽| 欧美性猛片aaaaaaa做受| 久久99久久99精品免视看婷婷 | 色综合久久综合中文综合网| 99re热这里只有精品免费视频| 亚洲色图一区二区三区| 欧美疯狂性受xxxxx喷水图片| 国产一区视频导航| 亚洲欧美日韩一区二区三区在线观看| 欧美日韩国产一区二区三区地区| 国产美女一区二区| 亚洲欧美日韩在线不卡| 久久精品99国产精品| 国产亚洲精品久| 日韩欧美电影在线| 欧洲精品一区二区| 国产毛片精品一区| 蜜桃av一区二区三区| 午夜精品久久久久久久蜜桃app| 国产日韩欧美制服另类| 欧美一区二区高清| 欧美写真视频网站| 欧美视频一区在线| 欧美午夜在线观看| 日本韩国欧美三级| 一本色道综合亚洲| 北条麻妃国产九九精品视频| 精品一区二区免费在线观看| 午夜精彩视频在线观看不卡| 亚洲一区二区三区爽爽爽爽爽| 国产精品久久久久久久蜜臀| 国产精品―色哟哟| 国产精品另类一区| 中文字幕一区在线| 亚洲一区免费观看| 972aa.com艺术欧美| 欧美视频在线一区二区三区 | 成人激情午夜影院| 91福利国产成人精品照片| 91欧美一区二区| 欧美日韩精品久久久| 制服丝袜av成人在线看| 精品国内二区三区| 国产精品乱码久久久久久| 亚洲一区二区美女| 轻轻草成人在线| 国产一区二区在线免费观看| youjizz久久| 制服视频三区第一页精品| 欧美国产一区视频在线观看| 亚洲国产成人va在线观看天堂| 肉色丝袜一区二区| 国产一区不卡视频| 欧美日韩黄色影视| 国产精品国产a| 久久精品国产精品亚洲综合| 97se亚洲国产综合自在线不卡 | www.欧美色图| 欧美精品一区二区久久久| 最新国产成人在线观看| 免费成人在线观看| 欧美日韩在线精品一区二区三区激情| 精品少妇一区二区三区视频免付费 | 国产精品高潮呻吟| 精品一区二区三区香蕉蜜桃| 在线视频综合导航| 国产精品久久久久精k8 | eeuss国产一区二区三区| 国产精品久久久久久户外露出 | 一区二区三区四区在线| 国产精品一区二区x88av| 日韩欧美一级二级| 免费高清成人在线| 5566中文字幕一区二区电影| 亚洲午夜在线视频| 欧美在线观看视频一区二区| 中文字幕日韩精品一区| 成人免费视频播放| 中文字幕一区视频| 91在线观看污| 一区二区三区日韩在线观看| 91在线国产观看| 一区二区免费视频| 色综合天天综合狠狠| 亚洲视频 欧洲视频| 色屁屁一区二区| 亚洲va天堂va国产va久| 欧美日韩电影在线播放| 青娱乐精品视频在线| 国产拍欧美日韩视频二区| 成人免费精品视频| 亚洲欧美另类久久久精品 | 在线不卡的av| 国产一区二区三区免费在线观看| 2020国产精品自拍| 不卡一区在线观看| 亚洲国产欧美在线| 337p粉嫩大胆噜噜噜噜噜91av| www.色精品| 免费不卡在线视频| 综合自拍亚洲综合图不卡区| 欧美色精品天天在线观看视频| 日本三级韩国三级欧美三级| 欧美精品一区二区三区一线天视频| 国产成人午夜高潮毛片| 亚洲成人自拍网| 亚洲欧洲美洲综合色网| 欧美精三区欧美精三区| 国产91丝袜在线播放0| 五月婷婷激情综合| 国产精品美女视频| 26uuu亚洲婷婷狠狠天堂| 91麻豆文化传媒在线观看| 国产真实精品久久二三区| 五月激情综合婷婷| 亚洲欧美综合色| 久久亚洲一级片| 日韩免费看的电影| 91精品视频网| 欧美精选午夜久久久乱码6080| 国产成人av一区二区三区在线观看| 亚洲成人黄色影院| 亚洲一区二区在线播放相泽| 国产精品系列在线| 久久久国产午夜精品| 久久久久国产免费免费| 久久免费美女视频| 久久午夜老司机| 久久婷婷久久一区二区三区| 精品粉嫩超白一线天av| 欧美成人猛片aaaaaaa| 日韩三级中文字幕| 精品国产欧美一区二区| 欧美一级一区二区| 精品福利一二区| 国产欧美日产一区| 亚洲欧美在线aaa| 一区二区三区四区不卡在线 | 欧美亚洲综合在线| 欧美日韩国产高清一区二区| 制服丝袜中文字幕亚洲| 精品国产123| 亚洲欧洲色图综合| 婷婷成人综合网| 国产乱妇无码大片在线观看| 成人综合在线视频| 欧美在线一区二区| 亚洲精品一区在线观看| 国产精品麻豆欧美日韩ww| 亚洲尤物在线视频观看| 九一久久久久久| 99热国产精品| 日韩美女主播在线视频一区二区三区| 久久精品亚洲乱码伦伦中文 | 国产目拍亚洲精品99久久精品| 国产精品乱码一区二三区小蝌蚪| 亚洲一区二区av在线| 激情文学综合网| 色婷婷精品久久二区二区蜜臀av | 日韩一区二区三区视频在线观看| 欧美国产视频在线| 伦理电影国产精品| 在线精品视频一区二区三四| 国产午夜三级一区二区三| 日本大胆欧美人术艺术动态 | 国产成人三级在线观看| 在线播放91灌醉迷j高跟美女| 国产精品福利影院| 国产黄色精品网站| 久久先锋影音av鲁色资源| 日韩中文字幕一区二区三区| 日本道色综合久久| 久久一二三国产| 中文字幕一区二区视频| 亚洲主播在线播放| 91国产精品成人| 久久精工是国产品牌吗| 国产精品色婷婷| 欧美一级视频精品观看| 成人免费福利片| 免费观看在线综合| 综合网在线视频| 久久久久久久av麻豆果冻| 成人av影视在线观看| 亚洲综合色噜噜狠狠| 日韩免费电影一区|