NHN_KCP 윈도우 본인인증 모듈 추가
This commit is contained in:
@ -22,11 +22,14 @@ class C_CT_CLI
|
||||
// hash 처리 영역
|
||||
function make_hash_data( $home_dir , $str )
|
||||
{
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||
else
|
||||
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
||||
|
||||
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||
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 ,
|
||||
"lf_CT_CLI__make_hash_data",
|
||||
$str
|
||||
@ -40,11 +43,14 @@ class C_CT_CLI
|
||||
// dn_hash 체크 함수
|
||||
function check_valid_hash ($home_dir , $hash_data , $str )
|
||||
{
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||
else
|
||||
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
||||
|
||||
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||
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 ,
|
||||
"lf_CT_CLI__check_valid_hash" ,
|
||||
$hash_data ,
|
||||
@ -59,18 +65,31 @@ class C_CT_CLI
|
||||
// 암호화 인증데이터 복호화
|
||||
function decrypt_enc_cert ( $home_dir, $site_cd , $cert_no , $enc_cert_data , $opt)
|
||||
{
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||
else
|
||||
$bin_exe = $home_dir . '/bin/ct_cli_x64';
|
||||
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir . '/bin/ct_cli';
|
||||
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"; }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user