NHN_KCP 윈도우 본인인증 모듈 추가
This commit is contained in:
@ -1466,10 +1466,14 @@ if($config['cf_cert_use']) {
|
|||||||
|
|
||||||
// kcp일 때
|
// kcp일 때
|
||||||
if($config['cf_cert_hp'] == 'kcp') {
|
if($config['cf_cert_hp'] == 'kcp') {
|
||||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli';
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
else
|
$exe = G5_KCPCERT_PATH . '/bin/ct_cli';
|
||||||
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_x64';
|
else
|
||||||
|
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_x64';
|
||||||
|
} else {
|
||||||
|
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_exe.exe';
|
||||||
|
}
|
||||||
|
|
||||||
echo module_exec_check($exe, 'ct_cli');
|
echo module_exec_check($exe, 'ct_cli');
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
plugin/kcpcert/bin/ct_cli_exe.exe
Normal file
BIN
plugin/kcpcert/bin/ct_cli_exe.exe
Normal file
Binary file not shown.
@ -100,11 +100,15 @@ if( $cert_enc_use == "Y" )
|
|||||||
|
|
||||||
if ( $ct_cert->check_valid_hash ( $home_dir , $dn_hash , $veri_str ) != "1" )
|
if ( $ct_cert->check_valid_hash ( $home_dir , $dn_hash , $veri_str ) != "1" )
|
||||||
{
|
{
|
||||||
// 검증 실패시 처리 영역
|
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
// 검증 실패시 처리 영역
|
||||||
$bin_exe = '/bin/ct_cli';
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
else
|
$bin_exe = '/bin/ct_cli';
|
||||||
$bin_exe = '/bin/ct_cli_x64';
|
else
|
||||||
|
$bin_exe = '/bin/ct_cli_x64';
|
||||||
|
} else {
|
||||||
|
$bin_exe = '/bin/ct_cli_exe.exe';
|
||||||
|
}
|
||||||
|
|
||||||
echo "dn_hash 변조 위험있음 (".G5_KCPCERT_PATH.$bin_exe." 파일에 실행권한이 있는지 확인하세요.)";
|
echo "dn_hash 변조 위험있음 (".G5_KCPCERT_PATH.$bin_exe." 파일에 실행권한이 있는지 확인하세요.)";
|
||||||
exit;
|
exit;
|
||||||
@ -133,6 +137,13 @@ if( $cert_enc_use == "Y" )
|
|||||||
$dec_res_cd = $ct_cert->mf_get_key_value("res_cd" ); // 암호화된 결과코드
|
$dec_res_cd = $ct_cert->mf_get_key_value("res_cd" ); // 암호화된 결과코드
|
||||||
$dec_mes_msg = $ct_cert->mf_get_key_value("res_msg" ); // 암호화된 결과메시지
|
$dec_mes_msg = $ct_cert->mf_get_key_value("res_msg" ); // 암호화된 결과메시지
|
||||||
|
|
||||||
|
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && function_exists('mb_detect_encoding') ){
|
||||||
|
if( mb_detect_encoding($user_name, 'EUC-KR') === 'EUC-KR' ){
|
||||||
|
$user_name = iconv_utf8($user_name);
|
||||||
|
$dec_mes_msg = iconv_utf8($dec_mes_msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 정상인증인지 체크
|
// 정상인증인지 체크
|
||||||
if(!$phone_no)
|
if(!$phone_no)
|
||||||
alert_close("정상적인 인증이 아닙니다. 올바른 방법으로 이용해 주세요.");
|
alert_close("정상적인 인증이 아닙니다. 올바른 방법으로 이용해 주세요.");
|
||||||
|
|||||||
@ -22,11 +22,14 @@ class C_CT_CLI
|
|||||||
// hash 처리 영역
|
// hash 처리 영역
|
||||||
function make_hash_data( $home_dir , $str )
|
function make_hash_data( $home_dir , $str )
|
||||||
{
|
{
|
||||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
else
|
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||||
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
else
|
||||||
|
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
||||||
|
} else {
|
||||||
|
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe';
|
||||||
|
}
|
||||||
$hash_data = $this -> mf_exec( $bin_exe ,
|
$hash_data = $this -> mf_exec( $bin_exe ,
|
||||||
"lf_CT_CLI__make_hash_data",
|
"lf_CT_CLI__make_hash_data",
|
||||||
$str
|
$str
|
||||||
@ -40,11 +43,14 @@ class C_CT_CLI
|
|||||||
// dn_hash 체크 함수
|
// dn_hash 체크 함수
|
||||||
function check_valid_hash ($home_dir , $hash_data , $str )
|
function check_valid_hash ($home_dir , $hash_data , $str )
|
||||||
{
|
{
|
||||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
else
|
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||||
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
else
|
||||||
|
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
||||||
|
} else {
|
||||||
|
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe';
|
||||||
|
}
|
||||||
$ret_val = $this -> mf_exec( $bin_exe ,
|
$ret_val = $this -> mf_exec( $bin_exe ,
|
||||||
"lf_CT_CLI__check_valid_hash" ,
|
"lf_CT_CLI__check_valid_hash" ,
|
||||||
$hash_data ,
|
$hash_data ,
|
||||||
@ -59,18 +65,31 @@ class C_CT_CLI
|
|||||||
// 암호화 인증데이터 복호화
|
// 암호화 인증데이터 복호화
|
||||||
function decrypt_enc_cert ( $home_dir, $site_cd , $cert_no , $enc_cert_data , $opt)
|
function decrypt_enc_cert ( $home_dir, $site_cd , $cert_no , $enc_cert_data , $opt)
|
||||||
{
|
{
|
||||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
else
|
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||||
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
else
|
||||||
|
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
||||||
|
|
||||||
|
$dec_data = $this -> mf_exec( $bin_exe ,
|
||||||
|
"lf_CT_CLI__decrypt_enc_cert" ,
|
||||||
|
$site_cd ,
|
||||||
|
$cert_no ,
|
||||||
|
$enc_cert_data ,
|
||||||
|
$opt
|
||||||
|
);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe';
|
||||||
|
|
||||||
|
$dec_data = $this -> mf_exec( $bin_exe ,
|
||||||
|
"lf_CT_CLI__decrypt_enc_cert" ,
|
||||||
|
$site_cd ,
|
||||||
|
$cert_no ,
|
||||||
|
$enc_cert_data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$dec_data = $this -> mf_exec( $bin_exe ,
|
|
||||||
"lf_CT_CLI__decrypt_enc_cert" ,
|
|
||||||
$site_cd ,
|
|
||||||
$cert_no ,
|
|
||||||
$enc_cert_data ,
|
|
||||||
$opt
|
|
||||||
);
|
|
||||||
if ( $dec_data == "" ) { $dec_data = "HS03"; }
|
if ( $dec_data == "" ) { $dec_data = "HS03"; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user