Merge branch 'master' of http://yongjoon.cho@vcs.iten.co.kr:9999/itnAdmin/fairnet
This commit is contained in:
commit
7bf4113dc7
@ -229,8 +229,8 @@ public class XxxController {
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping("/web/xxx/xxxPpurioTest.do")
|
||||
public String xxxPpurioTest() {
|
||||
@RequestMapping("/web/xxx/xxxAtTest.do")
|
||||
public String xxxAtTest() {
|
||||
try {
|
||||
|
||||
//신청인_접수확인_1
|
||||
|
||||
@ -69,6 +69,7 @@ public class BaseController {
|
||||
}
|
||||
|
||||
///gtm/case/nanum/ajax/SanctnhistoryIns.do
|
||||
///gtm/case/common/ajax/NICE.do
|
||||
@RequestMapping(value = "/gtm/case/{pageFolder}/{pageName}/{pageAction}.do")
|
||||
public ModelAndView getManagerPage(HttpServletRequest request,
|
||||
HttpSession session, Map<String, Object> map,
|
||||
@ -208,11 +209,12 @@ public class BaseController {
|
||||
params.put("data", JSPUtil.fixNull(bservice.delete(params)).toString());
|
||||
}else if("NICELOOKUP".equals(type)){
|
||||
Nice nice = new Nice();
|
||||
params.put("niceLookup", nice.Lookup(((String) params.get("bizno")).trim().replaceAll("-", "")));
|
||||
params.put("niceLookup", nice.Lookup2(((String) params.get("bizno")).trim().replaceAll("-", "")));
|
||||
//params.put("niceLookup", nice.Lookup("1248100998"));
|
||||
}else if("NICESEARCH".equals(type)){
|
||||
Nice nice = new Nice();
|
||||
params.put("niceSearch", nice.Search((String)params.get("niceNm"), (String)params.get("niceCnt")));
|
||||
// params.put("niceSearch", nice.Search((String)params.get("niceNm"), (String)params.get("niceCnt")));
|
||||
params.put("niceSearch", nice.Search2((String)params.get("niceNm"), (String)params.get("niceCnt")));
|
||||
}else if("NANUM".equals(type)){
|
||||
Nanum nanum = new Nanum();
|
||||
params.put("nanumCall", nanum.NanumCall(params));
|
||||
|
||||
@ -8,11 +8,14 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.ibatis.logging.Log;
|
||||
import org.apache.ibatis.logging.LogFactory;
|
||||
@ -276,4 +279,51 @@ public class Nice {
|
||||
return html;
|
||||
}
|
||||
|
||||
public StringBuilder Search2(String nm, String page) throws Exception {
|
||||
String encoded_query = URLEncoder.encode(nm, "UTF-8");
|
||||
String host = "https://w.datapoint.co.kr/v3.1/search/company.info?apikey=" + this.NiceApikey() + "&uid=kofair&index=SA0701&eprdatasvcstscd=07&itg_srch=" + encoded_query + "&prn_rst_cnt=20&pge_st_no=" + page + "&output=json";
|
||||
URL url = new URL(host);
|
||||
StringBuilder html = new StringBuilder();
|
||||
HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setDoInput(true);
|
||||
connection.setDoOutput(true);
|
||||
connection.setUseCaches(false);
|
||||
new StringBuilder();
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
|
||||
|
||||
while(true) {
|
||||
String line = br.readLine();
|
||||
if (line == null) {
|
||||
br.close();
|
||||
return html;
|
||||
}
|
||||
|
||||
html.append(line.trim().replaceAll(" |<!--(.*)-->|@", ""));
|
||||
}
|
||||
}
|
||||
|
||||
public StringBuilder Lookup2(String bizno) throws Exception {
|
||||
String host = "https://w.datapoint.co.kr/v2.0/lookup/lookup.info?apikey=" + this.NiceApikey() + "&uid=kofair&resgp=LP0202,LP0209,LP0212,LP0232&allsvcpdtcd=KLP&eprdatasvcstscd=07&bizno=" + bizno + "&output=json";
|
||||
URL url = new URL(host);
|
||||
StringBuilder html = new StringBuilder();
|
||||
HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setDoInput(true);
|
||||
connection.setDoOutput(true);
|
||||
connection.setUseCaches(false);
|
||||
new StringBuilder();
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
|
||||
|
||||
while(true) {
|
||||
String line = br.readLine();
|
||||
if (line == null) {
|
||||
br.close();
|
||||
return html;
|
||||
}
|
||||
|
||||
html.append(line.trim().replaceAll(" |<!--(.*)-->|@", ""));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
package seed.com.user.mediation;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@ -7,6 +11,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
@ -244,7 +249,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -417,7 +422,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -592,7 +597,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -789,7 +794,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -970,7 +975,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -1128,7 +1133,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -1260,7 +1265,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -1402,7 +1407,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -1553,7 +1558,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -1708,7 +1713,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -2111,7 +2116,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -2445,7 +2450,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -2884,7 +2889,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -3100,7 +3105,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -3293,7 +3298,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -3479,7 +3484,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -3702,7 +3707,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -3994,7 +3999,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -4139,7 +4144,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -4260,7 +4265,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -4468,7 +4473,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -4624,7 +4629,7 @@ public class WebMediationController {
|
||||
|
||||
//부모메뉴 타이틀 설정한 경우 해당 글의 부모 타이틀을 가져옴
|
||||
if(SeedUtils.setReplaceNull(tSiteMenuDB.get("_siteMenuParentTitle") ,"N").equals("Y")){
|
||||
String[] siteMenuTitles = siteMenuTitle.split("\\|");
|
||||
String[] siteMenuTitles = siteMenuTitle.split("//|");
|
||||
tSiteMenuDB.put("_siteMenuName", siteMenuTitles[Integer.parseInt(tSiteMenuDB.get("_siteMenuDepth").toString())-1]);
|
||||
}
|
||||
|
||||
@ -4720,6 +4725,7 @@ public class WebMediationController {
|
||||
|
||||
/* params.put("fileName", "/pdf/web/compressed.tracemonkey-pldi-09.pdf");
|
||||
mav.addAllObjects(params);*/
|
||||
map.addAttribute("dataIdx", params.get("dataIdx"));
|
||||
mav.setViewName("_extra/web/user/mediation/caseViewer");
|
||||
return mav;
|
||||
}
|
||||
@ -4739,4 +4745,31 @@ public class WebMediationController {
|
||||
return true;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/web/user/mediation/case/pdf/pdfDownload.do")
|
||||
public void downloadPdf(
|
||||
HttpServletResponse response
|
||||
, @RequestParam Map<String,Object> paramMap
|
||||
) throws IOException {
|
||||
|
||||
Map<String, Object> fileList = fileService.caseFileOne(paramMap);
|
||||
|
||||
// PDF 파일 경로
|
||||
// String pdfFilePath = "/path/to/your/pdf/file.pdf";
|
||||
String pdfFilePath = fileList.get("FILE_PATH").toString() + fileList.get("FILE_ORGNAME").toString();
|
||||
|
||||
// Content-Type 설정
|
||||
response.setContentType("application/pdf");
|
||||
|
||||
// 파일 스트림을 통해 PDF 파일을 읽고 클라이언트에게 전송
|
||||
try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(pdfFilePath));
|
||||
OutputStream out = response.getOutputStream()) {
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
6607
src/main/webapp/AnySign4PC/anySign4PCInterface.js_20221209
Normal file
6607
src/main/webapp/AnySign4PC/anySign4PCInterface.js_20221209
Normal file
File diff suppressed because one or more lines are too long
6607
src/main/webapp/AnySign4PC/anySign4PCInterface.js_bak
Normal file
6607
src/main/webapp/AnySign4PC/anySign4PCInterface.js_bak
Normal file
File diff suppressed because one or more lines are too long
BIN
src/main/webapp/AnySign4PC/ca.tar
Normal file
BIN
src/main/webapp/AnySign4PC/ca.tar
Normal file
Binary file not shown.
2987
src/main/webapp/AnySign4PC/test/AnySign4PCTest.html
Normal file
2987
src/main/webapp/AnySign4PC/test/AnySign4PCTest.html
Normal file
File diff suppressed because it is too large
Load Diff
2987
src/main/webapp/AnySign4PC/test/AnySign4PCTest.jsp
Normal file
2987
src/main/webapp/AnySign4PC/test/AnySign4PCTest.jsp
Normal file
File diff suppressed because it is too large
Load Diff
2993
src/main/webapp/AnySign4PC/test/AnySign4PCTest_euckr.jsp
Normal file
2993
src/main/webapp/AnySign4PC/test/AnySign4PCTest_euckr.jsp
Normal file
File diff suppressed because it is too large
Load Diff
1524
src/main/webapp/AnySign4PC/test/KB_qa.jsp
Normal file
1524
src/main/webapp/AnySign4PC/test/KB_qa.jsp
Normal file
File diff suppressed because it is too large
Load Diff
6452
src/main/webapp/AnySign4PC/test/LGUPlus_qa.jsp
Normal file
6452
src/main/webapp/AnySign4PC/test/LGUPlus_qa.jsp
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
186
src/main/webapp/AnySign4PC/test/certificate_mini.jsp
Normal file
186
src/main/webapp/AnySign4PC/test/certificate_mini.jsp
Normal file
@ -0,0 +1,186 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
request.setCharacterEncoding("utf-8");
|
||||
response.setContentType("text/html; charset=utf-8");
|
||||
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
|
||||
String sign_result_page = "./sign_result.jsp";
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<title>Page Title - mini</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<style type="text/css">
|
||||
.test {border:1px dashed gray;}
|
||||
.test td {font-size: 9pt;color: #333333;background: #EEEEEE;text-align: center;}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
|
||||
//PrintObjectTag();
|
||||
|
||||
function checkAnySign4PC()
|
||||
{
|
||||
document.getElementById("Enable_AnySignLoad").value = AnySign.mAnySignLoad;
|
||||
|
||||
if (AnySign.mAnySignLoad == true)
|
||||
document.getElementById("Enable_AnySignLoad").style.fontWeight = "bold";
|
||||
}
|
||||
|
||||
function initAnySign4PC()
|
||||
{
|
||||
checkAnySign4PC();
|
||||
if (!AnySign.mAnySignLoad) {
|
||||
AnySign4PC_LoadCallback (checkAnySign4PC);
|
||||
PrintObjectTag ();
|
||||
}
|
||||
}
|
||||
|
||||
// AnySignLite 설정
|
||||
function checkAnySignLite()
|
||||
{
|
||||
document.getElementById("Enable_AnySignLite").value = AnySign.mAnySignLiteEnable;
|
||||
}
|
||||
|
||||
function enableAnySignLite()
|
||||
{
|
||||
AnySign.mAnySignLiteEnable =! AnySign.mAnySignLiteEnable;
|
||||
document.getElementById("Enable_AnySignLite").value = AnySign.mAnySignLiteEnable;
|
||||
}
|
||||
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function init () {
|
||||
checkAnySign4PC();
|
||||
checkAnySignLite();
|
||||
}
|
||||
|
||||
function sign () {
|
||||
AnySign.mDivInsertOption = 2;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="694" colspan="3"><h4>설정</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">AnySign4PC 초기화</td>
|
||||
<td width="486" >
|
||||
<input id="Enable_AnySignLoad" type="button" style="width:100%" onclick="initAnySign4PC(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">AnySignLite 사용 유무</td>
|
||||
<td width="486" >
|
||||
<input id="Enable_AnySignLite" type="button" style="width:100%" onclick="enableAnySignLite(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">Run</td>
|
||||
<td width="486" >
|
||||
<input id="Run_SignDataCMS" type="button" style="width:100%" value="AnySign.SignDataCMS" onclick="sign();">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="certDialog"></div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
전자서명 결과<br>
|
||||
<textarea id="signature_data" style="width:700px;height:100px"></textarea><br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</body>
|
||||
</html>
|
||||
61
src/main/webapp/AnySign4PC/test/certificate_pop.jsp
Normal file
61
src/main/webapp/AnySign4PC/test/certificate_pop.jsp
Normal file
@ -0,0 +1,61 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Test Page</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../XecureWeb/css/common.css" />
|
||||
|
||||
<script type="text/javascript" src="../xecureweb_up.js"></script>
|
||||
<script type="text/javascript" src="../transkey/BigInt.js"></script>
|
||||
<script type="text/javascript" src="../transkey/Barrett.js"></script>
|
||||
<script type="text/javascript" src="../transkey/RSA.js"></script>
|
||||
<script type="text/javascript" src="../transkey/wz_jsgraphics.js"></script>
|
||||
<script type="text/javascript" src="../transkey/transkey_XC.js"></script>
|
||||
<script type="text/javascript" src="../transkey/seed.js"></script>
|
||||
<script type="text/javascript" src="../transkey/genkey.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
PrintObjectTag();
|
||||
//]]>
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
var useTranskey = false;
|
||||
function makeSign( )
|
||||
{
|
||||
XecureWeb.SetUITarget(document.getElementById('signbtn'));
|
||||
XecureWeb.SignDataCMS (XecureWeb.mXgateAddress, XecureWeb.mCAList, "hello", 768, "", 3, signResult_callback);
|
||||
return false;
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
alert(aResult);
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="btn-area mb50">
|
||||
<a href="#" type="button" id='signbtn' onClick='return makeSign();return false;' >확인확인확인</a>
|
||||
</div>
|
||||
<div class="btn-area mb50">
|
||||
<a href="#" type="button" id='signbtn' onClick='ShowCertManager();return false;' > 인증서관리자</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
153
src/main/webapp/AnySign4PC/test/certificate_wide.jsp
Normal file
153
src/main/webapp/AnySign4PC/test/certificate_wide.jsp
Normal file
@ -0,0 +1,153 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<%@ include file="../transkey/includeKeyboardSecurity.jsp" %>
|
||||
|
||||
<script src="../inca/resource/js/jquery-1.6.2.min.js"></script>
|
||||
<script src="../inca/nppfs-1.3.0.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../ahnlab/astxsdk.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../XecureKeyPad/js/xkeypad_config.js"></script>
|
||||
<script type="text/javascript" src="../XecureKeyPad/js/xkeypad_plugin.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../touchennxkey/nxKey/js/TouchEnNxKey.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
//PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function aUserCallback ()
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function init () {
|
||||
if (AnySign.mKeyCryptHTML5Enable)
|
||||
initKeyCryptHTML5 ();
|
||||
|
||||
AnySign.mAnySignEnable = false;
|
||||
AnySign.mAnySignLiteEnable = true;;
|
||||
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
setExtension_encCallback (aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="./sign_result2.jsp">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="http://reaver.softforum.com/XecureDemo/up/anySign_service_work/AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
152
src/main/webapp/AnySign4PC/test/certificate_wide_ahnlab.jsp
Normal file
152
src/main/webapp/AnySign4PC/test/certificate_wide_ahnlab.jsp
Normal file
@ -0,0 +1,152 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../AOS2/astx2.min.js"></script>
|
||||
<script type="text/javascript" src="../AOS2/astx2_ml.min.js"></script>
|
||||
<script type="text/javascript" src="../AOS2/astx2_jq.min.js"></script>
|
||||
<script type="text/javascript" src="../AOS2/astx2_custom.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function aUserCallback ()
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function initKeyboard () {
|
||||
$ASTX2.init(function onSuccess(){
|
||||
//alert("ASTX init Success");
|
||||
}, function onFailure(){
|
||||
//alert("ASTX init Fail");
|
||||
});
|
||||
}
|
||||
|
||||
function init () {
|
||||
initKeyboard ();
|
||||
|
||||
AnySign.mASTxEnable = true;
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
setExtension_encCallback (aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="./sign_result2.jsp">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="http://reaver.softforum.com/XecureDemo/up/qa_anySign/AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
160
src/main/webapp/AnySign4PC/test/certificate_wide_inca.jsp
Normal file
160
src/main/webapp/AnySign4PC/test/certificate_wide_inca.jsp
Normal file
@ -0,0 +1,160 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<script src="../inca/resource/js/jquery-1.6.2.min.js"></script>
|
||||
<script src="../inca/nppfs-1.3.0.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function aUserCallback ()
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function initKeyboard() {
|
||||
var aVersion = getIEVersion ();
|
||||
var aPlatform = AnySign.mPlatform.aName;
|
||||
var aKeyCryptHTML5 = false;
|
||||
|
||||
if (aVersion)
|
||||
{
|
||||
if (aVersion > 6)
|
||||
aKeyCryptHTML5 = true;
|
||||
}
|
||||
else if (aPlatform != "linux" && aPlatform != "mac universal")
|
||||
{
|
||||
aKeyCryptHTML5 = true;
|
||||
}
|
||||
|
||||
if (aKeyCryptHTML5)
|
||||
npPfsStartup("document.form1", false, true, false, false, "npkencrypt", "On");
|
||||
}
|
||||
|
||||
function init() {
|
||||
initKeyboard();
|
||||
|
||||
AnySign.mKeyCryptHTML5Enable = true;
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
setExtension_encCallback (aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="./sign_result2.jsp">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="http://reaver.softforum.com/XecureDemo/up/qa_anySign/AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
148
src/main/webapp/AnySign4PC/test/certificate_wide_inca10.jsp
Normal file
148
src/main/webapp/AnySign4PC/test/certificate_wide_inca10.jsp
Normal file
@ -0,0 +1,148 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/js/jquery-1.11.0.min.js"></script>
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/js/jquery-ui-1.10.3.js"></script>
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/jsp/nppfs.script.jsp"></script>
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/js/nppfs-1.0.0.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function aUserCallback ()
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function initKeyboard () {
|
||||
npPfsStartup(document.form1, false, true, false, true, "npkencrypt", "on");
|
||||
}
|
||||
|
||||
function init () {
|
||||
initKeyboard();
|
||||
|
||||
AnySign.mIncaNOSv10Enable = true;
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
setExtension_encCallback (aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="./sign_result2.jsp">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="http://reaver.softforum.com/XecureDemo/up/qa_anySign/AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
144
src/main/webapp/AnySign4PC/test/certificate_wide_kos.jsp
Normal file
144
src/main/webapp/AnySign4PC/test/certificate_wide_kos.jsp
Normal file
@ -0,0 +1,144 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<script type="text/javascript" src="../KOS/kdfense_object.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function aUserCallback ()
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function initKeyboard() {
|
||||
KOS.init();
|
||||
}
|
||||
|
||||
function init() {
|
||||
initKeyboard();
|
||||
|
||||
AnySign.mKOSKeyEnable = true;
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
setExtension_encCallback (aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="./sign_result2.jsp">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="http://reaver.softforum.com/XecureDemo/up/qa_anySign/AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
144
src/main/webapp/AnySign4PC/test/certificate_wide_nxkey.jsp
Normal file
144
src/main/webapp/AnySign4PC/test/certificate_wide_nxkey.jsp
Normal file
@ -0,0 +1,144 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<script type="text/javascript" src="../touchennxkey/nxKey/js/TouchEnNxKey.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "./sign_result.jsp";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function aUserCallback ()
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", 3, signResult_callback);
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function initKeyboard () {
|
||||
TK_Loading();
|
||||
}
|
||||
|
||||
function init () {
|
||||
initKeyboard ();
|
||||
|
||||
AnySign.mTouchEnnxKeyEnable = true;
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
setExtension_encCallback (aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="./sign_result2.jsp">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="http://reaver.softforum.com/XecureDemo/up/qa_anySign/AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
830
src/main/webapp/AnySign4PC/test/certselectwide.jsp
Normal file
830
src/main/webapp/AnySign4PC/test/certselectwide.jsp
Normal file
@ -0,0 +1,830 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%
|
||||
request.setCharacterEncoding("utf-8");
|
||||
response.setContentType("text/html; charset=utf-8");
|
||||
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
|
||||
String sign_result_page = "./sign_result.jsp";
|
||||
%>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
|
||||
<head>
|
||||
<title>Page Title - 바닥페이지</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
form {margin:0px 0px 0px 0px;}
|
||||
input.largebtn { width: 500px; }
|
||||
input.mediumbtn { width: 300px; }
|
||||
input.smallbtn { width: 150px; }
|
||||
h1, h2, h3, h4 { margin:0;}
|
||||
h3 { font-size:13pt; background-color:#EEE;}
|
||||
.test {border:1px dashed gray;}
|
||||
.test td {font-size: 9pt;color: #333333;background: #EEEEEE;text-align: center;}
|
||||
select.combo {width:150px; font-size: 9pt;color: #333333;;}
|
||||
.inputtext {width: 100%;}
|
||||
.inputtextarea {width: 100%;word-break:break-all;}
|
||||
ainput{border:0px; margin:2px; padding:1px;}
|
||||
.inputbutton {width: 100%;height: 100%; border:1px solid #d3d3d3; margin:2px; padding:1px;}
|
||||
.inputcheck {width: 14px;height: 14px;}
|
||||
-->
|
||||
</style>
|
||||
|
||||
<!-- nProtect KeyCrypt HTML5
|
||||
<script type="text/javascript" src="../inca/resource/js/jquery-1.6.2.min.js"></script>
|
||||
<script type="text/javascript" src="../inca/nppfs-1.3.0.js"></script-->
|
||||
|
||||
<!-- nProtect Online Security V1.0 -->
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/js/jquery-1.11.0.min.js"></script>
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/js/jquery-ui-1.10.3.js"></script>
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/jsp/nppfs.script.jsp"></script>
|
||||
<script type="text/javascript" src="../inca_nos10/pluginfree/js/nppfs-1.0.0.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<!-- TouchenKey / Transkey -->
|
||||
<%@ include file="../transkey/includeKeyboardSecurity.jsp" %>
|
||||
|
||||
<!-- TouchEn nxKey -->
|
||||
<script type="text/javascript" src="../touchennxkey/nxKey/js/TouchEnNxKey.js"></script>
|
||||
|
||||
<!-- Openkeyboard
|
||||
<SCRIPT type="text/javascript" src="../besoft/openkeyboard/openkeyboard_ac.js"></SCRIPT>
|
||||
-->
|
||||
|
||||
<!-- AhnLab Safe Transaction -->
|
||||
<script type="text/javascript" src="../AOS2/astx2.min.js"></script>
|
||||
<script type="text/javascript" src="../AOS2/astx2_ml.min.js"></script>
|
||||
<script type="text/javascript" src="../AOS2/astx2_jq.min.js"></script>
|
||||
<script type="text/javascript" src="../AOS2/astx2_custom.js"></script>
|
||||
|
||||
<!-- Kings Online Security -->
|
||||
<script type="text/javascript" src="../KOS/kdfense_object.js"></script>
|
||||
|
||||
<!-- XecureKeyPad Plugin
|
||||
<script type="text/javascript" src="../XecureKeyPad/js/xkeypad_config.js"></script>
|
||||
<script type="text/javascript" src="../XecureKeyPad/js/xkeypad_plugin.js"></script>
|
||||
-->
|
||||
|
||||
<!-- XecureKeyPad HTML5
|
||||
<script type="text/javascript" src="../XecureKeypad_html5/js/xkeypad_config.js"></script>
|
||||
<script type="text/javascript" src="../XecureKeypad_html5/js/xkeypad_html5.js"></script>
|
||||
-->
|
||||
|
||||
<!-- XecureKeyPad Plugin, Lite(HTML5), E2E(XFS) -->
|
||||
<script type="text/javascript" src="../XecureKeypad2/js/xkeypad_config.js"></script>
|
||||
<script type="text/javascript" src="../XecureKeypad2/js/xkeypad_html5.js"></script>
|
||||
<script type="text/javascript" src="../XecureKeypad2/js/xkeypad_plugin.js"></script>
|
||||
<script type="text/javascript" src="../XecureKeypad2/js/xkeypad_desktop.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
//PrintObjectTag();
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function onSendToServer(value)
|
||||
{
|
||||
|
||||
var aRequest = new XMLHttpRequest ();
|
||||
var aResponse = "";
|
||||
var aURL = "";
|
||||
var aMessage = "";
|
||||
|
||||
aURL = "<%=sign_result_page%>";
|
||||
aRequest.open ("POST", aURL, false);
|
||||
aRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
||||
aRequest.send ("SIGNED=" + encodeURIComponent(value));
|
||||
|
||||
try
|
||||
{
|
||||
aResponse = eval (aRequest.responseText);
|
||||
|
||||
if (parseInt (aResponse["code"]) != 0)
|
||||
{
|
||||
alert ("오류코드:" + aResponse["code"] + "\n" +
|
||||
"오류메시지:" + aResponse["reason"]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (evalException)
|
||||
{
|
||||
alert ("Evaluate exception(" + evalException + "):\n" + aRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
aMessage += "사용자 RDN:\n" + aResponse["subjectRDN"] + "\n";
|
||||
aMessage += "사용자 인증서:\n" + aResponse["certificatePEM"] + "\n";
|
||||
|
||||
alert (aMessage);
|
||||
|
||||
}
|
||||
|
||||
function onOKButton(e) {
|
||||
document.getElementById('signature_data').value = "";
|
||||
document.getElementById("xwup_OkButton").onclick();
|
||||
}
|
||||
|
||||
function signResult_callback (aResult)
|
||||
{
|
||||
document.getElementById('signature_data').value = aResult;
|
||||
}
|
||||
|
||||
function loadingDone (aResultFunc)
|
||||
{
|
||||
var aElement = document.getElementById("loadingAnySign");
|
||||
aElement.parentNode.removeChild (aElement);
|
||||
|
||||
if (typeof aResultFunc == "function")
|
||||
aResultFunc (0);
|
||||
}
|
||||
|
||||
function SignDataCMS ()
|
||||
{
|
||||
var btnSignData = document.getElementById("btnSignDataCMS");
|
||||
btnSignData.disabled = true;
|
||||
|
||||
if (AnySign.setAnySignLite())
|
||||
loadingDone ();
|
||||
else
|
||||
setExternal_callback (loadingDone);
|
||||
|
||||
AnySign.mDivInsertOption = 1;
|
||||
AnySign.SetUITarget(document.getElementById('certDialog'));
|
||||
|
||||
AnySign.SignDataCMS (AnySign.mXgateAddress, AnySign.mCAList, "hello", 0, "", AnySign.mLimitedTrial, signResult_callback);
|
||||
}
|
||||
|
||||
function init () {
|
||||
checkCommonSetting();
|
||||
checkAnySign4PC();
|
||||
checkAnySignLite();
|
||||
checkXecureFreeSign();
|
||||
checkKeyboard();
|
||||
}
|
||||
|
||||
// 공통 설정
|
||||
function checkCommonSetting()
|
||||
{
|
||||
var aLanguage = document.getElementById("form_CommonSetting").Language;
|
||||
for (var i = 0; i < aLanguage.length; i++)
|
||||
{
|
||||
if (AnySign.mLanguage == aLanguage[i].value)
|
||||
{
|
||||
aLanguage[i].checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function enableLanguage(element)
|
||||
{
|
||||
AnySign.mLanguage = element.value;
|
||||
}
|
||||
|
||||
// 키보드 보안, 가상 키패드 설정
|
||||
function enableSecureKey(element)
|
||||
{
|
||||
// 가상 키패드
|
||||
if (element.id == "Enable_Transkey") {
|
||||
AnySign.mTransKeyEnable =! AnySign.mTransKeyEnable;
|
||||
if (AnySign.mTransKeyEnable) {
|
||||
AnySign.mXecureKeyPadEnable = false;
|
||||
AnySign.mOpenkeyboardEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
}
|
||||
}
|
||||
if (element.id == "Enable_XecureKeyPad") {
|
||||
AnySign.mXecureKeyPadEnable =! AnySign.mXecureKeyPadEnable;
|
||||
if (AnySign.mXecureKeyPadEnable) {
|
||||
AnySign.mTransKeyEnable = false;
|
||||
AnySign.mOpenkeyboardEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
}
|
||||
}
|
||||
if (element.id == "Enable_Openkeyboard") {
|
||||
AnySign.mOpenkeyboardEnable =! AnySign.mOpenkeyboardEnable;
|
||||
if (AnySign.mOpenkeyboardEnable) {
|
||||
AnySign.mTransKeyEnable = false;
|
||||
AnySign.mXecureKeyPadEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 키보드 보안
|
||||
if (element.id == "Enable_TouchEnKey")
|
||||
{
|
||||
AnySign.mTouchEnKeyEnable =! AnySign.mTouchEnKeyEnable;
|
||||
if (AnySign.mTouchEnKeyEnable) {
|
||||
AnySign.mKeyCryptHTML5Enable = false;
|
||||
AnySign.mASTxEnable = false;
|
||||
AnySign.mTouchEnnxKeyEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
AnySign.mKOSKeyEnable = false;
|
||||
}
|
||||
}
|
||||
if (element.id == "Enable_KeyCryptHTLM5")
|
||||
{
|
||||
AnySign.mKeyCryptHTML5Enable =! AnySign.mKeyCryptHTML5Enable;
|
||||
if (AnySign.mKeyCryptHTML5Enable) {
|
||||
AnySign.mTouchEnKeyEnable = false;
|
||||
AnySign.mASTxEnable = false;
|
||||
AnySign.mTouchEnnxKeyEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
AnySign.mKOSKeyEnable = false;
|
||||
}
|
||||
}
|
||||
if (element.id == "Enable_ASTx")
|
||||
{
|
||||
AnySign.mASTxEnable = !AnySign.mASTxEnable;
|
||||
if (AnySign.mASTxEnable) {
|
||||
AnySign.mTouchEnKeyEnable = false;
|
||||
AnySign.mKeyCryptHTML5Enable = false;
|
||||
AnySign.mTouchEnnxKeyEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
AnySign.mKOSKeyEnable = false;
|
||||
}
|
||||
}
|
||||
if (element.id == "Enable_TouchEnnxKey")
|
||||
{
|
||||
AnySign.mTouchEnnxKeyEnable =! AnySign.mTouchEnnxKeyEnable;
|
||||
if (AnySign.mTouchEnnxKeyEnable) {
|
||||
AnySign.mTouchEnKeyEnable = false;
|
||||
AnySign.mKeyCryptHTML5Enable = false;
|
||||
AnySign.mASTxEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
AnySign.mKOSKeyEnable = false;
|
||||
}
|
||||
}
|
||||
if (element.id == "Enable_KOSKey")
|
||||
{
|
||||
AnySign.mKOSKeyEnable =! AnySign.mKOSKeyEnable;
|
||||
if (AnySign.mKOSKeyEnable) {
|
||||
AnySign.mTouchEnKeyEnable = false;
|
||||
AnySign.mKeyCryptHTML5Enable = false;
|
||||
AnySign.mASTxEnable = false;
|
||||
AnySign.mTouchEnnxKeyEnable = false;
|
||||
AnySign.mIncaNOSv10Enable = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 키보드 보안 + 가상 키패드
|
||||
if (element.id == "Enable_IncaNOSv10")
|
||||
{
|
||||
AnySign.mIncaNOSv10Enable =! AnySign.mIncaNOSv10Enable;
|
||||
if (AnySign.mIncaNOSv10Enable) {
|
||||
AnySign.mTransKeyEnable = false;
|
||||
AnySign.mXecureKeyPadEnable = false;
|
||||
AnySign.mOpenkeyboardEnable = false;
|
||||
AnySign.mTouchEnKeyEnable = false;
|
||||
AnySign.mKeyCryptHTML5Enable = false;
|
||||
AnySign.mASTxEnable = false;
|
||||
AnySign.mTouchEnnxKeyEnable = false;
|
||||
AnySign.mKOSKeyEnable = false;
|
||||
}
|
||||
}
|
||||
|
||||
checkKeyboard();
|
||||
}
|
||||
|
||||
function enableSecureKey_Lite(element)
|
||||
{
|
||||
AnySign.mXecureKeyPadHTML5Enable =! AnySign.mXecureKeyPadHTML5Enable;
|
||||
document.getElementById("Enable_XecureKeyPadHTML5").value = AnySign.mXecureKeyPadHTML5Enable;
|
||||
}
|
||||
|
||||
function enableSecureKey_E2E(element)
|
||||
{
|
||||
AnySign.mXecureKeyPadE2EEnable =! AnySign.mXecureKeyPadE2EEnable;
|
||||
document.getElementById("Enable_XecureKeyPadE2E").value = AnySign.mXecureKeyPadE2EEnable;
|
||||
}
|
||||
|
||||
function checkKeyboard()
|
||||
{
|
||||
// AnySign4PC
|
||||
document.getElementById("Enable_Transkey").value = AnySign.mTransKeyEnable;
|
||||
document.getElementById("Enable_XecureKeyPad").value = AnySign.mXecureKeyPadEnable;
|
||||
document.getElementById("Enable_Openkeyboard").value = AnySign.mOpenkeyboardEnable;
|
||||
document.getElementById("Enable_TouchEnKey").value = AnySign.mTouchEnKeyEnable;
|
||||
document.getElementById("Enable_KeyCryptHTLM5").value = AnySign.mKeyCryptHTML5Enable;
|
||||
document.getElementById("Enable_ASTx").value = AnySign.mASTxEnable;
|
||||
document.getElementById("Enable_TouchEnnxKey").value = AnySign.mTouchEnnxKeyEnable;
|
||||
document.getElementById("Enable_IncaNOSv10").value = AnySign.mIncaNOSv10Enable;
|
||||
document.getElementById("Enable_KOSKey").value = AnySign.mKOSKeyEnable;
|
||||
|
||||
// AnySignLite
|
||||
document.getElementById("Enable_XecureKeyPadHTML5").value = AnySign.mXecureKeyPadHTML5Enable;
|
||||
|
||||
// XecureFreeSign
|
||||
document.getElementById("Enable_XecureKeyPadE2E").value = AnySign.mXecureKeyPadE2EEnable;
|
||||
|
||||
// check Module Load
|
||||
if (navigator.userAgent.indexOf("MSIE") >= 0)
|
||||
document.getElementById("Load_TouchEnKey").innerHTML = document.TouchEnKey != null && typeof(document.TouchEnKey) != "undefined" && document.TouchEnKey.object != null;
|
||||
else
|
||||
document.getElementById("Load_TouchEnKey").innerHTML = document.getElementById("TouchEnKey") != null && typeof(document.getElementById("TouchEnKey")) != "undefined";
|
||||
|
||||
// init keyboard
|
||||
if (AnySign.mKeyCryptHTML5Enable || AnySign.mASTxEnable || AnySign.mTouchEnnxKeyEnable || AnySign.mIncaNOSv10Enable || AnySign.mKOSKeyEnable) {
|
||||
if (AnySign.mAnySignLoad) {
|
||||
setExternalCallback(false);
|
||||
initKeyboard();
|
||||
} else {
|
||||
setExternalCallback(true);
|
||||
}
|
||||
} else {
|
||||
setExternalCallback(false);
|
||||
}
|
||||
}
|
||||
|
||||
function initKeyboard()
|
||||
{
|
||||
// init
|
||||
if (document.getElementById("Enable_TouchEnnxKey").value == "true")
|
||||
initTouchEnnxKey();
|
||||
|
||||
if (document.getElementById("Enable_KeyCryptHTLM5").value == "true")
|
||||
initKeyCryptHTML5();
|
||||
|
||||
if (document.getElementById("Enable_IncaNOSv10").value == "true")
|
||||
initIncaNOSv10();
|
||||
|
||||
if (document.getElementById("Enable_ASTx").value == "true")
|
||||
initASTx();
|
||||
|
||||
if (document.getElementById("Enable_KOSKey").value == "true")
|
||||
initKOS();
|
||||
}
|
||||
|
||||
function initTouchEnnxKey()
|
||||
{
|
||||
/*
|
||||
설치 체크
|
||||
TouchEnNxKey.js
|
||||
TK_LoadingCallback() -> 로딩 완료 : tk_initDone(0)
|
||||
TK_installPage() -> 미설치 : 설치페이지 이동 (location.href)
|
||||
*/
|
||||
tk_initDone = doneTouchEnnxKey;
|
||||
TK_Loading();
|
||||
}
|
||||
function doneTouchEnnxKey(aResult)
|
||||
{
|
||||
document.getElementById("Enable_TouchEnnxKey").style.fontWeight = "bold";
|
||||
doneKeyboard(aResult);
|
||||
}
|
||||
|
||||
function initKeyCryptHTML5()
|
||||
{
|
||||
var aVersion = getIEVersion ();
|
||||
var aPlatform = AnySign.mPlatform.aName;
|
||||
var aKeyCryptHTML5 = false;
|
||||
|
||||
if (aVersion)
|
||||
{
|
||||
if (aVersion > 6)
|
||||
aKeyCryptHTML5 = true;
|
||||
}
|
||||
else if (aPlatform != "linux" && aPlatform != "mac universal")
|
||||
{
|
||||
aKeyCryptHTML5 = true;
|
||||
}
|
||||
|
||||
/*
|
||||
설치 체크
|
||||
nppfs-1.0.0.js
|
||||
npPfsStartup.options
|
||||
Loading.After -> 로딩 완료 : inca_initDone(0)
|
||||
MoveToInstall -> 미설치 : 설치페이지 이동 확인 (confirm)
|
||||
*/
|
||||
if (aKeyCryptHTML5) {
|
||||
inca_initDone = doneKeyCryptHTML5;
|
||||
npPfsStartup("document.form1", false, true, false, false, "npkencrypt", "On");
|
||||
}
|
||||
}
|
||||
|
||||
function doneKeyCryptHTML5(aResult)
|
||||
{
|
||||
document.getElementById("Enable_KeyCryptHTLM5").style.fontWeight = "bold";
|
||||
doneKeyboard(aResult);
|
||||
}
|
||||
|
||||
function initIncaNOSv10()
|
||||
{
|
||||
/*
|
||||
설치 체크
|
||||
nppfs-1.0.0.js
|
||||
npPfsStartup.options
|
||||
Loading.After -> 로딩 완료 : nos_initDone(0)
|
||||
MoveToInstall -> 미설치 : 설치페이지 이동 확인 (confirm)
|
||||
*/
|
||||
nos_initDone = doneIncaNOSv10;
|
||||
npPfsStartup(document.form1, false, true, false, true, "npkencrypt", "on");
|
||||
}
|
||||
function doneIncaNOSv10(aResult)
|
||||
{
|
||||
document.getElementById("Enable_IncaNOSv10").style.fontWeight = "bold";
|
||||
doneKeyboard(aResult);
|
||||
}
|
||||
|
||||
function initASTx() {
|
||||
$ASTX2.init(
|
||||
function onSuccess(){ // 초기화 완료
|
||||
//alert("ASTX init Success");
|
||||
doneASTx();
|
||||
},
|
||||
function onFailure(){ // 미설치
|
||||
alert("ASTX init Fail");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function doneASTx() {
|
||||
document.getElementById("Enable_ASTx").style.fontWeight = "bold";
|
||||
doneKeyboard();
|
||||
}
|
||||
|
||||
function initKOS() {
|
||||
/*
|
||||
설치 체크
|
||||
kdfense_object.js
|
||||
KOS_GetGlobalEventHandlers()
|
||||
KOS_OnReady() -> 초기화 완료 : kos_initDone(0)
|
||||
KOS_OnNotInstalled() -> 미설치 : kos_initFail()
|
||||
*/
|
||||
kos_initDone = doneKOS;
|
||||
kos_initFail = failKOS;
|
||||
KOS.init();
|
||||
}
|
||||
function doneKOS(aResult)
|
||||
{
|
||||
document.getElementById("Enable_KOSKey").style.fontWeight = "bold";
|
||||
doneKeyboard(aResult);
|
||||
}
|
||||
function failKOS()
|
||||
{
|
||||
alert("KOS init Fail");
|
||||
}
|
||||
|
||||
var gInstallPage = function() {
|
||||
if(confirm("프로그램 설치가 필요합니다. 설치 페이지로 이동하시겠습니까?"))
|
||||
document.location.href = AnySign.mPlatform.aInstallPage;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------------*
|
||||
* AnySign4PC 실행 시 외부 설치 체크 함수 등록 방법 (예: 키보드 보안 모듈 설치 체크)
|
||||
* 인증서 선택창의 저장매체 클릭 시 AnySign4PC 설치 체크와 함께
|
||||
* 외부 모듈(키보드 보안 등) 설치 체크와 초기화가 필요한 경우 아래와 같이 셋팅한다.
|
||||
*
|
||||
* 1. 실행될 함수 작성
|
||||
* 첫번째 입력값은 리턴할 콜백 함수로 사용해야 한다!
|
||||
* 성공 시 콜백함수에 0(Number) 입력 또는 입력값 없이 호출한다.(이외의 값 입력은 오류 처리)
|
||||
* function initKeyboard(resultFunc) // -> function resultFunc(Number)
|
||||
* {
|
||||
* init();
|
||||
* if (success)
|
||||
* resultFunc(0); // 또는 resultFunc();
|
||||
* else
|
||||
* resultFunc(-1);
|
||||
* }
|
||||
* 2. 콜백 함수 등록
|
||||
* setExternal_callback(initKeyboard);
|
||||
*----------------------------------------------------------------------------------*/
|
||||
var gResultFunc = function(a) {};
|
||||
var doneKeyboard = function(aResult) {
|
||||
gResultFunc(aResult);
|
||||
};
|
||||
|
||||
function CB_initKeyboard(aResultFunc) {
|
||||
gResultFunc = aResultFunc;
|
||||
initKeyboard();
|
||||
}
|
||||
|
||||
function setExternalCallback(aOption) {
|
||||
if (aOption)
|
||||
setExternal_callback(CB_initKeyboard);
|
||||
else
|
||||
setExternal_callback(null);
|
||||
}
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
|
||||
// AnySign4PC 설치 확인 및 초기화
|
||||
function checkAnySign4PC()
|
||||
{
|
||||
document.getElementById("AnySign4PC_Version").innerHTML = AnySign.mVersion;
|
||||
document.getElementById("Enable_AnySignLoad").value = AnySign.mAnySignLoad;
|
||||
|
||||
if (AnySign.mAnySignLoad == true)
|
||||
document.getElementById("Enable_AnySignLoad").style.fontWeight = "bold";
|
||||
}
|
||||
|
||||
function initAnySign4PC()
|
||||
{
|
||||
checkAnySign4PC();
|
||||
if (!AnySign.mAnySignLoad) {
|
||||
AnySign4PC_LoadCallback (checkAnySign4PC);
|
||||
PrintObjectTag ();
|
||||
}
|
||||
}
|
||||
|
||||
// AnySignLite 설정
|
||||
function checkAnySignLite()
|
||||
{
|
||||
document.getElementById("Enable_AnySignLite").value = AnySign.mAnySignLiteEnable;
|
||||
}
|
||||
|
||||
function enableAnySignLite()
|
||||
{
|
||||
AnySign.mAnySignLiteEnable =! AnySign.mAnySignLiteEnable;
|
||||
document.getElementById("Enable_AnySignLite").value = AnySign.mAnySignLiteEnable;
|
||||
}
|
||||
|
||||
// XecureFreeSign 설정
|
||||
function checkXecureFreeSign()
|
||||
{
|
||||
document.getElementById("Enable_XecureFreeSign").value = AnySign.mXecureFreeSignEnable;
|
||||
|
||||
var aSignTypeRadio = document.getElementById("form_XecureFreeSign").signType;
|
||||
for (var i = 0; i < aSignTypeRadio.length; i++)
|
||||
{
|
||||
if (AnySign.mXecureFreeSignData.signType == aSignTypeRadio[i].value)
|
||||
{
|
||||
aSignTypeRadio[i].checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function enableXecureFreeSign()
|
||||
{
|
||||
AnySign.mXecureFreeSignEnable =! AnySign.mXecureFreeSignEnable;
|
||||
document.getElementById("Enable_XecureFreeSign").value = AnySign.mXecureFreeSignEnable;
|
||||
}
|
||||
|
||||
function enableSignType(element)
|
||||
{
|
||||
AnySign.mXecureFreeSignData.signType = element.value;
|
||||
|
||||
XCrypto.xfs_init(AnySign.mXecureFreeSignData.serviceURL,
|
||||
AnySign.mXecureFreeSignData.serviceKey,
|
||||
AnySign.mXecureFreeSignData.asyncOption,
|
||||
AnySign.mXecureFreeSignData.signType,
|
||||
AnySign.mWebPageStorageData.type,
|
||||
AnySign.mWebPageStorageData.certList,
|
||||
AnySign.mWebPageStorageData.storageElementID)
|
||||
}
|
||||
|
||||
function XFSLogout()
|
||||
{
|
||||
var aUserCallback = function(aResult) {
|
||||
alert(aResult);
|
||||
}
|
||||
|
||||
AnySign.XFSLogout(aUserCallback);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<table width="694" align='center' border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form id="form_CommonSetting" name="form_CommonSetting">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="694" colspan="2"><h4>공통 설정</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208">Language</td>
|
||||
<td width="486">
|
||||
<input type="radio" class="inputcheck" name="Language" value="ko-KR" onClick="enableLanguage(this)"> ko-KR
|
||||
<input type="radio" class="inputcheck" name="Language" value="en-US" onClick="enableLanguage(this)"> en-US
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="694" colspan="3"><h4>AnySign4PC 설정</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">AnySign4PC 설치 확인 및 초기화</td>
|
||||
<td width="486" >
|
||||
Version : <span id="AnySign4PC_Version"></span>
|
||||
<input id="Enable_AnySignLoad" type="button" style="width:100%" onclick="initAnySign4PC(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="84" rowspan="2">가상 키패드</td>
|
||||
<td width="124">Transkey<br>v4.5.1 (2013.01.11)</td>
|
||||
<td width="486">
|
||||
<input id="Enable_Transkey" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="124">XecureKeyPad<br>v1.0.0.2 (2016.10.19)</td>
|
||||
<td width="486">
|
||||
<input id="Enable_XecureKeyPad" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none"> <!-- 테스트 제외 -->
|
||||
<td width="124">Openkeyboard<br>v1.0 (2013.07.21)</td>
|
||||
<td width="486">
|
||||
<input id="Enable_Openkeyboard" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none"> <!-- 테스트 제외 -->
|
||||
<td rowspan="4">키보드 보안</td>
|
||||
<td>TouchenKey<br>v3.1.0.11 (2013.02.26)</td>
|
||||
<td>
|
||||
Module Load (ActiveX/Plugin): <span id="Load_TouchEnKey"></span> <a href="../touchen/installpage/install.html">[설치페이지]</a>
|
||||
<input id="Enable_TouchEnKey" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none"> <!-- 테스트 제외 -->
|
||||
<td>nProtect KeyCrypt HTML5</td>
|
||||
<td>
|
||||
<a href="../inca/nos_setup.exe">[설치파일]</a>
|
||||
<input id="Enable_KeyCryptHTLM5" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">키보드 보안</td>
|
||||
<td>AhnLab Safe Transaction<br>v1.3.4.393(2015.12.30)</td>
|
||||
<td>
|
||||
<!--<a href="http://ahnlabnotice.nefficient.co.kr/astx_demo/master/astx_setup.exe">[설치파일]</a>-->
|
||||
<a href="../AOS2/files/astx_setup_offline.exe">[설치파일]</a>
|
||||
<input id="Enable_ASTx" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TouchEn nxKey<br>v1.0.0.8 (2015.07.24)</td>
|
||||
<td>
|
||||
<a href="../touchennxkey/install/install.html">[설치페이지]</a>
|
||||
<input id="Enable_TouchEnnxKey" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kings Online Security<br>v1.0.0.7 (2016.04.07)</td>
|
||||
<td>
|
||||
<a href="../KOS/KOS_Setup.exe">[설치파일]</a>
|
||||
<input id="Enable_KOSKey" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>키보드 보안 + 가상 키패드</td>
|
||||
<td>nProtect Online Security V1.0<br>v1.0 (2015.12.23)</td>
|
||||
<td>
|
||||
<a href="../inca_nos10/nos_setup.exe">[설치파일]</a>
|
||||
<input id="Enable_IncaNOSv10" type="button" style="width:100%" onclick="enableSecureKey(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>보안 토큰</td>
|
||||
<td>XecureHSM 1.1.0.0</td>
|
||||
<td>
|
||||
http://download.softforum.co.kr/Published/XecureHSM/xhsm_install.exe
|
||||
<a href="http://download.softforum.co.kr/Published/XecureHSM/xhsm_install.exe">[다운로드]</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="694" colspan="3"><h4>AnySignLite 설정</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">AnySignLite 사용 유무</td>
|
||||
<td width="486" >
|
||||
<input id="Enable_AnySignLite" type="button" style="width:100%" onclick="enableAnySignLite(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="84">가상 키패드</td>
|
||||
<td width="124">XecureKeyPad Lite<br>v1.0.0.2 (2016.09.28)</td>
|
||||
<td width="486">
|
||||
<input id="Enable_XecureKeyPadHTML5" type="button" style="width:100%" onclick="enableSecureKey_Lite(this);">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<form id="form_XecureFreeSign" name="form_XecureFreeSign">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="694" colspan="3"><h4>XecureFreeSign 설정</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">XecureFreeSign 사용 유무</td>
|
||||
<td width="486" >
|
||||
<input id="Enable_XecureFreeSign" type="button" style="width:100%" onclick="enableXecureFreeSign(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">서명 방식</td>
|
||||
<td width="486" >
|
||||
<input type="radio" class="inputcheck" name="signType" value="server" onClick="enableSignType(this)"> server
|
||||
<input type="radio" class="inputcheck" name="signType" value="server-digest" onClick="enableSignType(this)"> server-digest
|
||||
<input type="radio" class="inputcheck" name="signType" value="client" onClick="enableSignType(this)"> client
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="84">가상 키패드</td>
|
||||
<td width="124">XecureKeyPad E2E<br>v1.0.1.0 (2017.01.17)</td>
|
||||
<td width="486">
|
||||
<input id="Enable_XecureKeyPadE2E" type="button" style="width:100%" onclick="enableSecureKey_E2E(this);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="208" colspan="2">OpenAPI</td>
|
||||
<td width="486" >
|
||||
<input type="button" value="Logout" onclick="XFSLogout();">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<h3 id="1">SignDataCMS</h3>
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="694">
|
||||
<input id="btnSignDataCMS" type="button" class="inputbutton" style="height:auto;" value="AnySign.SignDataCMS"
|
||||
onClick="SignDataCMS()" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<table width="948px" align='center' border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form id="form_SignDataCMS" name="form_SignDataCMS" method="post" action="#">
|
||||
<div id="certDialog"></div>
|
||||
<img id="loadingAnySign" src="../AnySign4PC/img/loader.gif">
|
||||
<br>
|
||||
<!-- result signature data -->
|
||||
<input type="button" value="OK" onclick="onOKButton(event);">
|
||||
<p>
|
||||
<textarea id="signature_data" style="width:940px;height:100px"></textarea>
|
||||
<br>
|
||||
<input type="button" value="서버에 확인" onclick="onSendToServer (document.getElementById('signature_data').value); return false;">
|
||||
</p>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
100
src/main/webapp/AnySign4PC/test/check_integrity.jsp
Normal file
100
src/main/webapp/AnySign4PC/test/check_integrity.jsp
Normal file
@ -0,0 +1,100 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="javax.crypto.Mac" %>
|
||||
<%@ page import="javax.crypto.SecretKey" %>
|
||||
<%@ page import="javax.crypto.spec.SecretKeySpec" %>
|
||||
|
||||
<%
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
SignVerifier verifier = null;
|
||||
|
||||
StringBuffer aResponse = new StringBuffer ();
|
||||
|
||||
String sm = request.getParameter("SIGNED");
|
||||
String integrityValue = request.getParameter("ITGTVALUE");
|
||||
String DaemonPortNumber = request.getParameter("PORTVALUE");
|
||||
|
||||
if (sm != null && sm.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
if (sm != null && sm.length() < 3100)
|
||||
{
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + "-1000" + "\",");
|
||||
aResponse.append ("reason:\"" + "invalid parameter" + "\",");
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
return;
|
||||
}
|
||||
/* Hex encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , sm, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , sm, 1);
|
||||
System.out.println ("base64:" + sm);
|
||||
}
|
||||
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + verifier.getLastError () + "\",");
|
||||
aResponse.append ("reason:\"" + verifier.getLastErrorMsg () + "\",");
|
||||
|
||||
if (verifier.getLastError() == 0)
|
||||
{
|
||||
aResponse.append ("plain:\"" + verifier.getVerifiedMsg_Text () + "\",");
|
||||
aResponse.append ("certificatePEM:\"" + verifier.getSignerCertificate().getCertPem ().replaceAll ("\n", "") + "\",");
|
||||
aResponse.append ("subjectRDN:\"" + verifier.getSignerCertificate().getSubject () + "\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
return;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// check integrity code start.
|
||||
|
||||
int VerifyResult = verifier.verifyAnySignIntegrity(integrityValue,DaemonPortNumber);
|
||||
|
||||
if (VerifyResult != 0)
|
||||
{
|
||||
// 무결성 검증 실패
|
||||
// 필요한 경우 현재 서버의 사용자 세션을 삭제하거나 서비스를 중단시키는 것을 권고한다.
|
||||
//
|
||||
// 서버 사용자 세션 중단코드 작성 공간
|
||||
// -------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
// -------------------------------------
|
||||
|
||||
//out.println ("alert(\"Integrity Check Fail!!\");");
|
||||
aResponse.setLength(0);
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + verifier.getLastError () + "\",");
|
||||
aResponse.append ("reason:\"" + verifier.getLastErrorMsg () + "\",");
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//out.println ("alert(\"Integrity Check Success!!\");");
|
||||
}
|
||||
|
||||
// check integrity finish.
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
%>
|
||||
|
||||
35
src/main/webapp/AnySign4PC/test/dev_server.jsp
Normal file
35
src/main/webapp/AnySign4PC/test/dev_server.jsp
Normal file
@ -0,0 +1,35 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
String envData = request.getParameter("ENVDATA");
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
|
||||
if (envData == null || envData.length() == 0)
|
||||
{
|
||||
out.println("invalid param");
|
||||
return;
|
||||
}
|
||||
|
||||
if (envData.substring(0,1).equalsIgnoreCase("3") == false)
|
||||
{
|
||||
out.println("invalid param");
|
||||
return;
|
||||
}
|
||||
|
||||
EnvelopeData ed = new EnvelopeData(aXecureConfig);
|
||||
String result = ed.deEnvelopeData(envData);
|
||||
|
||||
if (ed.getLastError() == 0)
|
||||
{
|
||||
out.println(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
out.println("Error:[" + ed.getLastError() + "]" + ed.getLastErrorMsg());
|
||||
}
|
||||
%>
|
||||
1384
src/main/webapp/AnySign4PC/test/enc_server_response.jsp
Normal file
1384
src/main/webapp/AnySign4PC/test/enc_server_response.jsp
Normal file
File diff suppressed because it is too large
Load Diff
1422
src/main/webapp/AnySign4PC/test/enc_server_response_20.jsp
Normal file
1422
src/main/webapp/AnySign4PC/test/enc_server_response_20.jsp
Normal file
File diff suppressed because it is too large
Load Diff
2622
src/main/webapp/AnySign4PC/test/fcms.jsp
Normal file
2622
src/main/webapp/AnySign4PC/test/fcms.jsp
Normal file
File diff suppressed because it is too large
Load Diff
479
src/main/webapp/AnySign4PC/test/fcms_updownloadex.jsp
Normal file
479
src/main/webapp/AnySign4PC/test/fcms_updownloadex.jsp
Normal file
@ -0,0 +1,479 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<%@ page import="java.io.File" %>
|
||||
<%
|
||||
File file = null;
|
||||
int i = 0;
|
||||
File[] files = null;
|
||||
|
||||
String realPath = "/home/eomjh/workspace/FCMS/js/test/FileStore/";
|
||||
file = new File(realPath);
|
||||
if (file.exists() && file.isDirectory())
|
||||
{
|
||||
files = file.listFiles();
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<style type="text/css">
|
||||
form {margin:0px 0px 0px 0px;}
|
||||
input.largebtn { width: 500px; }
|
||||
input.mediumbtn { width: 300px; }
|
||||
input.smallbtn { width: 150px; }
|
||||
h1, h2, h3, h4 { margin:0;}
|
||||
h3 { font-size:13pt; background-color:#EEE;}
|
||||
b {color: blue}
|
||||
.test {border:1px dashed gray;}
|
||||
.test td {font-size: 9pt;color: #333333;background: #EEEEEE;text-align: center;}
|
||||
select.combo {width:150px; font-size: 9pt;color: #333333;;}
|
||||
.inputtext {width: 100%;}
|
||||
.inputtextarea {width: 100%;word-break:break-all;}
|
||||
.inputselect {width: 100%;}
|
||||
ainput{border:0px; margin:2px; padding:1px;}
|
||||
.inputbutton {width: 100%;height: 100%; border:1px solid #d3d3d3; margin:2px; padding:1px;}
|
||||
.inputcheck {width: 14px;height: 14px;}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<script language='javascript'>
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
%>
|
||||
AnySign.mAnySignLiteEnable = false;
|
||||
PrintObjectTag ();
|
||||
</script>
|
||||
|
||||
<script language='javascript'>
|
||||
function init()
|
||||
{
|
||||
initForm();
|
||||
numbering();
|
||||
}
|
||||
|
||||
function numbering ()
|
||||
{
|
||||
var aElements = document.getElementsByTagName('h3');
|
||||
|
||||
for (i = 0 ; i < aElements.length ; i++)
|
||||
{
|
||||
aElements[i].innerHTML = (i + 1) + ". " + aElements[i].innerHTML;
|
||||
aElements.id = "elem" + (i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function initForm ()
|
||||
{
|
||||
var aPort = "";
|
||||
if (window.location.port == "") {
|
||||
if (window.location.protocol == "https:") aPort = "443";
|
||||
else aPort = "80";
|
||||
} else {
|
||||
aPort = window.location.port;
|
||||
}
|
||||
|
||||
var aPathname = location.pathname;
|
||||
var aLastIndex = aPathname.lastIndexOf("/");
|
||||
|
||||
// form_UploadFileEx
|
||||
document.getElementById ("form_UploadFileEx").aXgateAddress.value = AnySign.mXgateAddress;
|
||||
document.getElementById ("form_UploadFileEx").aHostName.value = window.location.hostname;
|
||||
document.getElementById ("form_UploadFileEx").aPort.value = 80;
|
||||
document.getElementById ("form_UploadFileEx").aSID.value = document.cookie || "B7445038AB051E1E9BBBE5C47623361AE2B2768F";
|
||||
document.getElementById ("form_UploadFileEx").aPath.value = aPathname.substring(0, aLastIndex) + "/file_upload.jsp";
|
||||
document.getElementById ("form_UploadFileEx").aQuery.value = "param1=test.txt¶m2=한글테스트";
|
||||
document.getElementById ("form_UploadFileEx").aDescription.value = "파일을 업로드합니다.";
|
||||
|
||||
// form_DownloadFileEx
|
||||
document.getElementById ("form_DownloadFileEx").aXgateAddress.value = AnySign.mXgateAddress;
|
||||
document.getElementById ("form_DownloadFileEx").aHostName.value = window.location.hostname;
|
||||
document.getElementById ("form_DownloadFileEx").aPort.value = 80;
|
||||
document.getElementById ("form_DownloadFileEx").aSID.value = document.cookie || "B7445038AB051E1E9BBBE5C47623361AE2B2768F";
|
||||
document.getElementById ("form_DownloadFileEx").aPath.value = aPathname.substring(0, aLastIndex) + "/file_download.jsp";
|
||||
document.getElementById ("form_DownloadFileEx").aQuery.value = "param1=test.txt¶m2=한글테스트 똠벩";
|
||||
document.getElementById ("form_DownloadFileEx").aDescription.value = "파일을 다운로드합니다.";
|
||||
}
|
||||
|
||||
function sumCheckbox (aCheckbox)
|
||||
{
|
||||
var aIter;
|
||||
var aTotal = 0;
|
||||
|
||||
for (aIter = 0;aIter < aCheckbox.length;aIter++)
|
||||
{
|
||||
if (aCheckbox[aIter].checked)
|
||||
aTotal += parseInt (aCheckbox[aIter].value);
|
||||
}
|
||||
|
||||
return aTotal;
|
||||
}
|
||||
|
||||
function sumSelect (aSelect)
|
||||
{
|
||||
var aIter;
|
||||
var aTotal = "";
|
||||
|
||||
for (aIter = 0;aIter < aSelect.length;aIter++)
|
||||
{
|
||||
if (aSelect[aIter].selected)
|
||||
{
|
||||
aTotal += aSelect[aIter].value;
|
||||
aTotal += "|";
|
||||
}
|
||||
}
|
||||
|
||||
aTotal = aTotal.substring (0, aTotal.length - 1);
|
||||
|
||||
return aTotal;
|
||||
}
|
||||
|
||||
function setChar (form)
|
||||
{
|
||||
if (form.aCharset[0].checked)
|
||||
return "utf-8";
|
||||
else
|
||||
return "euc-kr";
|
||||
}
|
||||
|
||||
function onSelectOpenFileCallback(result) {
|
||||
if (result != "") {
|
||||
g_input.value = result;
|
||||
|
||||
if (g_option == 0 && g_output != undefined && g_ext != undefined) {
|
||||
g_output.value = result + g_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onSelectOpenFile(option, input_element, output_element, ext) {
|
||||
g_input = input_element;
|
||||
g_output = output_element;
|
||||
g_ext = ext;
|
||||
g_option = option;
|
||||
|
||||
AnySign.SelectFile("", "", option, onSelectOpenFileCallback);
|
||||
}
|
||||
|
||||
function UploadFileEx_Callback (aResult) {
|
||||
document.getElementById ("form_UploadFileEx").aResult.value = aResult.replace(/\|/g, '\r\n');
|
||||
}
|
||||
|
||||
function UploadFileEx_ErrCallback (aResult) {
|
||||
var aResultString = "ErrCode [" + aResult.code + "] ErrMsg [" +aResult.msg+"]";
|
||||
alert (aResultString);
|
||||
document.getElementById ("form_UploadFileEx").aResult.value = aResultString;
|
||||
}
|
||||
|
||||
function DownloadFileEx_Callback (aResult) {
|
||||
document.getElementById ("form_DownloadFileEx").aResult.value = aResult.replace(/\|/g, '\r\n');
|
||||
}
|
||||
|
||||
function DownloadFileEx_ErrCallback (aResult) {
|
||||
var aResultString = "ErrCode [" + aResult.code + "] ErrMsg [" +aResult.msg+"]";
|
||||
alert (aResultString);
|
||||
document.getElementById ("form_DownloadFileEx").aResult.value = aResultString;
|
||||
}
|
||||
|
||||
function onSelectSaveFile(element, option) {
|
||||
g_input = element;
|
||||
g_option = option;
|
||||
|
||||
AnySign.SelectFile("", "", option, onSelectSaveFileCallback);
|
||||
}
|
||||
|
||||
function onSelectSaveFileCallback(result) {
|
||||
if (result != "") {
|
||||
g_input.value = result;
|
||||
|
||||
if (g_option == 0 && g_output != undefined && g_ext != undefined) {
|
||||
g_output.value = result + g_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();" leftmargin="0" topmargin="0" style="padding-top:0px; padding-left:0px;">
|
||||
<form name='xecure'><input type=hidden name='p'>
|
||||
</form>
|
||||
<table width="694" align='center' border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<!-- Header -->
|
||||
<tr>
|
||||
<td>
|
||||
<div id="xecure_header" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Body -->
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<!-- contents start -->
|
||||
<td>
|
||||
<!-- CENTER START -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<h3 id="17">UploadFileEx</h3>
|
||||
<form id="form_UploadFileEx" name="form_UploadFileEx" method="post" action="#">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="50" rowspan="10">Input</td>
|
||||
<td width="120">aXgateAddress</td>
|
||||
<td width="524"><input type="text" class="inputtext" name="aXgateAddress"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPath</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPath"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aQuery</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aQuery"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aHostName</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aHostName"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPort</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPort"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aInputFilePath</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="checkbox" class="inputcheck" name="aFileSelectOption" value="0" checked disabled="true"/>
|
||||
0 : 단일 파일 선택<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aFileSelectOption" value="2"/>
|
||||
2 : 복수 파일 선택 (Ctrl + Click)<br/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="SelectFile"
|
||||
onClick="onSelectOpenFile (sumCheckbox (this.form.aFileSelectOption), this.form.aInputFilePath);"/>
|
||||
<input type="text" class="inputtext" name="aInputFilePath"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aOption</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="0" checked disabled="true"/>
|
||||
0x00000000 : 기본 옵션<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="524288"/>
|
||||
0x00080000 : 진행창을 보이지 않는다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="1048576"/>
|
||||
0x00100000 : 성공 시 진행창을 닫는다.(오류 시는 닫지 않는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="2097152"/>
|
||||
0x00200000 : 완료 시 진행창을 닫는다.(오류가 발생해도 닫는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="4194304"/>
|
||||
0x00400000 : 오류 시 다음 파일 계속 진행한다.(기본값은 종료한다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="8388608"/>
|
||||
0x00800000 : 오류 시 다음 파일 계속 진행할지 확인창을 띄운다.<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDescription</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aDescription"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aSID</b></td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aSID"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aCharset</b></td>
|
||||
<td style="text-align:left;">
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="utf-8" checked/>
|
||||
utf-8<br/>
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="euc-kr"/>
|
||||
euc-kr<br/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run</td>
|
||||
<td colspan="2">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="AnySign.UploadFileEx"
|
||||
onClick="AnySign.UploadFileEx (this.form.aXgateAddress.value,
|
||||
this.form.aPath.value,
|
||||
this.form.aQuery.value,
|
||||
this.form.aHostName.value,
|
||||
this.form.aPort.value,
|
||||
this.form.aInputFilePath.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aDescription.value,
|
||||
this.form.aSID.value,
|
||||
setChar (this.form),
|
||||
UploadFileEx_Callback,
|
||||
UploadFileEx_ErrCallback)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtextarea" name="aResult" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
|
||||
<h3 id="18">DownloadFileEx</h3>
|
||||
<form id="form_DownloadFileEx" name="form_DownloadFileEx" method="post" action="#">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="50" rowspan="11">Input</td>
|
||||
<td width="120">aXgateAddress</td>
|
||||
<td width="524"><input type="text" class="inputtext" name="aXgateAddress"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPath</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPath"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aQuery</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aQuery"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aHostName</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aHostName"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPort</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPort"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aTargetFilePath</td>
|
||||
<td style="text-align:left;">
|
||||
<select name="aTargetFileSelect" multiple="single" class="inputselect" size="6">
|
||||
<%
|
||||
if (files != null)
|
||||
{
|
||||
for (i = 0 ; i < files.length; ++i)
|
||||
{
|
||||
if (!files[i].isDirectory())
|
||||
out.println ("<option value=\"" + files[i].getName() + "\">" + files[i].getName() + " (" + files[i].length() + " Byte)</option>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
out.println ("<option value=\"\">No Files</option>");
|
||||
}
|
||||
%>
|
||||
</select>
|
||||
* Multi Select: Ctrl + Click<br/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="Select"
|
||||
onClick="this.form.aTargetFilePath.value = sumSelect (this.form.aTargetFileSelect)"/><br/>
|
||||
<input type="text" class="inputtext" name="aTargetFilePath"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDownloadPath</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="SelectFile"
|
||||
onClick="onSelectSaveFile (this.form.aDownloadPath, 3);"/>
|
||||
<input type="text" class="inputtext" name="aDownloadPath"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aOption</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="0" checked disabled="true"/>
|
||||
0x00000000 : 기본 옵션<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="65536" checked />
|
||||
0x00010000 : 저장할 파일 선택창을 출력하지 않는다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="131072"/>
|
||||
0x00020000 : 저장할 파일을 임시 폴더에 저장한다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="262144"/>
|
||||
0x00040000 : 동일한 이름의 저장 파일이 있는 경우 오류 처리한다.(기본값은 덮어쓴다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="524288"/>
|
||||
0x00080000 : 진행창을 보이지 않는다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="1048576"/>
|
||||
0x00100000 : 성공 시 진행창을 닫는다.(오류 시는 닫지 않는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="2097152"/>
|
||||
0x00200000 : 완료 시 진행창을 닫는다.(오류가 발생해도 닫는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="4194304"/>
|
||||
0x00400000 : 오류 시 다음 파일 계속 진행한다.(기본값은 종료한다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="8388608"/>
|
||||
0x00800000 : 오류 시 다음 파일 계속 진행할지 확인창을 띄운다.<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDescription</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aDescription"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aSID</b></td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aSID"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aCharset</b></td>
|
||||
<td style="text-align:left;">
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="utf-8" checked/>
|
||||
utf-8<br/>
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="euc-kr"/>
|
||||
euc-kr<br/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run</td>
|
||||
<td colspan="2">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="AnySign.DownloadFileEx"
|
||||
onClick="AnySign.DownloadFileEx (this.form.aXgateAddress.value,
|
||||
this.form.aPath.value,
|
||||
this.form.aQuery.value,
|
||||
this.form.aHostName.value,
|
||||
this.form.aPort.value,
|
||||
this.form.aTargetFilePath.value,
|
||||
this.form.aDownloadPath.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aDescription.value,
|
||||
this.form.aSID.value,
|
||||
setChar (this.form),
|
||||
DownloadFileEx_Callback,
|
||||
DownloadFileEx_ErrCallback)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtextarea" name="aResult" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- CENTER END -->
|
||||
</td>
|
||||
<!-- contents end -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr>
|
||||
<td>
|
||||
<div id="xecure_footer" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
481
src/main/webapp/AnySign4PC/test/fcms_updownloadex_euckr.jsp
Normal file
481
src/main/webapp/AnySign4PC/test/fcms_updownloadex_euckr.jsp
Normal file
@ -0,0 +1,481 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page contentType="text/html; charset=euc-kr" pageEncoding="euc-kr" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<%@ page import="java.io.File" %>
|
||||
<% request.setCharacterEncoding("euc-kr"); %>
|
||||
<% response.setContentType("text/html; charset=euc-kr"); %>
|
||||
<%
|
||||
File file = null;
|
||||
int i = 0;
|
||||
File[] files = null;
|
||||
|
||||
String realPath = "/home/eomjh/workspace/FCMS/js/test/FileStore/";
|
||||
file = new File(realPath);
|
||||
if (file.exists() && file.isDirectory())
|
||||
{
|
||||
files = file.listFiles();
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<style type="text/css">
|
||||
form {margin:0px 0px 0px 0px;}
|
||||
input.largebtn { width: 500px; }
|
||||
input.mediumbtn { width: 300px; }
|
||||
input.smallbtn { width: 150px; }
|
||||
h1, h2, h3, h4 { margin:0;}
|
||||
h3 { font-size:13pt; background-color:#EEE;}
|
||||
b {color: blue}
|
||||
.test {border:1px dashed gray;}
|
||||
.test td {font-size: 9pt;color: #333333;background: #EEEEEE;text-align: center;}
|
||||
select.combo {width:150px; font-size: 9pt;color: #333333;;}
|
||||
.inputtext {width: 100%;}
|
||||
.inputtextarea {width: 100%;word-break:break-all;}
|
||||
.inputselect {width: 100%;}
|
||||
ainput{border:0px; margin:2px; padding:1px;}
|
||||
.inputbutton {width: 100%;height: 100%; border:1px solid #d3d3d3; margin:2px; padding:1px;}
|
||||
.inputcheck {width: 14px;height: 14px;}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.write("<script type=\"text/javascript\" src=\"" + "../anySign4PCInterface.js" + "?version=" + new Date().getTime() + "\"></scr"+"ipt>");
|
||||
</script>
|
||||
<script language='javascript'>
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
%>
|
||||
AnySign.mAnySignLiteEnable = false;
|
||||
PrintObjectTag ();
|
||||
</script>
|
||||
|
||||
<script language='javascript'>
|
||||
function init()
|
||||
{
|
||||
initForm();
|
||||
numbering();
|
||||
}
|
||||
|
||||
function numbering ()
|
||||
{
|
||||
var aElements = document.getElementsByTagName('h3');
|
||||
|
||||
for (i = 0 ; i < aElements.length ; i++)
|
||||
{
|
||||
aElements[i].innerHTML = (i + 1) + ". " + aElements[i].innerHTML;
|
||||
aElements.id = "elem" + (i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function initForm ()
|
||||
{
|
||||
var aPort = "";
|
||||
if (window.location.port == "") {
|
||||
if (window.location.protocol == "https:") aPort = "443";
|
||||
else aPort = "80";
|
||||
} else {
|
||||
aPort = window.location.port;
|
||||
}
|
||||
|
||||
var aPathname = location.pathname;
|
||||
var aLastIndex = aPathname.lastIndexOf("/");
|
||||
|
||||
// form_UploadFileEx
|
||||
document.getElementById ("form_UploadFileEx").aXgateAddress.value = AnySign.mXgateAddress;
|
||||
document.getElementById ("form_UploadFileEx").aHostName.value = window.location.hostname;
|
||||
document.getElementById ("form_UploadFileEx").aPort.value = 80;
|
||||
document.getElementById ("form_UploadFileEx").aSID.value = document.cookie || "B7445038AB051E1E9BBBE5C47623361AE2B2768F";
|
||||
document.getElementById ("form_UploadFileEx").aPath.value = aPathname.substring(0, aLastIndex) + "/file_upload.jsp";
|
||||
document.getElementById ("form_UploadFileEx").aQuery.value = "param1=test.txt¶m2=한글테스트";
|
||||
document.getElementById ("form_UploadFileEx").aDescription.value = "파일을 업로드합니다.";
|
||||
|
||||
// form_DownloadFileEx
|
||||
document.getElementById ("form_DownloadFileEx").aXgateAddress.value = AnySign.mXgateAddress;
|
||||
document.getElementById ("form_DownloadFileEx").aHostName.value = window.location.hostname;
|
||||
document.getElementById ("form_DownloadFileEx").aPort.value = 80;
|
||||
document.getElementById ("form_DownloadFileEx").aSID.value = document.cookie || "B7445038AB051E1E9BBBE5C47623361AE2B2768F";
|
||||
document.getElementById ("form_DownloadFileEx").aPath.value = aPathname.substring(0, aLastIndex) + "/file_download.jsp";
|
||||
document.getElementById ("form_DownloadFileEx").aQuery.value = "param1=test.txt¶m2=한글테스트";
|
||||
document.getElementById ("form_DownloadFileEx").aDescription.value = "파일을 다운로드합니다.";
|
||||
}
|
||||
|
||||
function sumCheckbox (aCheckbox)
|
||||
{
|
||||
var aIter;
|
||||
var aTotal = 0;
|
||||
|
||||
for (aIter = 0;aIter < aCheckbox.length;aIter++)
|
||||
{
|
||||
if (aCheckbox[aIter].checked)
|
||||
aTotal += parseInt (aCheckbox[aIter].value);
|
||||
}
|
||||
|
||||
return aTotal;
|
||||
}
|
||||
|
||||
function sumSelect (aSelect)
|
||||
{
|
||||
var aIter;
|
||||
var aTotal = "";
|
||||
|
||||
for (aIter = 0;aIter < aSelect.length;aIter++)
|
||||
{
|
||||
if (aSelect[aIter].selected)
|
||||
{
|
||||
aTotal += aSelect[aIter].value;
|
||||
aTotal += "|";
|
||||
}
|
||||
}
|
||||
|
||||
aTotal = aTotal.substring (0, aTotal.length - 1);
|
||||
|
||||
return aTotal;
|
||||
}
|
||||
|
||||
function setChar (form)
|
||||
{
|
||||
if (form.aCharset[0].checked)
|
||||
return "utf-8";
|
||||
else
|
||||
return "euc-kr";
|
||||
}
|
||||
|
||||
function onSelectOpenFileCallback(result) {
|
||||
if (result != "") {
|
||||
g_input.value = result;
|
||||
|
||||
if (g_option == 0 && g_output != undefined && g_ext != undefined) {
|
||||
g_output.value = result + g_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onSelectOpenFile(option, input_element, output_element, ext) {
|
||||
g_input = input_element;
|
||||
g_output = output_element;
|
||||
g_ext = ext;
|
||||
g_option = option;
|
||||
|
||||
AnySign.SelectFile("", "", option, onSelectOpenFileCallback);
|
||||
}
|
||||
|
||||
function UploadFileEx_Callback (aResult) {
|
||||
document.getElementById ("form_UploadFileEx").aResult.value = aResult.replace(/\|/g, '\r\n');
|
||||
}
|
||||
|
||||
function UploadFileEx_ErrCallback (aResult) {
|
||||
var aResultString = "ErrCode [" + aResult.code + "] ErrMsg [" +aResult.msg+"]";
|
||||
alert (aResultString);
|
||||
document.getElementById ("form_UploadFileEx").aResult.value = aResultString;
|
||||
}
|
||||
|
||||
function DownloadFileEx_Callback (aResult) {
|
||||
document.getElementById ("form_DownloadFileEx").aResult.value = aResult.replace(/\|/g, '\r\n');
|
||||
}
|
||||
|
||||
function DownloadFileEx_ErrCallback (aResult) {
|
||||
var aResultString = "ErrCode [" + aResult.code + "] ErrMsg [" +aResult.msg+"]";
|
||||
alert (aResultString);
|
||||
document.getElementById ("form_DownloadFileEx").aResult.value = aResultString;
|
||||
}
|
||||
|
||||
function onSelectSaveFile(element, option) {
|
||||
g_input = element;
|
||||
g_option = option;
|
||||
|
||||
AnySign.SelectFile("", "", option, onSelectSaveFileCallback);
|
||||
}
|
||||
|
||||
function onSelectSaveFileCallback(result) {
|
||||
if (result != "") {
|
||||
g_input.value = result;
|
||||
|
||||
if (g_option == 0 && g_output != undefined && g_ext != undefined) {
|
||||
g_output.value = result + g_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();" leftmargin="0" topmargin="0" style="padding-top:0px; padding-left:0px;">
|
||||
<form name='xecure'><input type=hidden name='p'>
|
||||
</form>
|
||||
<table width="694" align='center' border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<!-- Header -->
|
||||
<tr>
|
||||
<td>
|
||||
<div id="xecure_header" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Body -->
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<!-- contents start -->
|
||||
<td>
|
||||
<!-- CENTER START -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<h3 id="17">UploadFileEx</h3>
|
||||
<form id="form_UploadFileEx" name="form_UploadFileEx" method="post" action="#">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="50" rowspan="10">Input</td>
|
||||
<td width="120">aXgateAddress</td>
|
||||
<td width="524"><input type="text" class="inputtext" name="aXgateAddress"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPath</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPath"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aQuery</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aQuery"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aHostName</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aHostName"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPort</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPort"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aInputFilePath</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="checkbox" class="inputcheck" name="aFileSelectOption" value="0" checked disabled="true"/>
|
||||
0 : 단일 파일 선택<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aFileSelectOption" value="2"/>
|
||||
2 : 복수 파일 선택 (Ctrl + Click)<br/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="SelectFile"
|
||||
onClick="onSelectOpenFile (sumCheckbox (this.form.aFileSelectOption), this.form.aInputFilePath);"/>
|
||||
<input type="text" class="inputtext" name="aInputFilePath"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aOption</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="0" checked disabled="true"/>
|
||||
0x00000000 : 기본 옵션<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="524288"/>
|
||||
0x00080000 : 진행창을 보이지 않는다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="1048576"/>
|
||||
0x00100000 : 성공 시 진행창을 닫는다.(오류 시는 닫지 않는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="2097152"/>
|
||||
0x00200000 : 완료 시 진행창을 닫는다.(오류가 발생해도 닫는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="4194304"/>
|
||||
0x00400000 : 오류 시 다음 파일 계속 진행한다.(기본값은 종료한다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="8388608"/>
|
||||
0x00800000 : 오류 시 다음 파일 계속 진행할지 확인창을 띄운다.<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDescription</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aDescription"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aSID</b></td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aSID"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aCharset</b></td>
|
||||
<td style="text-align:left;">
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="utf-8" checked/>
|
||||
utf-8<br/>
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="euc-kr"/>
|
||||
euc-kr<br/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run</td>
|
||||
<td colspan="2">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="AnySign.UploadFileEx"
|
||||
onClick="AnySign.UploadFileEx (this.form.aXgateAddress.value,
|
||||
this.form.aPath.value,
|
||||
this.form.aQuery.value,
|
||||
this.form.aHostName.value,
|
||||
this.form.aPort.value,
|
||||
this.form.aInputFilePath.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aDescription.value,
|
||||
this.form.aSID.value,
|
||||
setChar (this.form),
|
||||
UploadFileEx_Callback,
|
||||
UploadFileEx_ErrCallback)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtextarea" name="aResult" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
|
||||
<h3 id="18">DownloadFileEx</h3>
|
||||
<form id="form_DownloadFileEx" name="form_DownloadFileEx" method="post" action="#">
|
||||
<table class="test">
|
||||
<tr>
|
||||
<td width="50" rowspan="11">Input</td>
|
||||
<td width="120">aXgateAddress</td>
|
||||
<td width="524"><input type="text" class="inputtext" name="aXgateAddress"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPath</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPath"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aQuery</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aQuery"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aHostName</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aHostName"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPort</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aPort"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aTargetFilePath</td>
|
||||
<td style="text-align:left;">
|
||||
<select name="aTargetFileSelect" multiple="single" class="inputselect" size="6">
|
||||
<%
|
||||
if (files != null)
|
||||
{
|
||||
for (i = 0 ; i < files.length; ++i)
|
||||
{
|
||||
if (!files[i].isDirectory())
|
||||
out.println ("<option value=\"" + files[i].getName() + "\">" + files[i].getName() + " (" + files[i].length() + " Byte)</option>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
out.println ("<option value=\"\">No Files</option>");
|
||||
}
|
||||
%>
|
||||
</select>
|
||||
* Multi Select: Ctrl + Click<br/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="Select"
|
||||
onClick="this.form.aTargetFilePath.value = sumSelect (this.form.aTargetFileSelect)"/><br/>
|
||||
<input type="text" class="inputtext" name="aTargetFilePath"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDownloadPath</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="SelectFile"
|
||||
onClick="onSelectSaveFile (this.form.aDownloadPath, 3);"/>
|
||||
<input type="text" class="inputtext" name="aDownloadPath"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aOption</td>
|
||||
<td style="text-align:left;">
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="0" checked disabled="true"/>
|
||||
0x00000000 : 기본 옵션<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="65536" checked />
|
||||
0x00010000 : 저장할 파일 선택창을 출력하지 않는다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="131072"/>
|
||||
0x00020000 : 저장할 파일을 임시 폴더에 저장한다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="262144"/>
|
||||
0x00040000 : 동일한 이름의 저장 파일이 있는 경우 오류 처리한다.(기본값은 덮어쓴다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="524288"/>
|
||||
0x00080000 : 진행창을 보이지 않는다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="1048576"/>
|
||||
0x00100000 : 성공 시 진행창을 닫는다.(오류 시는 닫지 않는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="2097152"/>
|
||||
0x00200000 : 완료 시 진행창을 닫는다.(오류가 발생해도 닫는다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="4194304"/>
|
||||
0x00400000 : 오류 시 다음 파일 계속 진행한다.(기본값은 종료한다)<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="8388608"/>
|
||||
0x00800000 : 오류 시 다음 파일 계속 진행할지 확인창을 띄운다.<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDescription</td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aDescription"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aSID</b></td>
|
||||
<td style="text-align:left;"><input type="text" class="inputtext" name="aSID"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>aCharset</b></td>
|
||||
<td style="text-align:left;">
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="utf-8" checked/>
|
||||
utf-8<br/>
|
||||
<input type="radio" class="inputcheck" name="aCharset" value="euc-kr"/>
|
||||
euc-kr<br/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run</td>
|
||||
<td colspan="2">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="AnySign.DownloadFileEx"
|
||||
onClick="AnySign.DownloadFileEx (this.form.aXgateAddress.value,
|
||||
this.form.aPath.value,
|
||||
this.form.aQuery.value,
|
||||
this.form.aHostName.value,
|
||||
this.form.aPort.value,
|
||||
this.form.aTargetFilePath.value,
|
||||
this.form.aDownloadPath.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aDescription.value,
|
||||
this.form.aSID.value,
|
||||
setChar (this.form),
|
||||
DownloadFileEx_Callback,
|
||||
DownloadFileEx_ErrCallback)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtextarea" name="aResult" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- CENTER END -->
|
||||
</td>
|
||||
<!-- contents end -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr>
|
||||
<td>
|
||||
<div id="xecure_footer" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
57
src/main/webapp/AnySign4PC/test/file_download.jsp
Normal file
57
src/main/webapp/AnySign4PC/test/file_download.jsp
Normal file
@ -0,0 +1,57 @@
|
||||
<%@ page contentType="text/html; charset=euc-kr" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.file.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
try{
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//tomcat
|
||||
|
||||
// out.clear();
|
||||
// out = pageContext.pushBody();
|
||||
|
||||
|
||||
XecureServlet xservlet = new XecureServlet(request, response);
|
||||
// tomcat, 기타 WAS
|
||||
XecureFileOutputStream file;
|
||||
file = new XecureFileOutputStream(xservlet.getXecureSession(),
|
||||
xservlet.request,
|
||||
xservlet.response,
|
||||
response.getOutputStream());
|
||||
// jeus
|
||||
/*
|
||||
XecureFilePrintWriter file;
|
||||
file = new XecureFilePrintWriter(xservlet.getXecureSession(),
|
||||
xservlet.request,
|
||||
xservlet.response,
|
||||
response.getWriter());
|
||||
*/
|
||||
|
||||
String filePATH = "/home/eomjh/workspace/AnySignLite_temp/js/test/FileStore/" + xservlet.request.getParameter("filename");
|
||||
|
||||
file.flush();
|
||||
//file.fileDownload();
|
||||
file.fileDownload(filePATH);
|
||||
}
|
||||
catch(FileNotFoundException e) {
|
||||
out.print ("SFE123");
|
||||
System.out.println("FileNotFoundException");
|
||||
}
|
||||
catch(IOException e) {
|
||||
out.print ("SFE123");
|
||||
System.out.println("IOException");
|
||||
}
|
||||
catch(XecureServletConfigException e) {
|
||||
out.print ("SFE123");
|
||||
System.out.println("XecureServletConfigException");
|
||||
}
|
||||
catch(XecureServletException e) {
|
||||
out.print ("SFE123");
|
||||
System.out.println("XecureServletException");
|
||||
}
|
||||
|
||||
%>
|
||||
39
src/main/webapp/AnySign4PC/test/file_upload.jsp
Normal file
39
src/main/webapp/AnySign4PC/test/file_upload.jsp
Normal file
@ -0,0 +1,39 @@
|
||||
<%@ page contentType="text/html; charset=euc-kr" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.file.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
|
||||
<%
|
||||
|
||||
session.setAttribute("session1", "s1_value");
|
||||
session.setAttribute("session2", "s2_value");
|
||||
|
||||
|
||||
String aUploadDirectory = "/home/eomjh/workspace/AnySignLite_temp/js/test/FileStore/";
|
||||
|
||||
try {
|
||||
|
||||
XecureFileInputStream file;
|
||||
XecureServlet xservlet = new XecureServlet(request, response);
|
||||
|
||||
file = new XecureFileInputStream(xservlet.getXecureSession(), xservlet.request);
|
||||
file.saveFileAt(aUploadDirectory);
|
||||
|
||||
out.print ("OK");
|
||||
}
|
||||
catch(XecureServletConfigException e) {
|
||||
out.print ("SFE20");
|
||||
}
|
||||
catch(XecureServletException e) {
|
||||
out.print ("SFE21");
|
||||
}
|
||||
catch(IOException e) {
|
||||
out.print ("SFE22");
|
||||
}
|
||||
catch(Exception e) {
|
||||
out.print ("SFE23");
|
||||
}
|
||||
%>
|
||||
44
src/main/webapp/AnySign4PC/test/file_upload_proxy.jsp
Normal file
44
src/main/webapp/AnySign4PC/test/file_upload_proxy.jsp
Normal file
@ -0,0 +1,44 @@
|
||||
<%@ page contentType="text/html; charset=euc-kr" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.file.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
|
||||
<%
|
||||
session.setAttribute("session1", "s1_value");
|
||||
session.setAttribute("session2", "s2_value");
|
||||
|
||||
|
||||
String aUploadDirectory = "";
|
||||
|
||||
try {
|
||||
|
||||
XecureFileInputStream file;
|
||||
XecureServlet xservlet = new XecureServlet(request, response);
|
||||
|
||||
file = new XecureFileInputStream(xservlet.getXecureSession(), xservlet.request);
|
||||
String name = file.getFileName();
|
||||
if (name != null) {
|
||||
file.saveFileAt(aUploadDirectory);
|
||||
|
||||
out.print ("OK");
|
||||
}
|
||||
else {
|
||||
out.print ("upload file name is null");
|
||||
}
|
||||
}
|
||||
catch(XecureServletConfigException e) {
|
||||
out.print ("SFE20");
|
||||
}
|
||||
catch(XecureServletException e) {
|
||||
out.print ("SFE21");
|
||||
}
|
||||
catch(IOException e) {
|
||||
out.print ("SFE22");
|
||||
}
|
||||
catch(Exception e) {
|
||||
out.print ("SFE23");
|
||||
}
|
||||
%>
|
||||
331
src/main/webapp/AnySign4PC/test/ibs/pub_cert/cert_register.jsp
Normal file
331
src/main/webapp/AnySign4PC/test/ibs/pub_cert/cert_register.jsp
Normal file
@ -0,0 +1,331 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>12인증서 (재)발급, 갱신등록</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visit {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function getNow() {
|
||||
var year;
|
||||
var month;
|
||||
var day;
|
||||
var hour;
|
||||
var minute;
|
||||
var second;
|
||||
|
||||
var date = new Date();
|
||||
|
||||
year = date.getFullYear();
|
||||
month = date.getMonth();
|
||||
day = date.getDate();
|
||||
|
||||
hour = date.getHours();
|
||||
minute = date.getMinutes();
|
||||
second = date.getSeconds();
|
||||
|
||||
if( month == 0 ) month++;
|
||||
if( month < 10 ) month = "0" + month;
|
||||
if( day < 10 ) day ="0" + day;
|
||||
|
||||
if( hour < 10 ) hour = "0" + hour;
|
||||
if( minute < 10 ) minute = "0" + minute;
|
||||
|
||||
if( second < 10 ) second = "0" + second;
|
||||
//second = second % 10;
|
||||
|
||||
ret_Time = String(year).substr(1) + "";
|
||||
ret_Time = ret_Time + month + "";
|
||||
ret_Time = ret_Time + day + "";
|
||||
ret_Time = ret_Time + hour + "";
|
||||
ret_Time = ret_Time + minute + "";
|
||||
ret_Time = ret_Time + second + "";
|
||||
return ret_Time;
|
||||
}
|
||||
|
||||
function auto_input() {
|
||||
var myForm = document.getElementById( "form1" );
|
||||
var myTime = getNow();
|
||||
var randomNumber = Math.round (Math.random() * 9);
|
||||
var prefixList = new Array ("Akali",
|
||||
"Alistar",
|
||||
"Amumu",
|
||||
"Anivia",
|
||||
"Annie",
|
||||
"Ashe",
|
||||
"Blitzcrank",
|
||||
"Brand",
|
||||
"Caitlyn",
|
||||
"Cassiopeia",
|
||||
"Corki",
|
||||
"Mundo",
|
||||
"Evelynn",
|
||||
"Ezreal",
|
||||
"Fiddlesticks",
|
||||
"Galio",
|
||||
"Gangplank");
|
||||
var koreanPrefix = "";
|
||||
|
||||
koreanPrefix = prefixList[randomNumber];
|
||||
if( myForm == null ) {
|
||||
alert( "myForm is null" );
|
||||
}
|
||||
if( myTime == null ) {
|
||||
alert( "myTime is null" );
|
||||
}
|
||||
if( myTime.length != 13 ) {
|
||||
alert( "시간정보의 길이가 올바르지 않습니다. 반드시 13자 리턴된 길이는 " + myTime.length );
|
||||
}
|
||||
|
||||
|
||||
//법인단체명
|
||||
myForm.company_name.value = koreanPrefix + myTime.substr(6);
|
||||
myForm.company_name.value = myTime;
|
||||
|
||||
//개인명
|
||||
myForm.user_name.value = koreanPrefix;
|
||||
//myForm.user_name.value = myTime;
|
||||
|
||||
//개인ID
|
||||
myForm.user_id.value = koreanPrefix + myTime.substr(6);
|
||||
myForm.user_id.value = myTime;
|
||||
|
||||
//주민번호
|
||||
myForm.ssn.value = myTime;
|
||||
|
||||
}
|
||||
function clickshow(num) {
|
||||
for (i=1;i<=10;i++) {
|
||||
if(imgch=eval("document.bar"+i)) {
|
||||
menu=eval("document.all.block"+i+".style");
|
||||
if (num==i) {
|
||||
if (menu.display=="block"){ // 메뉴 닫힘
|
||||
menu.display="none";
|
||||
//imgch.src="./MenuImage/b_1.gif";
|
||||
} else { // 메뉴 열림
|
||||
menu.display="block";
|
||||
//imgch.src="./MenuImage/b_2.gif";
|
||||
}
|
||||
} else {
|
||||
menu.display="none";
|
||||
//imgch.src="./MenuImage/b_1.gif";
|
||||
}
|
||||
} else {
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../../../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../../../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../../../jsp/img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="../../index.html">TOP 메뉴</a></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="cert_main.jsp" onClick="return XecureLink(this);">이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100" width="8%"> </td>
|
||||
<td height="120" valign="middle">
|
||||
<p align="center"><font size="6" face="Times New Roman, Times, serif">인증서 (재)발급, 갱신등록
|
||||
</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB">
|
||||
<p><b>이 페이지는 금융결제원 인증기관에 사용자를 등록하고 작업을 수행합니다. 반드시 운영시스템에서는
|
||||
이 페이지를 웹상에서 제거하고 절대 운영시스템에서는 수행하지 마십시요. </b><b>사용자 확인을
|
||||
위해서 아래의 정보를 입력해 주십시요.</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="24">
|
||||
<br>
|
||||
<form id="form1" name="form1" method=post action='cert_request.jsp'>
|
||||
<table>
|
||||
|
||||
<tr><td><A href="javascript:auto_input();"><FONT color="#FF0000">자동입력</FONT></A></td></tr>
|
||||
<tr><td>개인/법인/단체 구분</td><tr>
|
||||
<td style='CURSOR: hand' onclick='javascript:clickshow(1)' width='149' bgcolor='F5F5F5' height='25'>
|
||||
|
||||
|
||||
<img src='./MenuImage/b_2.gif' name='bar1' width='9' height='9' border='0'>
|
||||
|
||||
<b><font face='굴림' size='2'>개인</font></b>
|
||||
|
||||
<td style='CURSOR: hand' onclick='javascript:clickshow(2)' width='149' bgcolor='F5F5F5' height='25'>
|
||||
|
||||
<img src='./MenuImage/b_3.gif' name='bar2' width='9' height='9' border='0'>
|
||||
|
||||
<b><font face='굴림' size='2'>법인</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width='249'>
|
||||
<span id='block1' style='DISPLAY: block; MARGIN-LEFT: 0px; CURSOR: hand'>
|
||||
<input type=radio name="user_policy_type" value="101" >전자거래범용
|
||||
<input type=radio name="user_policy_type" value="104" checked="true">은행/보험용 <br>
|
||||
<input type=radio name="user_policy_type" value="162">신용카드결제용
|
||||
<input type=radio name="user_policy_type" value="169">보안메일용
|
||||
|
||||
<td width='249'>
|
||||
<span id='block2' style='DISPLAY: none; MARGIN-LEFT: 0px; CURSOR: hand'>
|
||||
<input type=radio name="user_policy_type" value="202" >금용거래용
|
||||
<input type=radio name="user_policy_type" value="205">전자거래범용<br>
|
||||
<input type=radio name="user_policy_type" value="261">기업뱅킹용
|
||||
<input type=radio name="user_policy_type" value="269">보안메일용
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr><tr></tr><tr></tr>
|
||||
<!-- 추가 -->
|
||||
|
||||
<tr><td>법인/단체명 ( 법인/단체일 경우 필수, 영문 필수 )</td><td><input type=text name="company_name" size="40"></td></tr>
|
||||
<tr><td>개인명 / 법인단체 세부명 ( 필수 )</td><td><input type=text name="user_name" size="40"></td></tr>
|
||||
<tr><td>영문 개인명 / 영문 법인단체 세부명 ( 옵션 ) </td><td><input type=text name="euser_name" size="40"></td></tr>
|
||||
<tr><td>개인 (법인단체) ID ( 필수 )</td><td><input type=text name="user_id" size="20"></td></tr>
|
||||
<tr><td>주민등록번호 ( 사업자 등록번호 ) ( 필수 ) </td><td><input type=text name="ssn" size="20"></td></tr>
|
||||
<tr><td>전자우편 ( 옵션 )</td><td><input type=text name="email" size="20"></td></tr>
|
||||
<tr><td>핸드폰 ( 옵션 )</td><td><input type=text name="cell_phone" size="20"></td></tr>
|
||||
<tr><td>Fax ( 옵션 )</td><td><input type=text name="fax" size="20"></td></tr>
|
||||
<tr><td>자택 우편번호 ( 개인 필수 )</td><td><input type=text name="zipcode" value="1306-6" size="20"></td></tr>
|
||||
<tr><td>자택 주소 ( 개인 필수 )</td><td><input type=text name="address" value="SeochoDong" size="40"></td></tr>
|
||||
<tr><td>자택 전화 ( 개인 필수 )</td><td><input type=text name="phone" value="3483-1004" size="20"></td></tr>
|
||||
<tr><td>회사 우편번호 ( 법인 필수 )</td><td><input type=text name="czipcode" value="1306-6" size="20"></td></tr>
|
||||
<tr><td>회사 주소 ( 법인 필수 )</td><td><input type=text name="caddress" value="SeochoDong" size="40"></td></tr>
|
||||
<tr><td>회사 전화 ( 법인 필수 )</td><td><input type=text name="cphone" value="3483-1004" size="20"></td></tr>
|
||||
</table>
|
||||
<div align="center">
|
||||
<br><input type=submit value='등록' ><br>
|
||||
<input type=submit value='재등록' onClick='form1.action = "cert_rereg.jsp"'><br>
|
||||
<input type=submit value='갱신' onClick='form1.action = "cert_update.jsp"'>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%" valign="top"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
295
src/main/webapp/AnySign4PC/test/ibs/pub_cert/cert_request.jsp
Normal file
295
src/main/webapp/AnySign4PC/test/ibs/pub_cert/cert_request.jsp
Normal file
@ -0,0 +1,295 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
|
||||
<script type="text/javascript" src="../../../xecureweb_up.js"></script>
|
||||
|
||||
<script language='javascript'>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
|
||||
<%
|
||||
String account = request.getParameter("account");
|
||||
String ac_pwd = request.getParameter("ac_pwd");
|
||||
String pcard = request.getParameter("pcard");
|
||||
String operaterId = "internet";
|
||||
String user_policy_type = request.getParameter("user_policy_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
user_name = new String(user_name.getBytes("ISO-8859-1"), "UTF-8");
|
||||
out.println( "user_name:" + user_name + "<BR/>");
|
||||
|
||||
String euser_name = request.getParameter("euser_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String policy_type ;
|
||||
String user_type;
|
||||
/*
|
||||
if ( user_type.equals("1") ) {
|
||||
policy_type = "01";
|
||||
user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
}
|
||||
else if(user_type.equals("2")) {
|
||||
policy_type = "02";
|
||||
user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
}
|
||||
else policy_type = "06";
|
||||
*/
|
||||
|
||||
user_type = user_policy_type.substring(0, 1);
|
||||
|
||||
if( user_type.equals("1") ) {
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
|
||||
|
||||
}
|
||||
else if ( user_type.equals("2") ) {
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
|
||||
}
|
||||
else
|
||||
policy_type = user_policy_type.substring(1,2);
|
||||
|
||||
String email = request.getParameter("email");
|
||||
String cell_phone = request.getParameter("cell_phone");
|
||||
String fax = request.getParameter("fax");
|
||||
String zipcode = request.getParameter("zipcode");
|
||||
String address = request.getParameter("address");
|
||||
String phone = request.getParameter("phone");
|
||||
String czipcode = request.getParameter("czipcode");
|
||||
String caddress = request.getParameter("caddress");
|
||||
String cphone = request.getParameter("cphone");
|
||||
int ra_result;
|
||||
|
||||
XecureConfig xconf = new XecureConfig ();
|
||||
PublicRA sfra = new PublicRA (xconf);
|
||||
|
||||
ra_result = sfra.registerNewUser ( operaterId, user_type, company_name, user_name, euser_name, user_id,
|
||||
ssn, policy_type, email,cell_phone, fax, zipcode, address, phone,
|
||||
czipcode, caddress, cphone );
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>사용자 등록 확인</title>
|
||||
<%=policy_type%>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visited {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../../../transkey/BigInt.js"></script>
|
||||
<script type="text/javascript" src="../../../transkey/Barrett.js"></script>
|
||||
<script type="text/javascript" src="../../../transkey/RSA.js"></script>
|
||||
<script type="text/javascript" src="../../../transkey/wz_jsgraphics.js"></script>
|
||||
<script type="text/javascript" src="../../../transkey/transkey_XC.js"></script>
|
||||
<script type="text/javascript" src="../../../transkey/seed.js"></script>
|
||||
<script type="text/javascript" src="../../../transkey/genkey.js"></script>
|
||||
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
|
||||
<script language='javascript'>
|
||||
function cert_request ()
|
||||
{
|
||||
var aForm = document.getElementById ("auth");
|
||||
|
||||
RequestCertificate ("10",
|
||||
aForm.ref_code.value,
|
||||
aForm.auth_code.value,
|
||||
cert_request_callback);
|
||||
}
|
||||
|
||||
function cert_request_callback (aResult)
|
||||
{
|
||||
if (aResult == 0)
|
||||
{
|
||||
alert ("금융 결제원 공인인증기관으로 부터 인증서를 발급 받았습니다.");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../../../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../../../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../../../jsp/img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="../../index.html">TOP 메뉴</a></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="cert_main.jsp" onClick="return XecureLink(this);">이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100" width="8%"> </td>
|
||||
<td height="120" valign="middle">
|
||||
<p align="center"><font size="6" face="Times New Roman, Times, serif">사용자
|
||||
등록 확인</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="24">
|
||||
<div align="center">
|
||||
<p> </p>
|
||||
|
||||
<%
|
||||
if ( ra_result == 0 ) {
|
||||
%>
|
||||
|
||||
<table>
|
||||
<tr><td>사용자</td><td><%=user_name%></td></tr>
|
||||
<tr><td>계좌번호</td><td><%=account%></td></tr>
|
||||
<tr><td>등록일</td><td><%=sfra.getResponseFromRegUser("REGDATE")%></td></tr>
|
||||
<tr><td>등록번호</td><td><%=sfra.getResponseFromRegUser("REGSERIAL")%></td></tr>
|
||||
<tr><td>사용자 ID</td><td><%=sfra.getResponseFromRegUser("USERID")%></td></tr>
|
||||
<tr><td>주민등록번호</td><td><%=sfra.getResponseFromRegUser("SSN")%></td></tr>
|
||||
<tr><td>참조코드</td><td><%=sfra.getResponseFromRegUser("REFCODE")%></td></tr>
|
||||
<tr><td>인가코드</td><td><%=sfra.getResponseFromRegUser("AUTHCODE")%></td></tr>
|
||||
<tr><td>인증정책식별코드</td><td><%=sfra.getResponseFromRegUser("POLICYTYPE")%></td></tr>
|
||||
<tr><td>최상위인증기관 해쉬값</td><td><%=sfra.getResponseFromRegUser("ROOTHASH")%></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<%=request.getParameter("user_name")%>'님의 사용자 정보가 금융결제원 인증기관에 등록 되었습니다. <br>
|
||||
<br>
|
||||
이제 '확인' 버튼을 누르시면 금융결제원 공인인증기관으로 부터 인증서를 발급받을 수 있습니다.
|
||||
<p><font color="#000000" size="5"> </font> </p>
|
||||
<form name='auth' id="auth" onSubmit='return false;'>
|
||||
<input type=hidden name='ref_code' value='<%=sfra.getResponseFromRegUser("REFCODE")%>'>
|
||||
<input type=hidden name='auth_code' value='<%=sfra.getResponseFromRegUser("AUTHCODE")%>'>
|
||||
<input type=image src="../../../image/button_ok.jpg" width="90" height="24" border="0" onClick="cert_request ()";>
|
||||
</form>
|
||||
<% }
|
||||
else {
|
||||
%>
|
||||
<p> 사용자 등록에 실패했습니다.</p>
|
||||
에러 코드 : <%=sfra.getLastError()%><br>
|
||||
에러 메시지 : <%=sfra.getLastErrorMsg()%><br>
|
||||
<%=xconf.getRaHost() + xconf.getRaPort()%>
|
||||
<% }
|
||||
%>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%" valign="top"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
265
src/main/webapp/AnySign4PC/test/ibs/pub_cert/cert_rereg.jsp
Normal file
265
src/main/webapp/AnySign4PC/test/ibs/pub_cert/cert_rereg.jsp
Normal file
@ -0,0 +1,265 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
|
||||
<script language='javascript' src='/XecureObject/xecureweb.js'></script>
|
||||
<script>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
|
||||
<%
|
||||
String account = request.getParameter("account");
|
||||
String ac_pwd = request.getParameter("ac_pwd");
|
||||
String pcard = request.getParameter("pcard");
|
||||
String operaterId = "internet";
|
||||
//String user_type = request.getParameter("user_type") ;
|
||||
String user_policy_type = request.getParameter("user_policy_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
String euser_name = request.getParameter("euser_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
String policy_type ;
|
||||
String user_type;
|
||||
|
||||
/*
|
||||
if ( user_type.equals("1") ) {
|
||||
policy_type = "01";
|
||||
user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
}
|
||||
else if(user_type.equals("2")) {
|
||||
policy_type = "02";
|
||||
user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
}
|
||||
else policy_type = "06";
|
||||
*/
|
||||
|
||||
user_type = user_policy_type.substring(0, 1);
|
||||
|
||||
if( user_type.equals("1") ) {
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
|
||||
|
||||
}
|
||||
else if ( user_type.equals("2") ) {
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
|
||||
}
|
||||
else
|
||||
policy_type = user_policy_type.substring(1,2);
|
||||
|
||||
String email = request.getParameter("email");
|
||||
String cell_phone = request.getParameter("cell_phone");
|
||||
String fax = request.getParameter("fax");
|
||||
String zipcode = request.getParameter("zipcode");
|
||||
String address = request.getParameter("address");
|
||||
String phone = request.getParameter("phone");
|
||||
String czipcode = request.getParameter("czipcode");
|
||||
String caddress = request.getParameter("caddress");
|
||||
String cphone = request.getParameter("cphone");
|
||||
int ra_result;
|
||||
|
||||
XecureConfig xconf = new XecureConfig ();
|
||||
PublicRA sfra = new PublicRA (xconf);
|
||||
|
||||
ra_result = sfra.registerRenewUser ( operaterId, user_type, company_name, user_name, euser_name, user_id,
|
||||
ssn, policy_type, email,cell_phone, fax, zipcode, address, phone,
|
||||
czipcode, caddress, cphone );
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>사용자 등록 확인</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visited {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
<script language='javascript'>
|
||||
function cert_request( form )
|
||||
{
|
||||
nRet = RequestCertificate( "10", form.ref_code.value, form.auth_code.value );
|
||||
if ( nRet == 0 )
|
||||
confirm("금융 결제원 공인인증기관으로 부터 인증서를 재발급 받았습니다.");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../../../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../../../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../../../jsp/img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="../../index.html">TOP 메뉴</a></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="cert_main.jsp" onClick="return XecureLink(this);">이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100" width="8%"> </td>
|
||||
<td height="120" valign="middle">
|
||||
<p align="center"><font size="6" face="Times New Roman, Times, serif">사용자
|
||||
등록 확인</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="24">
|
||||
<div align="center">
|
||||
|
||||
<br>
|
||||
<%
|
||||
if ( ra_result == 0 ) {
|
||||
%>
|
||||
|
||||
<table>
|
||||
<tr><td>사용자</td><td><%=user_name%></td></tr>
|
||||
<tr><td>등록일</td><td><%=sfra.getResponseFromRegUser("REGDATE")%></td></tr>
|
||||
<tr><td>등록번호</td><td><%=sfra.getResponseFromRegUser("REGSERIAL")%></td></tr>
|
||||
<tr><td>사용자 ID</td><td><%=sfra.getResponseFromRegUser("USERID")%></td></tr>
|
||||
<tr><td>주민등록번호</td><td><%=sfra.getResponseFromRegUser("SSN")%></td></tr>
|
||||
<tr><td>참조코드</td><td><%=sfra.getResponseFromRegUser("REFCODE")%></td></tr>
|
||||
<tr><td>인가코드</td><td><%=sfra.getResponseFromRegUser("AUTHCODE")%></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<%=request.getParameter("user_name")%>'님의 사용자 정보가 금융결제원 인증기관에 등록 되었습니다. <br>
|
||||
<br>
|
||||
이제 '확인' 버튼을 누르시면 금융결제원 공인인증기관으로 부터 인증서를 재발급받을 수 있습니다.
|
||||
<p><font color="#000000" size="5"> </font> </p>
|
||||
<form name='auth' onSubmit='cert_request(this); return false;'>
|
||||
<input type=hidden name='ref_code' value='<%=sfra.getResponseFromRegUser("REFCODE")%>'>
|
||||
<input type=hidden name='auth_code' value='<%=sfra.getResponseFromRegUser("AUTHCODE")%>'>
|
||||
<input type=image src="../../../image/button_ok.jpg" width="90" height="24" border="0">
|
||||
</form>
|
||||
<% }
|
||||
else {
|
||||
%>
|
||||
<p> 사용자 등록에 실패했습니다.</p>
|
||||
에러 코드 : <%=sfra.getLastError()%><br>
|
||||
에러 메시지 : <%=sfra.getLastErrorMsg()%><br>
|
||||
<% }
|
||||
%>
|
||||
|
||||
<p> </p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%" valign="top"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
285
src/main/webapp/AnySign4PC/test/ibs/pub_cert/user_regist.jsp
Normal file
285
src/main/webapp/AnySign4PC/test/ibs/pub_cert/user_regist.jsp
Normal file
@ -0,0 +1,285 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="xecure.crypto.jni.XecureLib" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
String []nameList = {
|
||||
"자신", "남편", "부인", "딸램", "아들", "막내", "장남", "장녀",
|
||||
"차녀", "차남", "엄마", "아빠", "형님", "언니", "누나", "오빠", "동생",
|
||||
"할아버지", "할머니", "큰아버지", "큰어머니", "삼촌", "사촌",
|
||||
"매부", "매재", "매형", "제수", "제부", "고모", "고모부",
|
||||
"이모", "이모부", "아저씨", "조카"};
|
||||
|
||||
java.util.Random aRandom = null;
|
||||
|
||||
aRandom = (java.util.Random)application.getAttribute ("xwup.ibs.random");
|
||||
if (aRandom == null)
|
||||
{
|
||||
aRandom = new java.util.Random ();
|
||||
application.setAttribute ("xwup.ibs.random", aRandom);
|
||||
}
|
||||
%>
|
||||
<%
|
||||
String commandType = request.getParameter("commandType");
|
||||
String operaterId = "internet";
|
||||
String user_policy_type = request.getParameter("user_policy_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
|
||||
|
||||
if (commandType != null && commandType.equalsIgnoreCase ("update"))
|
||||
{
|
||||
boolean isError = false;
|
||||
if (user_policy_type == null)
|
||||
isError = true;
|
||||
|
||||
if (user_name == null)
|
||||
isError = true;
|
||||
|
||||
if (isError)
|
||||
{
|
||||
%>
|
||||
({"code":"-1",
|
||||
"reason":"no policy or user_name or ssn",
|
||||
"moreinformation":""})
|
||||
<%
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (user_policy_type == null)
|
||||
{
|
||||
user_policy_type = "104";
|
||||
}
|
||||
|
||||
if (user_name == null || user_name.length () == 0)
|
||||
{
|
||||
user_name = nameList [aRandom.nextInt (nameList.length)];
|
||||
}
|
||||
else
|
||||
user_name = new String(user_name.getBytes("iso8859-1"), "utf-8");
|
||||
|
||||
String euser_name = request.getParameter("euser_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
String policy_type ;
|
||||
String user_type;
|
||||
|
||||
user_type = user_policy_type.substring(0, 1);
|
||||
|
||||
if( user_type.equals("1") )
|
||||
{
|
||||
if (ssn == null || ssn.length () == 0)
|
||||
{
|
||||
StringBuffer aBuffer = new StringBuffer ();
|
||||
Calendar aCalendar = Calendar.getInstance ();
|
||||
String aSSNTail = null;
|
||||
aSSNTail = String.valueOf (aRandom.nextInt (2999999));
|
||||
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.YEAR)).substring (2));
|
||||
|
||||
if (aCalendar.get(Calendar.MONTH) < 10)
|
||||
aBuffer.append ("0");
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.MONTH)));
|
||||
|
||||
if (aCalendar.get(Calendar.DAY_OF_MONTH) < 10)
|
||||
aBuffer.append ("0");
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.DAY_OF_MONTH)));
|
||||
|
||||
|
||||
if (aSSNTail.length () < 7)
|
||||
{
|
||||
for (int aIter = 0; aIter < 7 - aSSNTail.length (); ++aIter)
|
||||
{
|
||||
aBuffer.append ("0");
|
||||
}
|
||||
}
|
||||
aBuffer.append (aSSNTail);
|
||||
|
||||
ssn = aBuffer.toString ();
|
||||
|
||||
}
|
||||
if (user_id == null)
|
||||
user_id = ssn;
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
}
|
||||
else if ( user_type.equals("2") )
|
||||
{
|
||||
if (ssn == null || ssn.length () == 0)
|
||||
{
|
||||
StringBuffer aBuffer = new StringBuffer ();
|
||||
String aSSNTail = null;
|
||||
aSSNTail = "2" + String.valueOf (aRandom.nextInt (999999999));
|
||||
|
||||
if (aSSNTail.length () < 10)
|
||||
{
|
||||
for (int aIter = 0; aIter < 10 - aSSNTail.length (); ++aIter)
|
||||
{
|
||||
aBuffer.append ("0");
|
||||
}
|
||||
}
|
||||
aBuffer.append (aSSNTail);
|
||||
|
||||
ssn = aBuffer.toString ();
|
||||
}
|
||||
|
||||
if (company_name == null)
|
||||
company_name = ssn;
|
||||
if (euser_name == null)
|
||||
euser_name = ssn;
|
||||
if (user_id == null)
|
||||
user_id = ssn;
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
}
|
||||
else
|
||||
policy_type = user_policy_type.substring(1,2);
|
||||
|
||||
%>
|
||||
<%
|
||||
|
||||
String email = "dont email me";
|
||||
String cell_phone = "dont call me";
|
||||
String fax = "dont fax me";
|
||||
String zipcode = "127-311";
|
||||
String address = "dogok dong house";
|
||||
String phone = "02-526-8000";
|
||||
String czipcode = "127-311";
|
||||
String caddress = "dogok dong";
|
||||
String cphone = "02-526-8000";
|
||||
|
||||
int ra_result = 0;
|
||||
|
||||
XecureConfig xconf = new XecureConfig ();
|
||||
PublicRA sfra = new PublicRA (xconf);
|
||||
XecureLib jni = new XecureLib (xconf);
|
||||
|
||||
String ip = null;
|
||||
int port = -1;
|
||||
int protocol = -1;
|
||||
|
||||
String targetRA = request.getParameter ("targetRA");
|
||||
|
||||
ip = xconf.getRaHost ();
|
||||
port = xconf.getRaPort ();
|
||||
protocol = xconf.getRaProtocol ();
|
||||
|
||||
if (targetRA != null)
|
||||
{
|
||||
if (targetRA.equalsIgnoreCase ("1024")) /* 1024 PublicRA Information */
|
||||
{
|
||||
ip = "192.168.0.43";
|
||||
port = 25610;
|
||||
protocol = 1;
|
||||
}
|
||||
else if (targetRA.equalsIgnoreCase ("2048")) /* 2048 PublicRA Information */
|
||||
{
|
||||
ip = "192.168.0.26";
|
||||
port = 15679;
|
||||
protocol = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (commandType == null || commandType.equalsIgnoreCase ("new"))
|
||||
{
|
||||
ra_result = jni.registerNewUser (ip.getBytes (),
|
||||
port,
|
||||
protocol,
|
||||
operaterId.getBytes (),
|
||||
user_type.getBytes (),
|
||||
(company_name == null) ? null : company_name.getBytes (),
|
||||
user_name.getBytes (),
|
||||
(euser_name == null) ? null : euser_name.getBytes (),
|
||||
user_id.getBytes (),
|
||||
ssn.getBytes (),
|
||||
policy_type.getBytes (),
|
||||
email.getBytes (),
|
||||
cell_phone.getBytes (),
|
||||
fax.getBytes (),
|
||||
zipcode.getBytes (),
|
||||
address.getBytes (),
|
||||
phone.getBytes (),
|
||||
czipcode.getBytes (),
|
||||
caddress.getBytes (),
|
||||
cphone.getBytes () );
|
||||
}
|
||||
else if (commandType.equalsIgnoreCase ("rereg"))
|
||||
{
|
||||
ra_result = jni.registerRenewUser (ip.getBytes (),
|
||||
port,
|
||||
protocol,
|
||||
operaterId.getBytes (),
|
||||
user_type.getBytes (),
|
||||
(company_name == null) ? null : company_name.getBytes (),
|
||||
user_name.getBytes (),
|
||||
(euser_name == null) ? null : euser_name.getBytes (),
|
||||
user_id.getBytes (),
|
||||
ssn.getBytes (),
|
||||
policy_type.getBytes (),
|
||||
email.getBytes (),
|
||||
cell_phone.getBytes (),
|
||||
fax.getBytes (),
|
||||
zipcode.getBytes (),
|
||||
address.getBytes (),
|
||||
phone.getBytes (),
|
||||
czipcode.getBytes (),
|
||||
caddress.getBytes (),
|
||||
cphone.getBytes () );
|
||||
}
|
||||
else if (commandType.equalsIgnoreCase ("update"))
|
||||
{
|
||||
ra_result = jni.registerUpdateUser (ip.getBytes (),
|
||||
port,
|
||||
protocol,
|
||||
operaterId.getBytes (),
|
||||
user_type.getBytes (),
|
||||
(company_name == null) ? null : company_name.getBytes (),
|
||||
user_name.getBytes (),
|
||||
(euser_name == null) ? null : euser_name.getBytes (),
|
||||
user_id.getBytes (),
|
||||
ssn.getBytes (),
|
||||
policy_type.getBytes (),
|
||||
email.getBytes (),
|
||||
cell_phone.getBytes (),
|
||||
fax.getBytes (),
|
||||
zipcode.getBytes (),
|
||||
address.getBytes (),
|
||||
phone.getBytes (),
|
||||
czipcode.getBytes (),
|
||||
caddress.getBytes (),
|
||||
cphone.getBytes () );
|
||||
}
|
||||
|
||||
|
||||
%>
|
||||
({"ssn":"<%=ssn%>",
|
||||
"name":"<%=user_name%>",
|
||||
"code":"<%=ra_result%>",
|
||||
<%
|
||||
if ( ra_result == 0 ) {
|
||||
%>
|
||||
"regdate":"<%=new String(jni.reguser_RegDate, "cp949")%>",
|
||||
"regserial":"<%=new String(jni.reguser_RegSerial, "cp949")%>",
|
||||
"userid":"<%=new String(jni.reguser_UserId, "cp949")%>",
|
||||
"refcode":"<%=(jni.reguser_RefCode == null) ? "" : new String(jni.reguser_RefCode, "cp949")%>",
|
||||
"authcode":"<%=(jni.reguser_AuthCode == null) ? "" : new String(jni.reguser_AuthCode, "cp949")%>",
|
||||
"policytype":"<%=new String(jni.reguser_PolicyType, "cp949")%>",
|
||||
"roothash":"<%=new String(jni.reguser_RootHash, "cp949")%>"
|
||||
<% }
|
||||
else
|
||||
{
|
||||
%>
|
||||
"reason":"<%=new String (jni.errMsg)%>",
|
||||
"moreinformation":"RA IP:<%=ip + ", RA Port:" + port%>"
|
||||
<% }
|
||||
%>
|
||||
})
|
||||
@ -0,0 +1,288 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
|
||||
<script type="text/javascript" src="../../../xecureweb_up.js"></script>
|
||||
<script>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
<html>
|
||||
<head>
|
||||
<title>인증서 발급</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visited {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../../../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../../../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../../../jsp/img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="../../index.html">TOP 메뉴</a></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="cert_main.jsp" onClick="return XecureLink(this);">이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="40" width="8%"> </td>
|
||||
<td height="40" valign="middle">
|
||||
<p align="center"><font size="4" face="Times New Roman, Times, serif">인증서 발급
|
||||
</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB">
|
||||
<p><b>이 페이지는 Xecure 인증기관에 사용자를 등록하고 작업을 수행합니다. 반드시 운영시스템에서는
|
||||
이 페이지를 웹상에서 제거하고 절대 운영시스템에서는 수행하지 마십시요. </b><b>사용자 확인을
|
||||
위해서 아래의 정보를 입력해 주십시요.</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="24">
|
||||
<br>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function getNow() {
|
||||
var year;
|
||||
var month;
|
||||
var day;
|
||||
var hour;
|
||||
var minute;
|
||||
var second;
|
||||
var ret_Time = "";
|
||||
|
||||
var date = new Date();
|
||||
|
||||
year = date.getFullYear();
|
||||
month = date.getMonth();
|
||||
day = date.getDate();
|
||||
|
||||
hour = date.getHours();
|
||||
minute = date.getMinutes();
|
||||
second = date.getSeconds();
|
||||
|
||||
if( month == 0 ) month++;
|
||||
if( month < 10 ) month = "0" + month;
|
||||
if( day < 10 ) day ="0" + day;
|
||||
|
||||
if( hour < 10 ) hour = "0" + hour;
|
||||
if( minute < 10 ) minute = "0" + minute;
|
||||
|
||||
if( second < 10 ) second = "0" + second;
|
||||
//second = second % 10;
|
||||
|
||||
//ret_Time = String(year).substr(1) + "";
|
||||
//ret_Time = ret_Time + month + "";
|
||||
//ret_Time = ret_Time + day + "";
|
||||
ret_Time = ret_Time + hour + "";
|
||||
ret_Time = ret_Time + minute + "";
|
||||
ret_Time = ret_Time + second + "";
|
||||
return ret_Time;
|
||||
}
|
||||
|
||||
function gen_id () {
|
||||
var myTime = getNow();
|
||||
var prefixList = new Array ("Akali",
|
||||
"Alistar",
|
||||
"Amumu",
|
||||
"Anivia",
|
||||
"Annie",
|
||||
"Ashe",
|
||||
"Blitzcrank",
|
||||
"Brand",
|
||||
"Caitlyn",
|
||||
"Cassiopeia",
|
||||
"Corki",
|
||||
"Mundo",
|
||||
"Evelynn",
|
||||
"Ezreal",
|
||||
"Fiddlesticks",
|
||||
"Galio",
|
||||
"Gangplank");
|
||||
var randomNumber = Math.round (Math.random() * (prefixList.length - 1));
|
||||
var koreanPrefix = "";
|
||||
|
||||
koreanPrefix = prefixList[randomNumber];
|
||||
koreanPrefix += myTime;
|
||||
return koreanPrefix;
|
||||
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<script>
|
||||
function copy_data ()
|
||||
{
|
||||
var src_data;
|
||||
var company_name = document.getElementById ("company_name");
|
||||
var user_id = document.getElementById ("user_id");
|
||||
var user_name = document.getElementById ("user_name");
|
||||
var ssn = document.getElementById ("ssn");
|
||||
company_name.value = gen_id ();
|
||||
|
||||
src_data = company_name.value;
|
||||
user_id.value = src_data;
|
||||
user_name.value = src_data;
|
||||
ssn.value = src_data;
|
||||
}
|
||||
</script>
|
||||
<form name="form1" method=post action='cert_request.jsp' onSubmit='return XecureSubmit(this);'>
|
||||
<table>
|
||||
|
||||
<table>
|
||||
<tr><td>계좌번호</td><td><input type=text name="account" size="20"></td></tr>
|
||||
<tr><td>계좌비밀번호</td><td><input type=text name="ac_pwd" size="20"></td></tr>
|
||||
<tr><td>패스워드카드 15번째 숫자</td><td><input type=text name="pcard" size="20"></td></tr>
|
||||
|
||||
<tr><td>개인/법인/단체 구분</td><td>
|
||||
<input type=radio name="user_type" value="1" checked>개인
|
||||
<input type=radio name="user_type" value="2">법인
|
||||
</td></tr>
|
||||
<tr><td>법인명 (<FONT color="#FF0000">필수</FONT>)</td><td><input type=text id="company_name" name="company_name" size="40"><input type="button" value="전달" onclick="copy_data();"/></td></tr>
|
||||
<tr><td>개인명 / 법인단체 세부명(<FONT color="#FF0000">필수</FONT>)</td><td><input type=text id="user_name" name="user_name" size="40"></td></tr>
|
||||
<tr><td>개인 (법인단체) ID (<FONT color="#FF0000">필수</FONT>)</td><td><input type=text id="user_id" name="user_id" size="40"></td></tr>
|
||||
<tr><td>주민등록번호 (사업자 등록번호) (<FONT color="#FF0000">필수</FONT>) </td><td><input type=text id="ssn" name="ssn" size="20"></td></tr>
|
||||
<tr><td>전자우편 ( 옵션 )</td><td><input type=text name="email" size="20"></td></tr>
|
||||
<tr><td>핸드폰 ( 옵션 )</td><td><input type=text name="cell_phone" size="20"></td></tr>
|
||||
<tr><td>Fax ( 옵션 )</td><td><input type=text name="fax" size="20"></td></tr>
|
||||
<tr><td>자택 우편번호 ( 옵션 )</td><td><input type=text name="zipcode" size="20"></td></tr>
|
||||
<tr><td>자택 주소 ( 옵션 )</td><td><input type=text name="address" size="40"></td></tr>
|
||||
<tr><td>자택 전화 ( 옵션 )</td><td><input type=text name="phone" size="20"></td></tr>
|
||||
<tr><td>회사 우편번호 ( 옵션 )</td><td><input type=text name="czipcode" size="20"></td></tr>
|
||||
<tr><td>회사 주소 ( 옵션 )</td><td><input type=text name="caddress" size="40"></td></tr>
|
||||
<tr><td>회사 전화 ( 옵션 )</td><td><input type=text name="cphone" size="20"></td></tr>
|
||||
<tr><td>인증서 용도 </td><td><input type=text name="cert_type" size="20" value="0000" ></td></tr>
|
||||
<tr><td>인증서 등급 </td><td><input type=text name="cert_class" size="20" value="0000" ></td></tr>
|
||||
<tr><td>Corp Code </td><td><input type=text name="corp_code" size="20" value="0000" ></td></tr>
|
||||
<tr><td>org Code </td><td><input type=text name="org_code" size="20"></td></tr>
|
||||
<tr><td>orgid Code </td><td><input type=text name="orgid_code" size="20"></td></tr>
|
||||
<tr><td>직급(대법원) </td><td><input type=text name="position" size="20"></td></tr>
|
||||
<tr><td>외국인식별번호(대법원) </td><td><input type=text name="foreigner_id_num" size="20"></td></tr>
|
||||
<tr><td>등기마스터번호(대법원) </td><td><input type=text name="reg_master_num" size="20"></td></tr>
|
||||
<tr><td>임원번호(대법원) </td><td><input type=text name="executive_num" size="20"></td></tr>
|
||||
<tr><td>ext3(긴법인명) </td><td><input type=text name="ext3" size="20"></td></tr>
|
||||
</table>
|
||||
<div align="center">
|
||||
<br><input type=submit value='등록' onClick='form1.action = "./cert_request.jsp"'><br>
|
||||
<br><input type=submit value='재등록' onClick='form1.action = "./cert_request_rereg.jsp"'><br>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%" valign="top"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td width="5%"><b>주의</b></td>
|
||||
<td width="2%"> </td>
|
||||
<td > 인증서의 cn filed (개인/법인단체 세부명,ID)에는 PrintableString type 만 가능하다. <br>
|
||||
( spaces, upper-case and lower-case letters,
|
||||
digits and symbols "'", "(", ")", "+", ",", "-", ".", "/", ":", "=" and "?" ) </td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr> -->
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,295 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
String account = request.getParameter("account");
|
||||
String ac_pwd = request.getParameter("ac_pwd");
|
||||
String pcard = request.getParameter("pcard");
|
||||
String operaterId = "internet";
|
||||
String user_type = request.getParameter("user_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
String policy_type = "01";
|
||||
|
||||
String email = request.getParameter("email");
|
||||
String cell_phone = request.getParameter("cell_phone");
|
||||
String fax = request.getParameter("fax");
|
||||
String zipcode = request.getParameter("zipcode");
|
||||
String address = request.getParameter("address");
|
||||
String phone = request.getParameter("phone");
|
||||
String czipcode = request.getParameter("czipcode");
|
||||
String caddress = request.getParameter("caddress");
|
||||
String cphone = request.getParameter("cphone");
|
||||
String cert_type = request.getParameter("cert_type");
|
||||
String cert_class = request.getParameter("cert_class");
|
||||
String corp_code = request.getParameter("corp_code");
|
||||
|
||||
String org_code = request.getParameter("org_code");
|
||||
String orgid_code = request.getParameter("orgid_code");
|
||||
|
||||
String position = request.getParameter("position");
|
||||
String foreigner_id_num = request.getParameter("foreigner_id_num");
|
||||
String reg_master_num = request.getParameter("reg_master_num");
|
||||
String executive_num = request.getParameter("executive_num");
|
||||
|
||||
String ext3 = request.getParameter("ext3");
|
||||
|
||||
int ca_result;
|
||||
|
||||
XecureConfig xecConfig = new XecureConfig ();
|
||||
XecureCA ca_client = new XecureCA ( xecConfig );
|
||||
//XecureCA ca_client = new XecureCA ( xecConfig , "mercury.softforum.com", 2100);
|
||||
|
||||
ca_result = ca_client.registerNewUser ( operaterId, user_type, company_name,
|
||||
user_name, user_id, ssn, policy_type,
|
||||
email,cell_phone, fax, zipcode, address, phone,
|
||||
czipcode, caddress, cphone,
|
||||
cert_type, cert_class, corp_code,
|
||||
org_code, orgid_code,
|
||||
position, foreigner_id_num, reg_master_num, executive_num, ext3);
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>사용자 등록 확인</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visited {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
|
||||
<script type="text/javascript" src="../../../xecureweb_up.js"></script>
|
||||
<script language='javascript'>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
<script language='javascript'>
|
||||
function cert_request ()
|
||||
{
|
||||
var aForm = document.getElementById ("auth");
|
||||
|
||||
RequestCertificate ("11",
|
||||
aForm.ref_code.value,
|
||||
aForm.auth_code.value,
|
||||
cert_request_callback);
|
||||
}
|
||||
|
||||
function cert_request_callback (aResult)
|
||||
{
|
||||
if (aResult == 0)
|
||||
{
|
||||
alert ("금융 결제원 공인인증기관으로 부터 인증서를 발급 받았습니다.");
|
||||
}
|
||||
else
|
||||
{
|
||||
alert (aResult);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../../../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../../../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../../../jsp/img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="../../index.html">TOP 메뉴</a></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="cert_main.jsp" onClick="return XecureLink(this);">이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100" width="8%"> </td>
|
||||
<td height="120" valign="middle">
|
||||
<p align="center"><font size="4" face="Times New Roman, Times, serif">사용자
|
||||
등록 확인</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="24">
|
||||
<div align="center">
|
||||
<p> </p>
|
||||
|
||||
<%
|
||||
if ( ca_result == 0 ) {
|
||||
%>
|
||||
|
||||
<script>
|
||||
function issueByAlgorithm (type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 2:
|
||||
xecure_ca_type = 102; //(KCDSA)
|
||||
type_name = "KCDSA"
|
||||
break;
|
||||
|
||||
default:
|
||||
xecure_ca_type = 101; // XecureCA (RSA) //original
|
||||
type_name = "RSA"
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
document.auth.ca_type.value = type_name;
|
||||
}
|
||||
</script>
|
||||
<table>
|
||||
<tr><td>사용자</td><td><%=user_name%></td></tr>
|
||||
<tr><td>계좌번호</td><td><%=account%></td></tr>
|
||||
<tr><td>등록일</td><td><%=ca_client.getResponseFromRegUser("REGDATE")%></td></tr>
|
||||
<tr><td>등록번호</td><td><%=ca_client.getResponseFromRegUser("REGSERIAL")%></td></tr>
|
||||
<tr><td>사용자 ID</td><td><%=ca_client.getResponseFromRegUser("USERID")%></td></tr>
|
||||
<tr><td>주민등록번호</td><td><%=ca_client.getResponseFromRegUser("SSN")%></td></tr>
|
||||
<tr><td>사용자 이름</td><td><%=ca_client.getResponseFromRegUser("USERNAME")%></td></tr>
|
||||
<tr><td>참조코드</td><td><%=ca_client.getResponseFromRegUser("REFCODE")%></td></tr>
|
||||
<tr><td>인가코드</td><td><%=ca_client.getResponseFromRegUser("AUTHCODE")%></td></tr>
|
||||
<tr><td>인증서 용도</td><td><%=ca_client.getResponseFromRegUser("CERTTYPE")%></td></tr>
|
||||
<tr><td>인증서 등급</td><td><%=ca_client.getResponseFromRegUser("CERTCLASS")%></td></tr>
|
||||
<tr><td>CORP CORE</td><td><%=ca_client.getResponseFromRegUser("CORPCODE")%></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<%=request.getParameter("user_name")%>'님의 사용자 정보가 XecureCA 인증기관에 등록 되었습니다. <br>
|
||||
<br>이제 '확인' 버튼을 누르시면 XecureCA 공인인증기관으로 부터 인증서를 발급받을 수 있습니다.</p>
|
||||
<p><font color="#000000" size="5"> </font> </p>
|
||||
<form name='auth' id="auth" onSubmit='return false;'>
|
||||
<input type=hidden name='ref_code' value='<%=ca_client.getResponseFromRegUser("REFCODE")%>'>
|
||||
<input type=hidden name='auth_code' value='<%=ca_client.getResponseFromRegUser("AUTHCODE")%>'>
|
||||
<input type=hidden name='class_id' value='<%=ca_client.getResponseFromRegUser("CERTCLASS")%>'>
|
||||
<input type=submit value="확인" onClick="cert_request ()"><BR/><BR/><BR/><BR/><BR/>
|
||||
공개키 알고리즘 <input type="text" name="ca_type" disabled="disabled" value=""/ style="border:0px sold black; "><BR/>
|
||||
<input type="button" value="to RSA" onclick="issueByAlgorithm(1);"/>
|
||||
<input type="button" value="to KCDSA" onclick="issueByAlgorithm(2);"/>
|
||||
</form>
|
||||
<% }
|
||||
else {
|
||||
%>
|
||||
<p> 사용자 등록에 실패했습니다.</p>
|
||||
에러 코드 : <%=ca_client.getLastError()%><br>
|
||||
에러 메시지 : <%=ca_client.getLastErrorMsg()%><br>
|
||||
xecConfig.getXecureCaHost() : <%= xecConfig.getXecureCaHost()%> <br>
|
||||
xecConfig.getXecureCaPort() : <%= xecConfig.getXecureCaPort()%> <br>
|
||||
|
||||
<% }
|
||||
%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%" valign="top"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,280 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
String account = request.getParameter("account");
|
||||
String ac_pwd = request.getParameter("ac_pwd");
|
||||
String pcard = request.getParameter("pcard");
|
||||
String operaterId = "internet";
|
||||
String user_type = request.getParameter("user_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
String policy_type = "01";
|
||||
|
||||
String email = request.getParameter("email");
|
||||
String cell_phone = request.getParameter("cell_phone");
|
||||
String fax = request.getParameter("fax");
|
||||
String zipcode = request.getParameter("zipcode");
|
||||
String address = request.getParameter("address");
|
||||
String phone = request.getParameter("phone");
|
||||
String czipcode = request.getParameter("czipcode");
|
||||
String caddress = request.getParameter("caddress");
|
||||
String cphone = request.getParameter("cphone");
|
||||
String cert_type = request.getParameter("cert_type");
|
||||
String cert_class = request.getParameter("cert_class");
|
||||
String corp_code = request.getParameter("corp_code");
|
||||
|
||||
String org_code = request.getParameter("org_code");
|
||||
String orgid_code = request.getParameter("orgid_code");
|
||||
|
||||
String position = request.getParameter("position");
|
||||
String foreigner_id_num = request.getParameter("foreigner_id_num");
|
||||
String reg_master_num = request.getParameter("reg_master_num");
|
||||
String executive_num = request.getParameter("executive_num");
|
||||
|
||||
String ext3 = request.getParameter("ext3");
|
||||
|
||||
int ca_result;
|
||||
|
||||
XecureConfig xecConfig = new XecureConfig ();
|
||||
XecureCA ca_client = new XecureCA ( xecConfig );
|
||||
//XecureCA ca_client = new XecureCA ( xecConfig , "mercury.softforum.com", 2100);
|
||||
|
||||
ca_result = ca_client.registerReNewUser ( operaterId, user_type, company_name,
|
||||
user_name, user_id, ssn, policy_type,
|
||||
email,cell_phone, fax, zipcode, address, phone,
|
||||
czipcode, caddress, cphone,
|
||||
cert_type, cert_class, corp_code,
|
||||
org_code, orgid_code,
|
||||
position, foreigner_id_num, reg_master_num, executive_num, ext3, 0);
|
||||
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>사용자 등록 확인</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visited {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
|
||||
<script type="text/javascript" src="../../../xecureweb_up.js"></script>
|
||||
<script language='javascript'>
|
||||
PrintObjectTag();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
<script language='javascript'>
|
||||
function cert_request( form )
|
||||
{
|
||||
var nRet = RequestCertificate( "11", form.ref_code.value, form.auth_code.value );
|
||||
if ( nRet == 0 )
|
||||
confirm("XecureCA 인증기관으로 부터 인증서를 발급 받았습니다.");
|
||||
}
|
||||
</script>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../../../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../../../jsp/img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../../../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../../../jsp/img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="../../index.html">TOP 메뉴</a></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<div align="center"><a href="cert_main.jsp" onClick="return XecureLink(this);">이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100" width="8%"> </td>
|
||||
<td height="120" valign="middle">
|
||||
<p align="center"><font size="4" face="Times New Roman, Times, serif">사용자
|
||||
등록 확인</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="24">
|
||||
<div align="center">
|
||||
<p> </p>
|
||||
|
||||
<%
|
||||
if ( ca_result == 0 ) {
|
||||
%>
|
||||
|
||||
<script>
|
||||
function issueByAlgorithm (type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 2:
|
||||
xecure_ca_type = 102; //(KCDSA)
|
||||
type_name = "KCDSA"
|
||||
break;
|
||||
|
||||
default:
|
||||
xecure_ca_type = 101; // XecureCA (RSA) //original
|
||||
type_name = "RSA"
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
document.auth.ca_type.value = type_name;
|
||||
}
|
||||
</script>
|
||||
<table>
|
||||
<tr><td>사용자</td><td><%=user_name%></td></tr>
|
||||
<tr><td>계좌번호</td><td><%=account%></td></tr>
|
||||
<tr><td>등록일</td><td><%=ca_client.getResponseFromRegUser("REGDATE")%></td></tr>
|
||||
<tr><td>등록번호</td><td><%=ca_client.getResponseFromRegUser("REGSERIAL")%></td></tr>
|
||||
<tr><td>사용자 ID</td><td><%=ca_client.getResponseFromRegUser("USERID")%></td></tr>
|
||||
<tr><td>주민등록번호</td><td><%=ca_client.getResponseFromRegUser("SSN")%></td></tr>
|
||||
<tr><td>사용자 이름</td><td><%=ca_client.getResponseFromRegUser("USERNAME")%></td></tr>
|
||||
<tr><td>참조코드</td><td><%=ca_client.getResponseFromRegUser("REFCODE")%></td></tr>
|
||||
<tr><td>인가코드</td><td><%=ca_client.getResponseFromRegUser("AUTHCODE")%></td></tr>
|
||||
<tr><td>인증서 용도</td><td><%=ca_client.getResponseFromRegUser("CERTTYPE")%></td></tr>
|
||||
<tr><td>인증서 등급</td><td><%=ca_client.getResponseFromRegUser("CERTCLASS")%></td></tr>
|
||||
<tr><td>CORP CORE</td><td><%=ca_client.getResponseFromRegUser("CORPCODE")%></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
<%=request.getParameter("user_name")%>'님의 사용자 정보가 XecureCA 인증기관에 등록 되었습니다. <br>
|
||||
<br>이제 '확인' 버튼을 누르시면 XecureCA 공인인증기관으로 부터 인증서를 발급받을 수 있습니다.</p>
|
||||
<p><font color="#000000" size="5"> </font> </p>
|
||||
<form name='auth' onSubmit='cert_request(this); return false;'>
|
||||
<input type=hidden name='ref_code' value='<%=ca_client.getResponseFromRegUser("REFCODE")%>'>
|
||||
<input type=hidden name='auth_code' value='<%=ca_client.getResponseFromRegUser("AUTHCODE")%>'>
|
||||
<input type=hidden name='class_id' value='<%=ca_client.getResponseFromRegUser("CERTCLASS")%>'>
|
||||
<input type=submit value="확인"><BR/><BR/><BR/><BR/><BR/>
|
||||
공개키 알고리즘 <input type="text" name="ca_type" disabled="disabled" value=""/ style="border:0px sold black; "><BR/>
|
||||
<input type="button" value="to RSA" onclick="issueByAlgorithm(1);"/>
|
||||
<input type="button" value="to KCDSA" onclick="issueByAlgorithm(2);"/>
|
||||
</form>
|
||||
<% }
|
||||
else {
|
||||
%>
|
||||
<p> 사용자 등록에 실패했습니다.</p>
|
||||
에러 코드 : <%=ca_client.getLastError()%><br>
|
||||
에러 메시지 : <%=ca_client.getLastErrorMsg()%><br>
|
||||
xecConfig.getXecureCaHost() : <%= xecConfig.getXecureCaHost()%> <br>
|
||||
xecConfig.getXecureCaPort() : <%= xecConfig.getXecureCaPort()%> <br>
|
||||
|
||||
<% }
|
||||
%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%" valign="top"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,328 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
response.setHeader("Cache-Control","no-store");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
|
||||
<%
|
||||
String []nameList = {"자신", "남편", "부인", "딸램", "아들", "막내", "장남", "장녀",
|
||||
"차녀", "차남", "엄마", "아빠", "형님", "언니", "누나", "오빠", "동생",
|
||||
"할아버지", "할머니", "큰아버지", "큰어머니", "삼촌", "사촌",
|
||||
"매부", "매재", "매형", "제수", "제부", "고모", "고모부",
|
||||
"이모", "이모부", "아저씨", "조카"};
|
||||
|
||||
java.util.Random aRandom = null;
|
||||
|
||||
aRandom = (java.util.Random)application.getAttribute ("xwup.ibs.random");
|
||||
if (aRandom == null)
|
||||
{
|
||||
aRandom = new java.util.Random ();
|
||||
application.setAttribute ("xwup.ibs.random", aRandom);
|
||||
}
|
||||
%>
|
||||
<%
|
||||
String commandType = request.getParameter("commandType");
|
||||
String targetRA = request.getParameter ("targetRA");
|
||||
String operaterId = "internet";
|
||||
String user_policy_type = request.getParameter("user_policy_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
String cert_type = request.getParameter("cert_type");
|
||||
String cert_class = request.getParameter("cert_class");
|
||||
String corp_code = request.getParameter("corp_code");
|
||||
|
||||
String org_code = request.getParameter("org_code");
|
||||
String orgid_code = request.getParameter("orgid_code");
|
||||
|
||||
String position = request.getParameter("position");
|
||||
String foreigner_id_num = request.getParameter("foreigner_id_num");
|
||||
String reg_master_num = request.getParameter("reg_master_num");
|
||||
String executive_num = request.getParameter("executive_num");
|
||||
String publicOrPrivate = request.getParameter("user_public_or_private");
|
||||
|
||||
String ext3 = request.getParameter("ext3");
|
||||
|
||||
int ca_result = 0;
|
||||
XecureConfig xconf = new XecureConfig ();
|
||||
XecureCA ca_client = null;
|
||||
String ip = null;
|
||||
int port = -1;
|
||||
int caType = -1;
|
||||
int caRMPType = -1;
|
||||
%>
|
||||
|
||||
<%
|
||||
ip = xconf.getXecureCaHost ();
|
||||
port = xconf.getXecureCaPort ();
|
||||
|
||||
if (targetRA != null)
|
||||
{
|
||||
if (targetRA.equalsIgnoreCase ("1024")) /* 1024 XecureCA Information */
|
||||
{
|
||||
ip = "192.168.0.26";
|
||||
port = 29210;
|
||||
caType = 2;
|
||||
caRMPType = 2;
|
||||
}
|
||||
else if (targetRA.equalsIgnoreCase ("2048")) /* 2048 XecureCA Information */
|
||||
{
|
||||
if (publicOrPrivate.equals("yessignmpki")) {
|
||||
ip = "192.168.0.43";
|
||||
port = 5301;
|
||||
caType = 2;
|
||||
caRMPType = 1;
|
||||
} else {
|
||||
ip = "192.168.0.4";
|
||||
port = 21200;
|
||||
caType = 2;
|
||||
caRMPType = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ca_client = new XecureCA (xconf, ip, port, caType, caRMPType);
|
||||
|
||||
|
||||
if (org_code == null)
|
||||
org_code = "";
|
||||
if (orgid_code == null)
|
||||
orgid_code = "";
|
||||
if (corp_code == null)
|
||||
corp_code = "0000";
|
||||
if (cert_class == null)
|
||||
cert_class = "0000";
|
||||
if (cert_type == null)
|
||||
cert_type = "0000";
|
||||
|
||||
|
||||
if (commandType != null && commandType.equalsIgnoreCase ("update"))
|
||||
{
|
||||
boolean isError = false;
|
||||
if (user_policy_type == null)
|
||||
isError = true;
|
||||
|
||||
if (user_name == null)
|
||||
isError = true;
|
||||
|
||||
if (isError)
|
||||
{
|
||||
%>
|
||||
({"code":"-1"
|
||||
"reason":"no policy or user_name or ssn"
|
||||
"moreinformation":""})
|
||||
<%
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (user_policy_type == null)
|
||||
{
|
||||
user_policy_type = "104";
|
||||
}
|
||||
|
||||
if (user_name == null || user_name.length () == 0)
|
||||
{
|
||||
user_name = nameList [aRandom.nextInt (nameList.length)];
|
||||
if (targetRA.equalsIgnoreCase("2048"))
|
||||
{
|
||||
while (user_name.length() < 4)
|
||||
{
|
||||
user_name = nameList [aRandom.nextInt (nameList.length)];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
user_name = new String(user_name.getBytes("iso8859-1"), "utf-8");
|
||||
|
||||
String euser_name = request.getParameter("euser_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
String policy_type ;
|
||||
String user_type;
|
||||
|
||||
user_type = user_policy_type.substring(0, 1);
|
||||
|
||||
if( user_type.equals("1") )
|
||||
{
|
||||
if (ssn == null || ssn.length () == 0)
|
||||
{
|
||||
StringBuffer aBuffer = new StringBuffer ();
|
||||
Calendar aCalendar = Calendar.getInstance ();
|
||||
String aSSNTail = null;
|
||||
aSSNTail = String.valueOf (aRandom.nextInt (2999999));
|
||||
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.YEAR)).substring (2));
|
||||
|
||||
if (aCalendar.get(Calendar.MONTH) < 10)
|
||||
aBuffer.append ("0");
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.MONTH)));
|
||||
|
||||
if (aCalendar.get(Calendar.DAY_OF_MONTH) < 10)
|
||||
aBuffer.append ("0");
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.DAY_OF_MONTH)));
|
||||
|
||||
|
||||
if (aSSNTail.length () < 7)
|
||||
{
|
||||
for (int aIter = 0; aIter < 7 - aSSNTail.length (); ++aIter)
|
||||
{
|
||||
aBuffer.append ("0");
|
||||
}
|
||||
}
|
||||
aBuffer.append (aSSNTail);
|
||||
|
||||
ssn = aBuffer.toString ();
|
||||
|
||||
}
|
||||
if (user_id == null)
|
||||
user_id = ssn;
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
}
|
||||
else if ( user_type.equals("2") )
|
||||
{
|
||||
if (ssn == null || ssn.length () == 0)
|
||||
{
|
||||
StringBuffer aBuffer = new StringBuffer ();
|
||||
String aSSNTail = null;
|
||||
aSSNTail = "2" + String.valueOf (aRandom.nextInt (999999999));
|
||||
|
||||
if (aSSNTail.length () < 10)
|
||||
{
|
||||
for (int aIter = 0; aIter < 10 - aSSNTail.length (); ++aIter)
|
||||
{
|
||||
aBuffer.append ("0");
|
||||
}
|
||||
}
|
||||
aBuffer.append (aSSNTail);
|
||||
|
||||
ssn = aBuffer.toString ();
|
||||
}
|
||||
|
||||
if (company_name == null)
|
||||
company_name = ssn;
|
||||
if (euser_name == null)
|
||||
euser_name = ssn;
|
||||
if (user_id == null)
|
||||
user_id = ssn;
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
}
|
||||
else
|
||||
policy_type = user_policy_type.substring(1,2);
|
||||
|
||||
String email = "dont email me";
|
||||
String cell_phone = "dont call me";
|
||||
String fax = "dont fax me";
|
||||
String zipcode = "127-311";
|
||||
String address = "dogok dong house";
|
||||
String phone = "02-526-8000";
|
||||
String czipcode = "127-311";
|
||||
String caddress = "dogok dong";
|
||||
String cphone = "02-526-8000";
|
||||
|
||||
|
||||
%>
|
||||
({"ssn":"<%=ssn%>",
|
||||
"name":"<%=user_name%>",
|
||||
<%
|
||||
|
||||
if (commandType == null || commandType.equalsIgnoreCase ("new"))
|
||||
{
|
||||
ca_result = ca_client.registerNewUser (operaterId,
|
||||
user_type,
|
||||
company_name,
|
||||
user_name,
|
||||
user_id,
|
||||
ssn,
|
||||
policy_type,
|
||||
email,
|
||||
cell_phone,
|
||||
fax,
|
||||
zipcode,
|
||||
address,
|
||||
phone,
|
||||
czipcode,
|
||||
caddress,
|
||||
cphone,
|
||||
cert_type,
|
||||
cert_class,
|
||||
corp_code,
|
||||
org_code,
|
||||
orgid_code,
|
||||
position,
|
||||
foreigner_id_num,
|
||||
reg_master_num,
|
||||
executive_num,
|
||||
ext3);
|
||||
}
|
||||
else if (commandType.equalsIgnoreCase ("rereg"))
|
||||
{
|
||||
ca_result = ca_client.registerReNewUser (operaterId,
|
||||
user_type,
|
||||
company_name,
|
||||
user_name,
|
||||
user_id,
|
||||
ssn,
|
||||
policy_type,
|
||||
email,
|
||||
cell_phone,
|
||||
fax,
|
||||
zipcode,
|
||||
address,
|
||||
phone,
|
||||
czipcode,
|
||||
caddress,
|
||||
cphone,
|
||||
cert_type,
|
||||
cert_class,
|
||||
corp_code,
|
||||
org_code,
|
||||
orgid_code,
|
||||
position,
|
||||
foreigner_id_num,
|
||||
reg_master_num,
|
||||
executive_num,
|
||||
ext3,
|
||||
0);
|
||||
}
|
||||
else if (commandType.equalsIgnoreCase ("update"))
|
||||
{
|
||||
%>
|
||||
"code":"none",
|
||||
"reason":"XecureCA does not support registration for UPDATE",
|
||||
"moreinformation":"CA IP:<%=ip + ", CA Port:" + port%>"
|
||||
})
|
||||
<%
|
||||
return;
|
||||
|
||||
}
|
||||
if ( ca_result == 0 ) {
|
||||
%>
|
||||
"code":"0",
|
||||
"regdate":"<%=ca_client.getResponseFromRegUser("REGDATE")%>",
|
||||
"regserial":"<%=ca_client.getResponseFromRegUser("REGSERIAL")%>",
|
||||
"userid":"<%=ca_client.getResponseFromRegUser("USERID")%>",
|
||||
"refcode":"<%=ca_client.getResponseFromRegUser("REFCODE")%>",
|
||||
"authcode":"<%=ca_client.getResponseFromRegUser("AUTHCODE")%>"
|
||||
<% }
|
||||
else
|
||||
{
|
||||
%>
|
||||
"code":"<%=ca_client.getLastError()%>",
|
||||
"reason":"<%=ca_client.getLastErrorMsg()%>",
|
||||
"moreinformation":"CA IP:<%=ip + ", CA Port:" + port %>"
|
||||
<% }
|
||||
%>
|
||||
})
|
||||
207
src/main/webapp/AnySign4PC/test/installAnySign.jsp
Normal file
207
src/main/webapp/AnySign4PC/test/installAnySign.jsp
Normal file
@ -0,0 +1,207 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.security.*" %>
|
||||
<%@ page import="java.util.Random" %>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<style type="text/css">
|
||||
* {font-family:'맑은 고딕','Malgun Gothic','돋움',Dotum,Helvetica,AppleGothic,Sans-serif}
|
||||
caption { display: none; }
|
||||
.board-list-1,.board-list-1 th,.board-list-1 td{border:none;text-align:center;font-size:14px}
|
||||
.board-list-1 a {font-size:14px}
|
||||
.board-list-1 {border-top:1px solid #444;border-bottom:1px solid #c7c7c7;border-collapse:separate;table-layout:fixed}
|
||||
.lt-ie9 .board-list-1 {border-collapse:collapse}
|
||||
.board-list-1 th {padding:8px 10px 10px;border-bottom:1px solid #c7c7c7;background:#fff;font-weight:bold;vertical-align:middle}
|
||||
.board-list-1 td {padding:8px 10px 10px;border-top:1px solid #e5e5e5;background:#fff;color:#555;vertical-align:top;line-height:30px}
|
||||
|
||||
.infoReferBox {background-color: #fbfbfb; border: 1px solid #d6d6d6; overflow: hidden; font-size:14px; width:780px}
|
||||
|
||||
.btn{vertical-align:top;display:inline-block}
|
||||
.btn.home{margin-left:295px;width:104px;height:42px;background:url(../AnySign4PC/img/sp_com.png) no-repeat -356px -700px}
|
||||
.btn.down{margin-left:5px;width:70px;height:30px;background:url(../AnySign4PC/img/sp_com.png) no-repeat -268px -705px}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/javascript" src="../anySign4PCInterface.js"></script>
|
||||
<script type="text/javascript">
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier(new XecureConfig());
|
||||
out.println(vid.ServerCertWriteScript());
|
||||
|
||||
// AnySign 세션ID 설정
|
||||
String HashedSessionID = "";
|
||||
|
||||
// 1. 고정 세션 ID
|
||||
HashedSessionID = "reaverTestSID19810531";
|
||||
|
||||
// 2. 웹세션ID 해쉬
|
||||
//String id = session.getId();
|
||||
//HashedSessionID = cipher.getHash("SHA256",id);
|
||||
|
||||
out.println("AnySign.mAnySignSID = '" + HashedSessionID + "';");
|
||||
//
|
||||
|
||||
|
||||
// 데몬 무결성 검증 기능 선택사항
|
||||
String HashedRandomValue = "";
|
||||
|
||||
// 1. 무결성 검증 비활성화
|
||||
// AnySign.mAnySignITGT 변수 "" 설정 - 2번 부분 주석처리.
|
||||
//
|
||||
|
||||
// 2. 랜덤값 기반 무결성 검증 설정
|
||||
// AnySign.mAnySignITGT = HashedRandomValue
|
||||
//
|
||||
Cipher cipher = new Cipher( new XecureConfig());
|
||||
HashedRandomValue = cipher.getRamdomMsg(30);
|
||||
|
||||
out.println("AnySign.mAnySignITGT = '" + HashedRandomValue + "';");
|
||||
%>
|
||||
|
||||
function fn_Download (type)
|
||||
{
|
||||
var downURL;
|
||||
if (type == "ANYSIGN")
|
||||
{
|
||||
if (AnySign.mPlatform.aName == "linux")
|
||||
{
|
||||
if (confirm("AnySign for PC 설치를 위해서는 브라우저가 재실행 될 수 있습니다. 설치하시겠습니까?"))
|
||||
{
|
||||
var i386deb = document.createElement("a");
|
||||
i386deb.text = "i386_deb";
|
||||
var i386rpm = document.createElement("a");
|
||||
i386rpm.text = "i386_rpm"
|
||||
var x86_64_deb = document.createElement("a");
|
||||
x86_64_deb.text = "x86_64_deb";
|
||||
var x86_64_rpm = document.createElement("a");
|
||||
x86_64_rpm.text = "x86_64_rpm";
|
||||
|
||||
i386deb.href = AnySign.mPlatform.aAnySignInstallPath[0];
|
||||
i386rpm.href = AnySign.mPlatform.aAnySignInstallPath[1];
|
||||
x86_64_deb.href = AnySign.mPlatform.aAnySignInstallPath[2];
|
||||
x86_64_rpm.href = AnySign.mPlatform.aAnySignInstallPath[3];
|
||||
|
||||
document.getElementById("AnySign4PC_download").appendChild (document.createElement("br"));
|
||||
document.getElementById("AnySign4PC_download").appendChild (i386deb);
|
||||
document.getElementById("AnySign4PC_download").appendChild (document.createElement("br"));
|
||||
document.getElementById("AnySign4PC_download").appendChild (i386rpm);
|
||||
document.getElementById("AnySign4PC_download").appendChild (document.createElement("br"));
|
||||
document.getElementById("AnySign4PC_download").appendChild (x86_64_deb);
|
||||
document.getElementById("AnySign4PC_download").appendChild (document.createElement("br"));
|
||||
document.getElementById("AnySign4PC_download").appendChild (x86_64_rpm);
|
||||
document.getElementById("AnySign4PC_download").appendChild (document.createElement("br"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
downURL = AnySign.mPlatform.aAnySignInstallPath;
|
||||
document.location = downURL;
|
||||
}
|
||||
|
||||
var checkInterval = setInterval (function () {
|
||||
if (!AnySign.mAnySignLoad && AnySign.mExtensionSetting.mInstallCheck_CB == null) {
|
||||
AnySign4PC_installCheck (installCheck_callback);
|
||||
} else if (AnySign.mAnySignLoad == true) {
|
||||
clearInterval(checkInterval);
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
function installCheck_callback (result) {
|
||||
var aElement1 = document.getElementById("AnySign4PC_checkMessage1");
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case "ANYSIGN4PC_NORMAL":
|
||||
aElement1.style.color = "blue";
|
||||
aElement1.innerHTML = "설치됨";
|
||||
break;
|
||||
case "ANYSIGN4PC_INTEGRITY_FAIL":
|
||||
case "ANYSIGN4PC_NEED_INSTALL":
|
||||
case "ANYSIGN4PC_NEED_UPDATE":
|
||||
if (result == "ANYSIGN4PC_INTEGRITY_FAIL") {
|
||||
aElement1.style.color = "red";
|
||||
aElement1.innerHTML = "미설치";
|
||||
}
|
||||
else if (result == "ANYSIGN4PC_NEED_INSTALL") {
|
||||
aElement1.style.color = "red";
|
||||
aElement1.innerHTML = "미설치";
|
||||
}
|
||||
else
|
||||
{
|
||||
aElement1.style.color = "green";
|
||||
aElement1.innerHTML = "업데이트필요";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function link () {
|
||||
document.location = AnySign.mBasePath + "/../test";
|
||||
}
|
||||
|
||||
AnySign.mAnySignShowImg.showImg = false;
|
||||
PrintObjectTag (true);
|
||||
setTimeout(function () {
|
||||
AnySign4PC_installCheck (installCheck_callback);
|
||||
}, 500);
|
||||
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<h3>AnySign4PC 설치 정보</h3>
|
||||
<table class="board-list-1 board-security" border="1" cellspacing="0" summary="프로그램,내용,설치현황,설치관리제공">
|
||||
<caption>보안 프로그램 설치 다운로드</caption>
|
||||
<colgroup>
|
||||
<col width="130"></col>
|
||||
<col></col>
|
||||
<col width="120"></col>
|
||||
<col width="100"></col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">프로그램명</th>
|
||||
<th scope="col">내용</th>
|
||||
<th scope="col">설치현황</th>
|
||||
<th scope="col">설치관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>AnySignForPC</td>
|
||||
<td>Non-ActiveX 공인인증서 전자서명을 지원해주는 프로그램입니다.</td>
|
||||
<td><div id="AnySign4PC_checkMessage1"><strong>확인중..</strong></div></div></td>
|
||||
<td><span id="AnySign4PC_download"><a class="btn down" href="javascript:fn_Download('ANYSIGN');"></a></span></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td>잉카 키보드 보안</td>
|
||||
<td>nProtect Online Security V1.0(PFS)</td>
|
||||
<td><div id="AnySign4PC_checkMessage2">-</div></td>
|
||||
<td><a class="btn down" href="../inca_nos10/nos_setup.exe"></a></td>
|
||||
</tr>
|
||||
-->
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<p>
|
||||
<div class="infoReferBox">
|
||||
<ul>
|
||||
<li>운영 시스템(OS) : <strong><script type="text/javascript">document.write(AnySign.mPlatform.aName);</script></strong></li>
|
||||
<li>웹브라우저 : <strong><script type="text/javascript">document.write(AnySign.mBrowser.aName);</script></strong></li>
|
||||
<li>필요 모듈버전 : <strong><script type="text/javascript">document.write(AnySign.mAnySignVersion);</script></strong></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
<a class="btn home" href="javascript:link();"></a>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
64
src/main/webapp/AnySign4PC/test/sign_result.jsp
Normal file
64
src/main/webapp/AnySign4PC/test/sign_result.jsp
Normal file
@ -0,0 +1,64 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
SignVerifier verifier = null;
|
||||
|
||||
StringBuffer aResponse = new StringBuffer ();
|
||||
%>
|
||||
|
||||
<%
|
||||
String sm = request.getParameter("SIGNED");
|
||||
String vm = request.getParameter("VID");
|
||||
|
||||
if (sm != null && sm.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , sm, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , sm, 1);
|
||||
System.out.println ("base64:" + sm);
|
||||
}
|
||||
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + verifier.getLastError () + "\",");
|
||||
aResponse.append ("reason:\"" + verifier.getLastErrorMsg () + "\",");
|
||||
|
||||
if (verifier.getLastError() == 0)
|
||||
{
|
||||
aResponse.append ("plain:\"" + verifier.getVerifiedMsg_Text () + "\",");
|
||||
aResponse.append ("certificatePEM:\"" + verifier.getSignerCertificate().getCertPem ().replaceAll ("\n", "") + "\",");
|
||||
aResponse.append ("subjectRDN:\"" + verifier.getSignerCertificate().getSubject () + "\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (vm != null)
|
||||
{
|
||||
|
||||
VidVerifier vid = new VidVerifier (aXecureConfig);
|
||||
|
||||
vid.virtualIDVerifyS(vm, verifier.getSignerCertificate().getCertPem());
|
||||
|
||||
aResponse.append ("vidCode:\"" + vid.getLastError () + "\",");
|
||||
aResponse.append ("vidReason:\"" + vid.getLastErrorMsg () + "\",");
|
||||
|
||||
if( vid.getLastError () == 0) {
|
||||
aResponse.append ("vidIDNumber:\"" + vid.getIdn () + "\",");
|
||||
aResponse.append ("vidRealName:\"" + vid.getRealName () + "\",");
|
||||
}
|
||||
}
|
||||
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
%>
|
||||
|
||||
138
src/main/webapp/AnySign4PC/test/sign_result1.jsp
Normal file
138
src/main/webapp/AnySign4PC/test/sign_result1.jsp
Normal file
@ -0,0 +1,138 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("text/html; charset=UTF-8");
|
||||
String aCharset = "UTF-8";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
SignVerifier verifier = null;
|
||||
|
||||
String aResult = request.getParameter("aResult");
|
||||
int aErrCode = 0;
|
||||
String aErrReason = "";
|
||||
String aPlain = "";
|
||||
String aPlainHex = "";
|
||||
String aCertificate = "";
|
||||
String aSubjectRDN = "";
|
||||
|
||||
String aUserID = "";
|
||||
String aRealID = "";
|
||||
String aSerial = "";
|
||||
|
||||
String operatoId = "internet";
|
||||
String corp_code = "0000";
|
||||
|
||||
String ip = "192.168.60.60";
|
||||
int port = 30000;
|
||||
int caType = 2;
|
||||
int caRMPType = 2;
|
||||
XecureCA ca = new XecureCA (aXecureConfig, ip, port, caType, caRMPType);
|
||||
|
||||
SplitSign aSplitSign = new SplitSign(aXecureConfig);
|
||||
String aRequestPlain = request.getParameter("aPlain");
|
||||
byte[] aPlainByte = null;
|
||||
String aSignedData = "";
|
||||
|
||||
String[] aOptions = request.getParameterValues("aOption");
|
||||
int aOption = 0;
|
||||
for (int i = 0; aOptions !=null && i < aOptions.length; i++)
|
||||
{
|
||||
aOption += Integer.parseInt(aOptions[i]);
|
||||
}
|
||||
|
||||
/* 분리 서명 검증 시 */
|
||||
if ((aOption & 0x100) == 0 && (aOption & 0x200) == 0x200 && (aOption & 0x1000) == 0x1000)
|
||||
{
|
||||
aPlainByte = aRequestPlain.getBytes(aCharset);
|
||||
aSignedData = aSplitSign.merge(aResult, aPlainByte);
|
||||
if (aSplitSign.getLastError() != 0)
|
||||
{
|
||||
aErrCode = aSplitSign.getLastError();
|
||||
aErrReason = aSplitSign.getLastErrorMsg();
|
||||
out.println ("분리 서명 데이터 오류<br>");
|
||||
out.println ("Error Code: " + aErrCode + "<br>");
|
||||
out.println ("Error Reason: " + aErrReason + "<br>");
|
||||
return;
|
||||
}
|
||||
|
||||
aResult = aSignedData;
|
||||
}
|
||||
|
||||
if (aResult == null || aResult.equals(""))
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter";
|
||||
}
|
||||
else if (aResult.length() < 10)
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter (short)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aResult.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , aResult, aCharset, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , aResult, aCharset, 1);
|
||||
}
|
||||
|
||||
if (verifier.getLastError() != 0)
|
||||
{
|
||||
aErrCode = verifier.getLastError();
|
||||
aErrReason = verifier.getLastErrorMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
aPlain = verifier.getVerifiedMsg_Text();
|
||||
aCertificate = verifier.getSignerCertificate().getCertPem().replaceAll ("\n", "");
|
||||
aSubjectRDN = verifier.getSignerCertificate().getSubject();
|
||||
aSerial = verifier.getSignerCertificate().getSerial();
|
||||
|
||||
|
||||
|
||||
if(aPlain != null) {
|
||||
byte[] buf = verifier.getVerifiedMsg();
|
||||
String tmp = "";
|
||||
|
||||
for (int i = 0; i < buf.length; i++)
|
||||
{
|
||||
tmp = Integer.toHexString(0xFF & buf[i]);
|
||||
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||
aPlainHex += tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<h3>서명값 검증 결과</h3>
|
||||
<ul>
|
||||
<li>오류 코드: <%=aErrCode%>
|
||||
<li>오류 메세지: <%=aErrReason%>
|
||||
<li>서명 원문: <%=aPlain%>
|
||||
<li>서명 원문(Hex): <%=aPlainHex%>
|
||||
<li>User ID: <%=aUserID%>
|
||||
<li>Real ID: <%=aRealID%>
|
||||
<li>서명 인증서 주체: <%=aSubjectRDN%>
|
||||
<li>서명 인증서: <div><textarea cols="100" rows="10"><%=aCertificate%></textarea></div>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
142
src/main/webapp/AnySign4PC/test/sign_result1_euckr.jsp
Normal file
142
src/main/webapp/AnySign4PC/test/sign_result1_euckr.jsp
Normal file
@ -0,0 +1,142 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=euc-kr" pageEncoding="euc-kr"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
response.setContentType("text/html; charset=euc-kr");
|
||||
String aCharset = "euc-kr";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
SignVerifier verifier = null;
|
||||
|
||||
String aResult = request.getParameter("aResult");
|
||||
int aErrCode = 0;
|
||||
String aErrReason = "";
|
||||
String aPlain = "";
|
||||
String aPlainHex = "";
|
||||
String aCertificate = "";
|
||||
String aSubjectRDN = "";
|
||||
|
||||
String aUserID = "";
|
||||
String aRealID = "";
|
||||
String aSerial = "";
|
||||
|
||||
String operatoId = "internet";
|
||||
String corp_code = "0000";
|
||||
|
||||
String ip = "192.168.60.60";
|
||||
int port = 30000;
|
||||
int caType = 2;
|
||||
int caRMPType = 2;
|
||||
XecureCA ca = new XecureCA (aXecureConfig, ip, port, caType, caRMPType);
|
||||
|
||||
SplitSign aSplitSign = new SplitSign(aXecureConfig);
|
||||
String aRequestPlain = request.getParameter("aPlain");
|
||||
byte[] aPlainByte = null;
|
||||
String aSignedData = "";
|
||||
|
||||
String[] aOptions = request.getParameterValues("aOption");
|
||||
int aOption = 0;
|
||||
for (int i = 0; aOptions !=null && i < aOptions.length; i++)
|
||||
{
|
||||
aOption += Integer.parseInt(aOptions[i]);
|
||||
}
|
||||
|
||||
/* 분리 서명 검증 시 */
|
||||
if ((aOption & 0x100) == 0 && (aOption & 0x200) == 0x200 && (aOption & 0x1000) == 0x1000)
|
||||
{
|
||||
aPlainByte = aRequestPlain.getBytes(aCharset);
|
||||
aSignedData = aSplitSign.merge(aResult, aPlainByte);
|
||||
if (aSplitSign.getLastError() != 0)
|
||||
{
|
||||
aErrCode = aSplitSign.getLastError();
|
||||
aErrReason = aSplitSign.getLastErrorMsg();
|
||||
out.println ("분리 서명 데이터 오류<br>");
|
||||
out.println ("Error Code: " + aErrCode + "<br>");
|
||||
out.println ("Error Reason: " + aErrReason + "<br>");
|
||||
return;
|
||||
}
|
||||
|
||||
aResult = aSignedData;
|
||||
}
|
||||
|
||||
if (aResult == null || aResult.equals(""))
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter";
|
||||
}
|
||||
else if (aResult.length() < 10)
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter (short)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aResult.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , aResult, aCharset, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , aResult, aCharset, 1);
|
||||
}
|
||||
|
||||
if (verifier != null && verifier.getLastError() != 0)
|
||||
{
|
||||
aErrCode = verifier.getLastError();
|
||||
aErrReason = verifier.getLastErrorMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
aPlain = verifier.getVerifiedMsg_Text();
|
||||
aCertificate = verifier.getSignerCertificate().getCertPem().replaceAll ("\n", "");
|
||||
aSubjectRDN = verifier.getSignerCertificate().getSubject();
|
||||
aSerial = verifier.getSignerCertificate().getSerial();
|
||||
|
||||
int result = ca.viewCertificateWithRealUserId(operatoId,aSerial,corp_code);
|
||||
if(result ==1){
|
||||
aUserID = (String)ca.getResponseFromCertView("USERID",1);
|
||||
aRealID = (String)ca.getResponseFromCertView("REALID",1);
|
||||
}
|
||||
|
||||
if(aPlain != null) {
|
||||
byte[] buf = verifier.getVerifiedMsg();
|
||||
String tmp = "";
|
||||
|
||||
for (int i = 0; i < buf.length; i++)
|
||||
{
|
||||
tmp = Integer.toHexString(0xFF & buf[i]);
|
||||
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||
aPlainHex += tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<h3>서명값 검증 결과</h3>
|
||||
<ul>
|
||||
<li>오류 코드: <%=aErrCode%>
|
||||
<li>오류 메세지: <%=aErrReason%>
|
||||
<li>서명 원문: <%=aPlain%>
|
||||
<li>서명 원문(Hex): <%=aPlainHex%>
|
||||
<li>User ID: <%=aUserID%>
|
||||
<li>Real ID: <%=aRealID%>
|
||||
<li>서명 인증서 주체: <%=aSubjectRDN%>
|
||||
<li>서명 인증서: <div><textarea cols="100" rows="10"><%=aCertificate%></textarea></div>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
157
src/main/webapp/AnySign4PC/test/sign_result2.jsp
Normal file
157
src/main/webapp/AnySign4PC/test/sign_result2.jsp
Normal file
@ -0,0 +1,157 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("text/html; charset=UTF-8");
|
||||
String aCharset = "UTF-8";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
MultiSignVerifier verifier = null;
|
||||
|
||||
String aResult = request.getParameter("aResult2");
|
||||
int aErrCode = 0;
|
||||
String aErrReason = "";
|
||||
String aPlain = "";
|
||||
String aPlainHex = "";
|
||||
String aCertificate = "";
|
||||
String aSubjectRDN = "";
|
||||
int aSignerNum = 0;
|
||||
|
||||
String aUserID = "";
|
||||
String aRealID = "";
|
||||
String aSerial = "";
|
||||
|
||||
String operatoId = "internet";
|
||||
String corp_code = "0000";
|
||||
|
||||
String ip = "192.168.60.60";
|
||||
int port = 30000;
|
||||
int caType = 2;
|
||||
int caRMPType = 2;
|
||||
XecureCA ca = new XecureCA (aXecureConfig, ip, port, caType, caRMPType);
|
||||
|
||||
SplitSign aSplitSign = new SplitSign(aXecureConfig);
|
||||
String aRequestPlain = request.getParameter("aPlain");
|
||||
byte[] aPlainByte = null;
|
||||
String aSignedData = "";
|
||||
|
||||
String[] aOptions = request.getParameterValues("aOption");
|
||||
int aOption = 0;
|
||||
for (int i = 0; aOptions !=null && i < aOptions.length; i++)
|
||||
{
|
||||
aOption += Integer.parseInt(aOptions[i]);
|
||||
}
|
||||
|
||||
/* 분리 서명 검증 시 */
|
||||
if ((aOption & 0x100) == 0 && (aOption & 0x200) == 0x200 && (aOption & 0x1000) == 0x1000)
|
||||
{
|
||||
aPlainByte = aRequestPlain.getBytes(aCharset);
|
||||
aSignedData = aSplitSign.merge(aResult, aPlainByte);
|
||||
if (aSplitSign.getLastError() != 0)
|
||||
{
|
||||
aErrCode = aSplitSign.getLastError();
|
||||
aErrReason = aSplitSign.getLastErrorMsg();
|
||||
out.println ("분리 서명 데이터 오류<br>");
|
||||
out.println ("Error Code: " + aErrCode + "<br>");
|
||||
out.println ("Error Reason: " + aErrReason + "<br>");
|
||||
return;
|
||||
}
|
||||
|
||||
aResult = aSignedData;
|
||||
}
|
||||
|
||||
if (aResult == null || aResult.equals(""))
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter";
|
||||
}
|
||||
else if (aResult.length() < 10)
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter (short)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aResult.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aResult, aCharset);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aResult, aCharset);
|
||||
}
|
||||
|
||||
if (verifier != null && verifier.getLastError() != 0)
|
||||
{
|
||||
aErrCode = verifier.getLastError();
|
||||
aErrReason = verifier.getLastErrorMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 서명 원문
|
||||
aPlain = verifier.getVerifiedMsg_Text();
|
||||
|
||||
// 서명 원문(Hex)
|
||||
if(aPlain != null) {
|
||||
byte[] buf = verifier.getVerifiedMsg();
|
||||
String tmp = "";
|
||||
for (int i = 0; i < buf.length; i++)
|
||||
{
|
||||
tmp = Integer.toHexString(0xFF & buf[i]);
|
||||
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||
aPlainHex += tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// 서명 인증서
|
||||
aSignerNum = verifier.getNumberOfSigner();
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<h3>서명값 검증 결과</h3>
|
||||
<ul>
|
||||
<li>오류 코드: <%=aErrCode%>
|
||||
<li>오류 메세지: <%=aErrReason%>
|
||||
<li>서명 원문: <%=aPlain%>
|
||||
<li>서명 원문(Hex): <%=aPlainHex%>
|
||||
<li>서명자 수: <%=aSignerNum%>
|
||||
<%
|
||||
for (int i = 0; i < aSignerNum; i++)
|
||||
{
|
||||
aCertificate = verifier.getSignerCertificate(i).getCertPem().replaceAll ("\n", "");
|
||||
aSubjectRDN = verifier.getSignerCertificate(i).getSubject();
|
||||
aSerial = verifier.getSignerCertificate(i).getSerial();
|
||||
|
||||
int result = ca.viewCertificateWithRealUserId(operatoId,aSerial,corp_code);
|
||||
if(result ==1){
|
||||
aUserID = (String)ca.getResponseFromCertView("USERID",1);
|
||||
aRealID = (String)ca.getResponseFromCertView("REALID",1);
|
||||
} else {
|
||||
aUserID = "";
|
||||
aRealID = "";
|
||||
}
|
||||
%>
|
||||
<li>User ID: <%=aUserID%>
|
||||
<li>Real ID: <%=aRealID%>
|
||||
<li>서명 인증서 [<%=i+1%>]: <%=aSubjectRDN%>
|
||||
<div><textarea cols="100" rows="10"><%=aCertificate%></textarea></div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
157
src/main/webapp/AnySign4PC/test/sign_result2_euckr.jsp
Normal file
157
src/main/webapp/AnySign4PC/test/sign_result2_euckr.jsp
Normal file
@ -0,0 +1,157 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=euc-kr" pageEncoding="euc-kr"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
response.setContentType("text/html; charset=euc-kr");
|
||||
String aCharset = "euc-kr";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
MultiSignVerifier verifier = null;
|
||||
|
||||
String aResult = request.getParameter("aResult2");
|
||||
int aErrCode = 0;
|
||||
String aErrReason = "";
|
||||
String aPlain = "";
|
||||
String aPlainHex = "";
|
||||
String aCertificate = "";
|
||||
String aSubjectRDN = "";
|
||||
int aSignerNum = 0;
|
||||
|
||||
String aUserID = "";
|
||||
String aRealID = "";
|
||||
String serial = "";
|
||||
|
||||
String operatoId = "internet";
|
||||
String corp_code = "0000";
|
||||
|
||||
String ip = "192.168.60.60";
|
||||
int port = 30000;
|
||||
int caType = 2;
|
||||
int caRMPType = 2;
|
||||
XecureCA ca = new XecureCA (aXecureConfig, ip, port, caType, caRMPType);
|
||||
|
||||
SplitSign aSplitSign = new SplitSign(aXecureConfig);
|
||||
String aRequestPlain = request.getParameter("aPlain");
|
||||
byte[] aPlainByte = null;
|
||||
String aSignedData = "";
|
||||
|
||||
String[] aOptions = request.getParameterValues("aOption");
|
||||
int aOption = 0;
|
||||
for (int i = 0; aOptions !=null && i < aOptions.length; i++)
|
||||
{
|
||||
aOption += Integer.parseInt(aOptions[i]);
|
||||
}
|
||||
|
||||
/* 분리 서명 검증 시 */
|
||||
if ((aOption & 0x100) == 0 && (aOption & 0x200) == 0x200 && (aOption & 0x1000) == 0x1000)
|
||||
{
|
||||
aPlainByte = aRequestPlain.getBytes(aCharset);
|
||||
aSignedData = aSplitSign.merge(aResult, aPlainByte);
|
||||
if (aSplitSign.getLastError() != 0)
|
||||
{
|
||||
aErrCode = aSplitSign.getLastError();
|
||||
aErrReason = aSplitSign.getLastErrorMsg();
|
||||
out.println ("분리 서명 데이터 오류<br>");
|
||||
out.println ("Error Code: " + aErrCode + "<br>");
|
||||
out.println ("Error Reason: " + aErrReason + "<br>");
|
||||
return;
|
||||
}
|
||||
|
||||
aResult = aSignedData;
|
||||
}
|
||||
|
||||
if (aResult == null || aResult.equals(""))
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter";
|
||||
}
|
||||
else if (aResult.length() < 10)
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter (short)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aResult.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aResult, aCharset);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aResult, aCharset);
|
||||
}
|
||||
|
||||
if (verifier != null && verifier.getLastError() != 0)
|
||||
{
|
||||
aErrCode = verifier.getLastError();
|
||||
aErrReason = verifier.getLastErrorMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 서명 원문
|
||||
aPlain = verifier.getVerifiedMsg_Text();
|
||||
|
||||
// 서명 원문(Hex)
|
||||
if(aPlain != null) {
|
||||
byte[] buf = verifier.getVerifiedMsg();
|
||||
String tmp = "";
|
||||
for (int i = 0; i < buf.length; i++)
|
||||
{
|
||||
tmp = Integer.toHexString(0xFF & buf[i]);
|
||||
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||
aPlainHex += tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// 서명 인증서
|
||||
aSignerNum = verifier.getNumberOfSigner();
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<h3>서명값 검증 결과</h3>
|
||||
<ul>
|
||||
<li>오류 코드: <%=aErrCode%>
|
||||
<li>오류 메세지: <%=aErrReason%>
|
||||
<li>서명 원문: <%=aPlain%>
|
||||
<li>서명 원문(Hex): <%=aPlainHex%>
|
||||
<li>서명자 수: <%=aSignerNum%>
|
||||
<%
|
||||
for (int i = 0; i < aSignerNum; i++)
|
||||
{
|
||||
aCertificate = verifier.getSignerCertificate(i).getCertPem().replaceAll ("\n", "");
|
||||
aSubjectRDN = verifier.getSignerCertificate(i).getSubject();
|
||||
aSerial = verifier.getSignerCertificate(i).getSerial();
|
||||
|
||||
int result = ca.viewCertificateWithRealUserId(operatoId,aSerial,corp_code);
|
||||
if(result ==1){
|
||||
aUserID = (String)ca.getResponseFromCertView("USERID",1);
|
||||
aRealID = (String)ca.getResponseFromCertView("REALID",1);
|
||||
} else {
|
||||
aUserID = "";
|
||||
aRealID = "";
|
||||
}
|
||||
%>
|
||||
<li>User ID: <%=aUserID%>
|
||||
<li>Real ID: <%=aRealID%>
|
||||
<li>서명 인증서 [<%=i+1%>]: <%=aSubjectRDN%>
|
||||
<div><textarea cols="100" rows="10"><%=aCertificate%></textarea></div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
208
src/main/webapp/AnySign4PC/test/sign_result3.jsp
Normal file
208
src/main/webapp/AnySign4PC/test/sign_result3.jsp
Normal file
@ -0,0 +1,208 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("text/html; charset=utf-8");
|
||||
String aCharset = "UTF-8";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
MultiSignVerifier verifier = null;
|
||||
|
||||
String aSignedMsg1 = request.getParameter("aResult");
|
||||
String aSignedMsg2 = request.getParameter("aResult2");
|
||||
String aSignedMsg = request.getParameter("aSignedMsg");
|
||||
int aErrCode = 0;
|
||||
String aErrReason = "";
|
||||
String aPlain = "";
|
||||
String aPlainHex = "";
|
||||
String aCertificate = "";
|
||||
String aSubjectRDN = "";
|
||||
int aSignerNum = 0;
|
||||
|
||||
if (aSignedMsg1 != null && aSignedMsg1.length() > 0)
|
||||
{
|
||||
aSignedMsg = aSignedMsg1;
|
||||
}
|
||||
else if (aSignedMsg2 != null && aSignedMsg2.length() > 0)
|
||||
{
|
||||
aSignedMsg = aSignedMsg2;
|
||||
}
|
||||
|
||||
SplitSign aSplitSign = new SplitSign(aXecureConfig);
|
||||
String aRequestPlain = request.getParameter("aPlain");
|
||||
byte[] aPlainByte = null;
|
||||
String aSignedData = "";
|
||||
|
||||
String[] aOptions = request.getParameterValues("aOption");
|
||||
int aOption = 0;
|
||||
for (int i = 0; aOptions !=null && i < aOptions.length; i++)
|
||||
{
|
||||
aOption += Integer.parseInt(aOptions[i]);
|
||||
}
|
||||
|
||||
/* 분리 서명 검증 시 */
|
||||
if ((aOption & 0x100) == 0 && (aOption & 0x200) == 0x200 && (aOption & 0x1000) == 0x1000)
|
||||
{
|
||||
aPlainByte = aRequestPlain.getBytes(aCharset);
|
||||
aSignedData = aSplitSign.merge(aSignedMsg, aPlainByte);
|
||||
if (aSplitSign.getLastError() != 0)
|
||||
{
|
||||
aErrCode = aSplitSign.getLastError();
|
||||
aErrReason = aSplitSign.getLastErrorMsg();
|
||||
out.println ("분리 서명 데이터 오류<br>");
|
||||
out.println ("Error Code: " + aErrCode + "<br>");
|
||||
out.println ("Error Reason: " + aErrReason + "<br>");
|
||||
return;
|
||||
}
|
||||
|
||||
aSignedMsg = aSignedData;
|
||||
}
|
||||
|
||||
if (aSignedMsg == null || aSignedMsg.equals(""))
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter";
|
||||
}
|
||||
else if (aSignedMsg.length() < 10)
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter (short)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aSignedMsg.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aSignedMsg, aCharset);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aSignedMsg, aCharset);
|
||||
}
|
||||
|
||||
if (verifier != null && verifier.getLastError() != 0)
|
||||
{
|
||||
aErrCode = verifier.getLastError();
|
||||
aErrReason = verifier.getLastErrorMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 서명 원문
|
||||
aPlain = verifier.getVerifiedMsg_Text();
|
||||
|
||||
// 서명 원문(Hex)
|
||||
if(aPlain != null) {
|
||||
byte[] buf = verifier.getVerifiedMsg();
|
||||
String tmp = "";
|
||||
for (int i = 0; i < buf.length; i++)
|
||||
{
|
||||
tmp = Integer.toHexString(0xFF & buf[i]);
|
||||
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||
aPlainHex += tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// 서명 인증서
|
||||
aSignerNum = verifier.getNumberOfSigner();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 식별번호 검증 */
|
||||
VidVerifier vid = null;
|
||||
|
||||
String aVidMsg = request.getParameter("aVidMsg");
|
||||
String aServerIdn = request.getParameter("aServerIdn");
|
||||
int aIsVid = 0;
|
||||
int aVidErrCode = 0;
|
||||
String aVidErrReason = "";
|
||||
int aVidCertNum = 0;
|
||||
String aVidCertSubjectRDN = "";
|
||||
String aIdn = "";
|
||||
String aRealName = "";
|
||||
|
||||
if (aVidMsg != null && aVidMsg.length() > 0 && aSignerNum > 0)
|
||||
{
|
||||
aIsVid = 1;
|
||||
vid = new VidVerifier(aXecureConfig);
|
||||
|
||||
for (int i = 0; i < aSignerNum; i++)
|
||||
{
|
||||
if (aServerIdn != null && aServerIdn.length() > 0)
|
||||
{
|
||||
// 서버측에서 식별번호 입력 시 사용
|
||||
vid.virtualIDVerifyS(aVidMsg, verifier.getSignerCertificate(i).getCertPem(), aServerIdn);
|
||||
aIdn = "(서버에서 입력)";
|
||||
}
|
||||
else
|
||||
{
|
||||
vid.virtualIDVerifyS(aVidMsg, verifier.getSignerCertificate(i).getCertPem());
|
||||
}
|
||||
|
||||
if (vid != null && vid.getLastError() == 0)
|
||||
{
|
||||
aVidCertNum = i;
|
||||
aVidCertSubjectRDN = verifier.getSignerCertificate(i).getSubject();
|
||||
aIdn += vid.getIdn();
|
||||
aRealName = vid.getRealName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (vid != null && vid.getLastError() != 0)
|
||||
{
|
||||
aVidErrCode = vid.getLastError();
|
||||
aVidErrReason = vid.getLastErrorMsg();
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<h3>서명값 검증 결과</h3>
|
||||
<ul>
|
||||
<li>서명값: <div><textarea cols="100" rows="10"><%=aSignedMsg%></textarea></div>
|
||||
<li>오류 코드: <%=aErrCode%>
|
||||
<li>오류 메세지: <%=aErrReason%>
|
||||
<li>서명 원문: <%=aPlain%>
|
||||
<li>서명 원문(Hex): <%=aPlainHex%>
|
||||
<li>서명자 수: <%=aSignerNum%>
|
||||
<%
|
||||
for (int i = 0; i < aSignerNum; i++)
|
||||
{
|
||||
aCertificate = verifier.getSignerCertificate(i).getCertPem().replaceAll ("\n", "");
|
||||
aSubjectRDN = verifier.getSignerCertificate(i).getSubject();
|
||||
%>
|
||||
<li>서명 인증서 [<%=i+1%>]: <%=aSubjectRDN%>
|
||||
<div><textarea cols="100" rows="10"><%=aCertificate%></textarea></div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
<%
|
||||
if (aIsVid == 1) {
|
||||
%>
|
||||
<h3>식별번호 검증 결과</h3>
|
||||
<ul>
|
||||
<li>암호화된 VID: <div><textarea cols="100" rows="10"><%=aVidMsg%></textarea></div>
|
||||
<li>오류 코드: <%=aVidErrCode%>
|
||||
<li>오류 메세지: <%=aVidErrReason%>
|
||||
<li>인증서 [<%=aVidCertNum+1%>]: <%=aVidCertSubjectRDN%>
|
||||
<li>주민등록번호(사업자 등록번호): <%=aIdn%>
|
||||
<li>사용자 실명: <%=aRealName%>
|
||||
</ul>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
||||
208
src/main/webapp/AnySign4PC/test/sign_result3_euckr.jsp
Normal file
208
src/main/webapp/AnySign4PC/test/sign_result3_euckr.jsp
Normal file
@ -0,0 +1,208 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=euc-kr" pageEncoding="euc-kr"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
response.setContentType("text/html; charset=euc-kr");
|
||||
String aCharset = "euc-kr";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
MultiSignVerifier verifier = null;
|
||||
|
||||
String aSignedMsg1 = request.getParameter("aResult");
|
||||
String aSignedMsg2 = request.getParameter("aResult2");
|
||||
String aSignedMsg = request.getParameter("aSignedMsg");
|
||||
int aErrCode = 0;
|
||||
String aErrReason = "";
|
||||
String aPlain = "";
|
||||
String aPlainHex = "";
|
||||
String aCertificate = "";
|
||||
String aSubjectRDN = "";
|
||||
int aSignerNum = 0;
|
||||
|
||||
if (aSignedMsg1 != null && aSignedMsg1.length() > 0)
|
||||
{
|
||||
aSignedMsg = aSignedMsg1;
|
||||
}
|
||||
else if (aSignedMsg2 != null && aSignedMsg2.length() > 0)
|
||||
{
|
||||
aSignedMsg = aSignedMsg2;
|
||||
}
|
||||
|
||||
SplitSign aSplitSign = new SplitSign(aXecureConfig);
|
||||
String aRequestPlain = request.getParameter("aPlain");
|
||||
byte[] aPlainByte = null;
|
||||
String aSignedData = "";
|
||||
|
||||
String[] aOptions = request.getParameterValues("aOption");
|
||||
int aOption = 0;
|
||||
for (int i = 0; aOptions !=null && i < aOptions.length; i++)
|
||||
{
|
||||
aOption += Integer.parseInt(aOptions[i]);
|
||||
}
|
||||
|
||||
/* 분리 서명 검증 시 */
|
||||
if ((aOption & 0x100) == 0 && (aOption & 0x200) == 0x200 && (aOption & 0x1000) == 0x1000)
|
||||
{
|
||||
aPlainByte = aRequestPlain.getBytes(aCharset);
|
||||
aSignedData = aSplitSign.merge(aSignedMsg, aPlainByte);
|
||||
if (aSplitSign.getLastError() != 0)
|
||||
{
|
||||
aErrCode = aSplitSign.getLastError();
|
||||
aErrReason = aSplitSign.getLastErrorMsg();
|
||||
out.println ("분리 서명 데이터 오류<br>");
|
||||
out.println ("Error Code: " + aErrCode + "<br>");
|
||||
out.println ("Error Reason: " + aErrReason + "<br>");
|
||||
return;
|
||||
}
|
||||
|
||||
aSignedMsg = aSignedData;
|
||||
}
|
||||
|
||||
if (aSignedMsg == null || aSignedMsg.equals(""))
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter";
|
||||
}
|
||||
else if (aSignedMsg.length() < 10)
|
||||
{
|
||||
aErrCode = -1;
|
||||
aErrReason = "invalid parameter (short)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aSignedMsg.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aSignedMsg, aCharset);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new MultiSignVerifier (aXecureConfig , aSignedMsg, aCharset);
|
||||
}
|
||||
|
||||
if (verifier != null && verifier.getLastError() != 0)
|
||||
{
|
||||
aErrCode = verifier.getLastError();
|
||||
aErrReason = verifier.getLastErrorMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 서명 원문
|
||||
aPlain = verifier.getVerifiedMsg_Text();
|
||||
|
||||
// 서명 원문(Hex)
|
||||
if(aPlain != null) {
|
||||
byte[] buf = verifier.getVerifiedMsg();
|
||||
String tmp = "";
|
||||
for (int i = 0; i < buf.length; i++)
|
||||
{
|
||||
tmp = Integer.toHexString(0xFF & buf[i]);
|
||||
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||
aPlainHex += tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// 서명 인증서
|
||||
aSignerNum = verifier.getNumberOfSigner();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 식별번호 검증 */
|
||||
VidVerifier vid = null;
|
||||
|
||||
String aVidMsg = request.getParameter("aVidMsg");
|
||||
String aServerIdn = request.getParameter("aServerIdn");
|
||||
int aIsVid = 0;
|
||||
int aVidErrCode = 0;
|
||||
String aVidErrReason = "";
|
||||
int aVidCertNum = 0;
|
||||
String aVidCertSubjectRDN = "";
|
||||
String aIdn = "";
|
||||
String aRealName = "";
|
||||
|
||||
if (aVidMsg != null && aVidMsg.length() > 0 && aSignerNum > 0)
|
||||
{
|
||||
aIsVid = 1;
|
||||
vid = new VidVerifier(aXecureConfig);
|
||||
|
||||
for (int i = 0; i < aSignerNum; i++)
|
||||
{
|
||||
if (aServerIdn != null && aServerIdn.length() > 0)
|
||||
{
|
||||
// 서버측에서 식별번호 입력 시 사용
|
||||
vid.virtualIDVerifyS(aVidMsg, verifier.getSignerCertificate(i).getCertPem(), aServerIdn);
|
||||
aIdn = "(서버에서 입력)";
|
||||
}
|
||||
else
|
||||
{
|
||||
vid.virtualIDVerifyS(aVidMsg, verifier.getSignerCertificate(i).getCertPem());
|
||||
}
|
||||
|
||||
if (vid != null && vid.getLastError() == 0)
|
||||
{
|
||||
aVidCertNum = i;
|
||||
aVidCertSubjectRDN = verifier.getSignerCertificate(i).getSubject();
|
||||
aIdn += vid.getIdn();
|
||||
aRealName = vid.getRealName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (vid != null && vid.getLastError() != 0)
|
||||
{
|
||||
aVidErrCode = vid.getLastError();
|
||||
aVidErrReason = vid.getLastErrorMsg();
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<h3>서명값 검증 결과</h3>
|
||||
<ul>
|
||||
<li>서명값: <div><textarea cols="100" rows="10"><%=aSignedMsg%></textarea></div>
|
||||
<li>오류 코드: <%=aErrCode%>
|
||||
<li>오류 메세지: <%=aErrReason%>
|
||||
<li>서명 원문: <%=aPlain%>
|
||||
<li>서명 원문(Hex): <%=aPlainHex%>
|
||||
<li>서명자 수: <%=aSignerNum%>
|
||||
<%
|
||||
for (int i = 0; i < aSignerNum; i++)
|
||||
{
|
||||
aCertificate = verifier.getSignerCertificate(i).getCertPem().replaceAll ("\n", "");
|
||||
aSubjectRDN = verifier.getSignerCertificate(i).getSubject();
|
||||
%>
|
||||
<li>서명 인증서 [<%=i+1%>]: <%=aSubjectRDN%>
|
||||
<div><textarea cols="100" rows="10"><%=aCertificate%></textarea></div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
<%
|
||||
if (aIsVid == 1) {
|
||||
%>
|
||||
<h3>식별번호 검증 결과</h3>
|
||||
<ul>
|
||||
<li>암호화된 VID: <div><textarea cols="100" rows="10"><%=aVidMsg%></textarea></div>
|
||||
<li>오류 코드: <%=aVidErrCode%>
|
||||
<li>오류 메세지: <%=aVidErrReason%>
|
||||
<li>인증서 [<%=aVidCertNum+1%>]: <%=aVidCertSubjectRDN%>
|
||||
<li>주민등록번호(사업자 등록번호): <%=aIdn%>
|
||||
<li>사용자 실명: <%=aRealName%>
|
||||
</ul>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
||||
58
src/main/webapp/AnySign4PC/test/sign_result4.jsp
Normal file
58
src/main/webapp/AnySign4PC/test/sign_result4.jsp
Normal file
@ -0,0 +1,58 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("text/html; charset=utf-8");
|
||||
String aCharset = "UTF-8";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
MultiSignVerifier verifier = null;
|
||||
|
||||
StringBuffer aResponse = new StringBuffer ();
|
||||
%>
|
||||
|
||||
<%
|
||||
String sm = request.getParameter("SIGNED");
|
||||
String vm = request.getParameter("VID");
|
||||
|
||||
verifier = new MultiSignVerifier (aXecureConfig , sm, aCharset);
|
||||
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + verifier.getLastError () + "\",");
|
||||
aResponse.append ("reason:\"" + verifier.getLastErrorMsg () + "\",");
|
||||
|
||||
if (verifier.getLastError() == 0)
|
||||
{
|
||||
aResponse.append ("plain:\"" + verifier.getVerifiedMsg_Text () + "\",");
|
||||
aResponse.append ("certificatePEM:\"" + verifier.getSignerCertificate(0).getCertPem ().replaceAll ("\n", "") + "\",");
|
||||
aResponse.append ("subjectRDN:\"" + verifier.getSignerCertificate(0).getSubject () + "\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (vm != null)
|
||||
{
|
||||
|
||||
VidVerifier vid = new VidVerifier (aXecureConfig);
|
||||
|
||||
vid.virtualIDVerifyS(vm, verifier.getSignerCertificate(0).getCertPem());
|
||||
|
||||
aResponse.append ("vidCode:\"" + vid.getLastError () + "\",");
|
||||
aResponse.append ("vidReason:\"" + vid.getLastErrorMsg () + "\",");
|
||||
|
||||
if( vid.getLastError () == 0) {
|
||||
aResponse.append ("vidIDNumber:\"" + vid.getIdn () + "\",");
|
||||
aResponse.append ("vidRealName:\"" + vid.getRealName () + "\",");
|
||||
}
|
||||
}
|
||||
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
%>
|
||||
58
src/main/webapp/AnySign4PC/test/sign_result4_euckr.jsp
Normal file
58
src/main/webapp/AnySign4PC/test/sign_result4_euckr.jsp
Normal file
@ -0,0 +1,58 @@
|
||||
<%@ page contentType="text/html; charset=euc-kr" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
//out.println(java.nio.charset.Charset.defaultCharset().name());
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
response.setContentType("text/html; charset=euc-kr");
|
||||
String aCharset = "euc-kr";
|
||||
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
MultiSignVerifier verifier = null;
|
||||
|
||||
StringBuffer aResponse = new StringBuffer ();
|
||||
%>
|
||||
|
||||
<%
|
||||
String sm = request.getParameter("SIGNED");
|
||||
String vm = request.getParameter("VID");
|
||||
|
||||
verifier = new MultiSignVerifier (aXecureConfig , sm, aCharset);
|
||||
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + verifier.getLastError () + "\",");
|
||||
aResponse.append ("reason:\"" + verifier.getLastErrorMsg () + "\",");
|
||||
|
||||
if (verifier.getLastError() == 0)
|
||||
{
|
||||
aResponse.append ("plain:\"" + verifier.getVerifiedMsg_Text () + "\",");
|
||||
aResponse.append ("certificatePEM:\"" + verifier.getSignerCertificate(0).getCertPem ().replaceAll ("\n", "") + "\",");
|
||||
aResponse.append ("subjectRDN:\"" + verifier.getSignerCertificate(0).getSubject () + "\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (vm != null)
|
||||
{
|
||||
|
||||
VidVerifier vid = new VidVerifier (aXecureConfig);
|
||||
|
||||
vid.virtualIDVerifyS(vm, verifier.getSignerCertificate(0).getCertPem());
|
||||
|
||||
aResponse.append ("vidCode:\"" + vid.getLastError () + "\",");
|
||||
aResponse.append ("vidReason:\"" + vid.getLastErrorMsg () + "\",");
|
||||
|
||||
if( vid.getLastError () == 0) {
|
||||
aResponse.append ("vidIDNumber:\"" + vid.getIdn () + "\",");
|
||||
aResponse.append ("vidRealName:\"" + vid.getRealName () + "\",");
|
||||
}
|
||||
}
|
||||
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
%>
|
||||
64
src/main/webapp/AnySign4PC/test/sign_result_euckr.jsp
Normal file
64
src/main/webapp/AnySign4PC/test/sign_result_euckr.jsp
Normal file
@ -0,0 +1,64 @@
|
||||
<%@ page contentType="text/html; charset=euc-kr" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
XecureConfig aXecureConfig = new XecureConfig ();
|
||||
SignVerifier verifier = null;
|
||||
|
||||
StringBuffer aResponse = new StringBuffer ();
|
||||
%>
|
||||
|
||||
<%
|
||||
String sm = request.getParameter("SIGNED");
|
||||
String vm = request.getParameter("VID");
|
||||
|
||||
if (sm != null && sm.substring(0, 4).equalsIgnoreCase("3082"))
|
||||
{
|
||||
/* Hex encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , sm, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Base64 encoded Data */
|
||||
verifier = new SignVerifier (aXecureConfig , sm, 1);
|
||||
System.out.println ("base64:" + sm);
|
||||
}
|
||||
|
||||
aResponse.append ("({");
|
||||
aResponse.append ("code:\"" + verifier.getLastError () + "\",");
|
||||
aResponse.append ("reason:\"" + verifier.getLastErrorMsg () + "\",");
|
||||
|
||||
if (verifier.getLastError() == 0)
|
||||
{
|
||||
aResponse.append ("plain:\"" + verifier.getVerifiedMsg_Text () + "\",");
|
||||
aResponse.append ("certificatePEM:\"" + verifier.getSignerCertificate().getCertPem ().replaceAll ("\n", "") + "\",");
|
||||
aResponse.append ("subjectRDN:\"" + verifier.getSignerCertificate().getSubject () + "\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (vm != null)
|
||||
{
|
||||
|
||||
VidVerifier vid = new VidVerifier (aXecureConfig);
|
||||
|
||||
vid.virtualIDVerifyS(vm, verifier.getSignerCertificate().getCertPem());
|
||||
|
||||
aResponse.append ("vidCode:\"" + vid.getLastError () + "\",");
|
||||
aResponse.append ("vidReason:\"" + vid.getLastErrorMsg () + "\",");
|
||||
|
||||
if( vid.getLastError () == 0) {
|
||||
aResponse.append ("vidIDNumber:\"" + vid.getIdn () + "\",");
|
||||
aResponse.append ("vidRealName:\"" + vid.getRealName () + "\",");
|
||||
}
|
||||
}
|
||||
|
||||
aResponse.append ("base:\"\"");
|
||||
aResponse.append ("})");
|
||||
out.println (aResponse.toString ());
|
||||
%>
|
||||
|
||||
297
src/main/webapp/AnySign4PC/test/sign_vid_result.jsp
Normal file
297
src/main/webapp/AnySign4PC/test/sign_vid_result.jsp
Normal file
@ -0,0 +1,297 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
request.setCharacterEncoding("utf-8");
|
||||
XecureConfig aXecureConfig = new XecureConfig (System.getProperty("user.home") + "/XecureConf/xecure_servlet.conf");
|
||||
SignVerifier verifier = new SignVerifier (aXecureConfig, request.getParameter("aSignedMsg"), "utf-8");
|
||||
%>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<title>서명 검증 결과</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.font1 { font-size: 9pt;color:#666666;}
|
||||
td { font-size: 9pt;color:#333333}
|
||||
A:link {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:active {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:visited {font-size:9pt;color:#010824;text-decoration:none; }
|
||||
A:hover {font-size:9pt;color:#0066cc;text-decoration:none; }
|
||||
-->
|
||||
</style>
|
||||
<script language='javascript' src='/XecureObject/xecureweb.js'></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<table width="106" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="91"><img src="../img/img_main_web05.gif" width="91" height="110"></td>
|
||||
<td width="14"> </td>
|
||||
<td width="1"><img src="../img/dot_gray01.gif" width="1" height="100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="91"> </td>
|
||||
<td width="11"> </td>
|
||||
<td width="1"><img src="../img/line_gray.gif" width="1" height="129"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" width="845">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="30"></td>
|
||||
<td height="34"><img src="../img/img_main_web04.gif" width="240" height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><img src="../img/dot_gray01.gif" width="100%" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<table width="25%" height=20 border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<div align="center"></div>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<!--
|
||||
<div align="center"><a href="sign_client.html">이전메뉴</a></div>
|
||||
-->
|
||||
<div align="center"><a href='javascript:history.back()'>이전메뉴</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="85%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100" width="8%"> </td>
|
||||
<td height="120" valign="middle">
|
||||
<p align="center"><font size="5" face="Times New Roman, Times, serif">WebBrowser로부터 입력받은 결과입니다.</font></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#FFFFFF">
|
||||
<td colspan="3" height="24" bgcolor="#FFFFFF">
|
||||
|
||||
<!---BEGIN_ENC--->
|
||||
<table border='1' width='100%'>
|
||||
<tr>
|
||||
<td width='17%'><strong>Decrypted Request 'aPlain' :</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%=request.getParameter("aPlain") %>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='17%'><strong>Decrypted Request 'aSignedMsg' :</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%
|
||||
|
||||
String sm = request.getParameter("aSignedMsg");
|
||||
int i;
|
||||
for ( i = 0; i < sm.length(); i+=80 ) {
|
||||
if ( i + 80 < sm.length() )
|
||||
out.println ( sm.substring( i, i+80 ) );
|
||||
else
|
||||
out.println ( sm.substring( i, sm.length() ));
|
||||
}
|
||||
%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='17%'><strong> 'aVidMsg' :</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%
|
||||
|
||||
String vm = request.getParameter("aVidMsg");
|
||||
//out.println(vm);
|
||||
|
||||
for ( i = 0; i < vm.length(); i+=80 ) {
|
||||
if ( i + 80 < vm.length() )
|
||||
out.println ( vm.substring( i, i+80 ) );
|
||||
else
|
||||
out.println ( vm.substring( i, vm.length() ));
|
||||
}
|
||||
|
||||
%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='17%'><strong>서명 검증 결과</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<%
|
||||
int nVerifierResult = verifier.getLastError();
|
||||
if ( nVerifierResult != 0 ) {
|
||||
out.println("서명문에 문제가 있습니다.<br>");
|
||||
out.println("오류 번호 : " + verifier.getLastError() + "<br>");
|
||||
}
|
||||
else {
|
||||
out.println("서명 확인 성공<br>");
|
||||
}
|
||||
%>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<%
|
||||
if ( nVerifierResult == 0 ) {
|
||||
%>
|
||||
<tr>
|
||||
<td width='17%'><strong>서명 메시지 원본</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%=verifier.getVerifiedMsg_Text()%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='17%'><strong>서명자 인증서</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%=verifier.getSignerCertificate().getCertPem()%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='17%'><strong>서명자 인증서 DN</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
1 <%=verifier.getSignerCertificate().getSubject()%>
|
||||
2 <%=verifier.getSignerCertificate().getSubject("cn")%>
|
||||
3 <%=verifier.getSignerCertificate().getIssuer("cn")%>
|
||||
4 <%=verifier.getSignerCertificate().getIssuer("o")%>
|
||||
5 <%=verifier.getSignerCertificate().getIssuer("ou")%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td width='17%'><strong>오류메세지</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%=verifier.getLastErrorMsg()%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td width='17%'><strong>식별번호검증결과</strong></td>
|
||||
<td width='83%'><strong>
|
||||
<pre>
|
||||
<%
|
||||
VidVerifier vid = new VidVerifier (aXecureConfig);
|
||||
|
||||
vid.virtualIDVerifyS(vm, verifier.getSignerCertificate().getCertPem());
|
||||
//vid.virtualIDVerifyS(vm, "0");
|
||||
|
||||
int nResult = vid.getLastError();
|
||||
if( nResult != 0) {
|
||||
out.println("식별번호 검증에 문제가 있습니다.<br>");
|
||||
out.println("오류번호 : " + vid.getLastError() + "<br>");
|
||||
out.println("오류메세지: " + vid.getLastErrorMsg() + "<br>");
|
||||
|
||||
}
|
||||
else {
|
||||
out.println("식별번호 검증 성공<br>");
|
||||
out.println("주민등록번호(사업자 등록번호) : " + vid.getIdn() + "<br>");
|
||||
out.println("사용자 실명 : " + vid.getRealName() + "<br>");
|
||||
}
|
||||
|
||||
%>
|
||||
</pre>
|
||||
</strong></td>
|
||||
|
||||
</table>
|
||||
<!---END_ENC--->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td valign="top" width="2%"> </td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td width="2%" height="24" bgcolor="#DEDBCB"> </td>
|
||||
<td height="24" bgcolor="#DEDBCB"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td width="2%"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="40"> </td>
|
||||
<td height="40"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24" bgcolor="#345B87">
|
||||
<div align="right"><font color="#FFFFFF"><b><font color="#CED2DB"><a href="http://www.softforum.com"><font color="#FFFFFF">www.softforum.com</font></a></font></b></font></div>
|
||||
</td>
|
||||
<td height="24" bgcolor="#345B87" width="3%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
357
src/main/webapp/AnySign4PC/test/sign_with_vid.jsp
Normal file
357
src/main/webapp/AnySign4PC/test/sign_with_vid.jsp
Normal file
@ -0,0 +1,357 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page buffer="16kb"%>
|
||||
<%@ page import="xecure.servlet.*"%>
|
||||
<%@ page import="xecure.crypto.*"%>
|
||||
<%@ page import="java.io.*"%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
form {margin:0px 0px 0px 0px;}
|
||||
input { border:1px solid #d3d3d3; margin:2px; padding:1px;}
|
||||
input.largebtn { width: 500px; }
|
||||
input.mediumbtn { width: 300px; }
|
||||
input.smallbtn { width: 150px; }
|
||||
h1, h2, h3, h4 { margin:0;}
|
||||
h3 { font-size:13pt; background-color:#EEE;}
|
||||
.test {border:1px dashed gray;}
|
||||
.test td {font-size: 9pt;color: #333333;background: #EEEEEE;text-align: center;}
|
||||
.inputtext {width: 100%;}
|
||||
.inputbutton {width: 100%;height: 100%;}
|
||||
.inputcheck {width: 14px;height: 14px;}
|
||||
-->
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../XecureWeb/css/common.css" />
|
||||
<script type="text/javascript" src="../xecureweb_up.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../touchen/TouchEnKey.js"></script>
|
||||
<script type="text/javascript" src="../transkey/BigInt.js"></script>
|
||||
<script type="text/javascript" src="../transkey/Barrett.js"></script>
|
||||
<script type="text/javascript" src="../transkey/RSA.js"></script>
|
||||
<script type="text/javascript" src="../transkey/wz_jsgraphics.js"></script>
|
||||
<script type="text/javascript" src="../transkey/transkey_XC.js"></script>
|
||||
<script type="text/javascript" src="../transkey/seed.js"></script>
|
||||
<script type="text/javascript" src="../transkey/genkey.js"></script>
|
||||
|
||||
<script>
|
||||
var s = '';
|
||||
s += '-----BEGIN CERTIFICATE-----\n';
|
||||
s += 'MIIDGTCCAoKgAwIBAgIEBo53lTANBgkqhkiG9w0BAQQFADBhMQswCQYDVQQGEwJL\n';
|
||||
s += 'UjELMAkGA1UECBMCYWExCzAJBgNVBAcTAmFhMQswCQYDVQQKEwJhYTELMAkGA1UE\n';
|
||||
s += 'CxMCYWExCzAJBgNVBAMTAmFhMREwDwYJKoZIhvcNAQkBFgJhYTAeFw0wMTA3MTgw\n';
|
||||
s += 'MDAwMDBaFw0wNjA3MTcwNDE4MDBaMGcxCzAJBgNVBAYTAktSMQwwCgYDVQQIEwNp\n';
|
||||
s += 'aWkxDDAKBgNVBAcTA2lpaTEMMAoGA1UEChMDaWlpMQwwCgYDVQQLEwNpaWkxDDAK\n';
|
||||
s += 'BgNVBAMTA2lpaTESMBAGCSqGSIb3DQEJARYDaWlpMIGfMA0GCSqGSIb3DQEBAQUA\n';
|
||||
s += 'A4GNADCBiQKBgQCzSWuMplCOF2v/RGL6xENjTH5SFMXKlcJbnebTm1ZuENjc5KHo\n';
|
||||
s += 'fW6t89qkHznyHlllWwVSv8bNm5u6TK5fNFY4RC95cU8jqAVK0oFRLRjkDAfoMVV1\n';
|
||||
s += 'fD5eoXmN6fyZWtLgiHXQ9evISBP62UkT5KjQ86dDKo2Dg53XFVyKI+ksAwIDAQAB\n';
|
||||
s += 'o4HXMIHUMGoGCWCGSAGG+EIBDQRdFltZb3VyIENlcnRpZmljYXRlIGlzIGR1ZSB1\n';
|
||||
s += 'cHRvIDEgeWVhci4gWW91IGhhdmUgdG8gcmVpc3N1ZSB5b3VyIGNlcnRpZmljYXRl\n';
|
||||
s += 'IGJlZm9yZSBpdCBleHBpcmVzMCIGCWCGSAGG+EIBAgQVFhN3d3cuc29mdGZvcnVt\n';
|
||||
s += 'LmNvLmtyMBEGCWCGSAGG+EIBAQQEAwIAgDAvBglghkgBhvhCAgUEIhYgZDQxZDhj\n';
|
||||
s += 'ZDk4ZjAwYjIwNGU5ODAwOTk4ZWNmODQyN2UwDQYJKoZIhvcNAQEEBQADgYEAPeWZ\n';
|
||||
s += 'SPTLWtdsNNrztq//3agTQImdn2Yrds5Rhf1Y2FZ+sXdZvPLBy3+p1eh4zy0IVyjm\n';
|
||||
s += 'AioAO9U//TuZfeHlOs6ffsBc87D3BaBH0CUdQxaPy99AtUrVnGxNjJ3QjSesiPxf\n';
|
||||
s += 'kcIPWgTrDozCmSKh0lr8MKzB0PpML7gpLkE6ZNQ=\n';
|
||||
s += '-----END CERTIFICATE-----\n';
|
||||
s += '';
|
||||
|
||||
PrintObjectTag ();
|
||||
XecureWeb.mDivInsertOption = false;
|
||||
var useTranskey = false;
|
||||
</script>
|
||||
<script>
|
||||
function sumCheckbox (aCheckbox)
|
||||
{
|
||||
var aIter;
|
||||
var aTotal = 0;
|
||||
|
||||
for (aIter = 0;aIter < aCheckbox.length;aIter++)
|
||||
{
|
||||
if (aCheckbox[aIter].checked)
|
||||
aTotal += parseInt (aCheckbox[aIter].value);
|
||||
}
|
||||
|
||||
return aTotal;
|
||||
}
|
||||
function initForm ()
|
||||
{
|
||||
// form_SignDataWithVID
|
||||
document.getElementById ("form_SignDataWithVID").aXgateAddress.value = XecureWeb.mXgateAddress;
|
||||
document.getElementById ("form_SignDataWithVID").aCAList.value = XecureWeb.mCAList;
|
||||
document.getElementById ("form_SignDataWithVID").aPlain.value = "이 내용이 전자서명됩니다.";
|
||||
document.getElementById ("form_SignDataWithVID").aLimitPassword.value = XecureWeb.mLimitPassword;
|
||||
|
||||
// form_SignDataWithVID_Serial
|
||||
document.getElementById ("form_SignDataWithVID_Serial").aXgateAddress.value = XecureWeb.mXgateAddress;
|
||||
document.getElementById ("form_SignDataWithVID_Serial").aCAList.value = XecureWeb.mCAList;
|
||||
document.getElementById ("form_SignDataWithVID_Serial").aPlain.value = "이 내용이 전자서명됩니다.";
|
||||
document.getElementById ("form_SignDataWithVID_Serial").aLimitPassword.value = XecureWeb.mLimitPassword;
|
||||
}
|
||||
|
||||
function SignDataWithVID_callback (aResult)
|
||||
{
|
||||
document.getElementById ("form_SignDataWithVID").aSignedMsg.value = aResult;
|
||||
var aResultVid = send_vid_info();
|
||||
document.getElementById ("form_SignDataWithVID").aVidMsg.value = aResultVid;
|
||||
}
|
||||
|
||||
function SignDataWithVID_Serial_callback (aResult)
|
||||
{
|
||||
document.getElementById ("form_SignDataWithVID_Serial").aSignedMsg.value = aResult;
|
||||
aResultVid = XecureWeb.GetVidInfo();
|
||||
document.getElementById ("form_SignDataWithVID_Serial").aVidMsg.value = aResultVid;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="initForm();">
|
||||
<form name='xecure'><input type=hidden name='p'></form>
|
||||
<table width="800" border="0" align='center' cellspacing="0" cellpadding="0" height="100%">
|
||||
<!-- Header -->
|
||||
<tr>
|
||||
<td>
|
||||
<div id="xecure_header" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Body -->
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<!-- left space -->
|
||||
<td width='106'> </td>
|
||||
|
||||
<!-- right contents -->
|
||||
<td>
|
||||
<!-- CENTER START -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<h3>SignDataWithVID</h3>
|
||||
<table class="test">
|
||||
<form id="form_SignDataWithVID" method=post action='./sign_vid_result.jsp'>
|
||||
<tr>
|
||||
<td width="50" rowspan="7">Input</td>
|
||||
<td width="120">aXgateAddress</td>
|
||||
<td width="524"><input type="text" class="inputtext" name="aXgateAddress"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aCAList</td>
|
||||
<td><input type="text" class="inputtext" name="aCAList"/></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPlain</td>
|
||||
<td><textarea class="inputtext" name="aPlain" rows="7"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aOption</td>
|
||||
<td style="text-align:left;">
|
||||
<strong>(공통 옵션)</strong></br>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="0" checked disabled="true"/>
|
||||
0 : 기본 서명<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="1"/>
|
||||
1 : 서명확인창을 보여준다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="8"/>
|
||||
8 : <strong>WEB(aIdn)</strong>으로 부터 직접 VID를 입력받는다 <strong>(VID입력창 뜨지 않음)</strong><br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="16"/>
|
||||
16 : IDN값을 입력받지 않는다 ""로 IDN대체 <strong>(VID입력창을 띄우지 않음)</strong><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aIdn</td>
|
||||
<td><input type="text" class="inputtext" name="aIdn"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDescription</td>
|
||||
<td><input type="text" class="inputtext" name="aDescription"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aLimitPassword</td>
|
||||
<td><input type="text" class="inputtext" name="aLimitPassword"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run</td>
|
||||
<td colspan="2">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="XecureWeb.SignDataWithVID"
|
||||
onClick="XecureWeb.SignDataWithVID (this.form.aXgateAddress.value,
|
||||
this.form.aCAList.value,
|
||||
this.form.aPlain.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aDescription.value,
|
||||
this.form.aLimitPassword.value,
|
||||
this.form.aIdn.value,
|
||||
s,
|
||||
SignDataWithVID_callback);"/>
|
||||
<!--br/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="Sign_with_vid_user"
|
||||
|
||||
onClick="Sign_with_vid_user (sumCheckbox (this.form.aOption),
|
||||
this.form.aPlain.value,
|
||||
s,
|
||||
SignDataWithVID_callback);"/>
|
||||
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="Sign_with_vid_web"
|
||||
|
||||
onClick="Sign_with_vid_web (sumCheckbox (this.form.aOption),
|
||||
this.form.aPlain.value,
|
||||
this.form.aIdn.value,
|
||||
s,
|
||||
SignDataWithVID_callback);"/-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtext" name="aSignedMsg" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>VID Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtext" name="aVidMsg" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>전송</td>
|
||||
<td colspan="4" height="25"><input type=submit value="서버로전송">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</form>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
<h3>SignDataWithVID_Serial</h3>
|
||||
<table class="test">
|
||||
<form id="form_SignDataWithVID_Serial" method=post action='./sign_vid_result.jsp' >
|
||||
<tr>
|
||||
<td width="50" rowspan="9">Input</td>
|
||||
<td width="120">aXgateAddress</td>
|
||||
<td width="524"><input type="text" class="inputtext" name="aXgateAddress"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aCAList</td>
|
||||
<td><input type="text" class="inputtext" name="aCAList"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aSerial</td>
|
||||
<td><input type="text" class="inputtext" name="aSerial"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aLocation</td>
|
||||
<td><input type="text" class="inputtext" name="aLocation"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aIdn</td>
|
||||
<td><input type="text" class="inputtext" name="aIdn"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aPlain</td>
|
||||
<td><textarea class="inputtext" name="aPlain" rows="7"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aOption</td>
|
||||
<td style="text-align:left;">
|
||||
<strong>(공통 옵션)</strong></br>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="0" checked disabled="true"/>
|
||||
0 : 기본 서명<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="1"/>
|
||||
1 : 서명확인창을 보여준다.<br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="8"/>
|
||||
8 : <strong>WEB(aIdn)</strong>으로 부터 직접 VID를 입력받는다 <strong>(VID입력창 뜨지 않음)</strong><br/>
|
||||
<input type="checkbox" class="inputcheck" name="aOption" value="16"/>
|
||||
16 : IDN값을 입력받지 않는다 ""로 대체 <strong>(VID입력창 뜨지 않음)</strong><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aDescription</td>
|
||||
<td><input type="text" class="inputtext" name="aDescription"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>aLimitPassword</td>
|
||||
<td><input type="text" class="inputtext" name="aLimitPassword"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Run</td>
|
||||
<td colspan="2">
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="XecureWeb.SignDataWithVID_Serial"
|
||||
onClick="XecureWeb.SignDataWithVID_Serial (this.form.aXgateAddress.value,
|
||||
this.form.aCAList.value,
|
||||
this.form.aSerial.value,
|
||||
this.form.aLocation.value,
|
||||
this.form.aPlain.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aDescription.value,
|
||||
this.form.aLimitPassword.value,
|
||||
this.form.aIdn.value,
|
||||
s,
|
||||
SignDataWithVID_Serial_callback);"/>
|
||||
<!--br/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="Sign_with_vid_user_serial"
|
||||
onClick="Sign_with_vid_user_serial (this.form.aSerial.value,
|
||||
this.form.aLocation.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aPlain.value,
|
||||
s,
|
||||
SignDataWithVID_Serial_callback);"/>
|
||||
<input type="button" class="inputbutton" style="height:auto;" value="Sign_with_vid_web_serial"
|
||||
onClick="Sign_with_vid_web_serial (this.form.aSerial.value,
|
||||
this.form.aLocation.value,
|
||||
sumCheckbox (this.form.aOption),
|
||||
this.form.aPlain.value,
|
||||
s,
|
||||
this.form.aIdn.value,
|
||||
SignDataWithVID_Serial_callback);"/--->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtext" name="aSignedMsg" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vid Output</td>
|
||||
<td colspan="2">
|
||||
<textarea class="inputtext" name="aVidMsg" rows="7"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>전송</td>
|
||||
<td colspan="3" height="25"><input type=submit value="서버로전송">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</form>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- CENTER END -->
|
||||
</td>
|
||||
<!-- right contents end -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Footer -->
|
||||
<tr>
|
||||
<td>
|
||||
<div id="xecure_footer" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
BIN
src/main/webapp/AnySign4PC/test/signfileinfo/cert/signCert.der
Normal file
BIN
src/main/webapp/AnySign4PC/test/signfileinfo/cert/signCert.der
Normal file
Binary file not shown.
BIN
src/main/webapp/AnySign4PC/test/signfileinfo/cert/signPri.key
Normal file
BIN
src/main/webapp/AnySign4PC/test/signfileinfo/cert/signPri.key
Normal file
Binary file not shown.
4
src/main/webapp/AnySign4PC/test/signfileinfo/test.txt
Normal file
4
src/main/webapp/AnySign4PC/test/signfileinfo/test.txt
Normal file
@ -0,0 +1,4 @@
|
||||
테스트 파일 : test.txt
|
||||
테스트 파일 : test.txt
|
||||
테스트 파일 : test.txt
|
||||
테스트 파일 : test.txt
|
||||
4
src/main/webapp/AnySign4PC/test/signfileinfo/test1.txt
Normal file
4
src/main/webapp/AnySign4PC/test/signfileinfo/test1.txt
Normal file
@ -0,0 +1,4 @@
|
||||
테스트 파일 : test1.txt
|
||||
테스트 파일 : test1.txt
|
||||
테스트 파일 : test1.txt
|
||||
테스트 파일 : test1.txt
|
||||
4
src/main/webapp/AnySign4PC/test/signfileinfo/test2.txt
Normal file
4
src/main/webapp/AnySign4PC/test/signfileinfo/test2.txt
Normal file
@ -0,0 +1,4 @@
|
||||
테스트 파일 : test2.txt
|
||||
테스트 파일 : test2.txt
|
||||
테스트 파일 : test2.txt
|
||||
테스트 파일 : test2.txt
|
||||
4
src/main/webapp/AnySign4PC/test/signfileinfo/test3.txt
Normal file
4
src/main/webapp/AnySign4PC/test/signfileinfo/test3.txt
Normal file
@ -0,0 +1,4 @@
|
||||
테스트 파일 : test3.txt
|
||||
테스트 파일 : test3.txt
|
||||
테스트 파일 : test3.txt
|
||||
테스트 파일 : test3.txt
|
||||
1361
src/main/webapp/AnySign4PC/test/signfileinfo_client.jsp
Normal file
1361
src/main/webapp/AnySign4PC/test/signfileinfo_client.jsp
Normal file
File diff suppressed because it is too large
Load Diff
135
src/main/webapp/AnySign4PC/test/signfileinfo_server.jsp
Normal file
135
src/main/webapp/AnySign4PC/test/signfileinfo_server.jsp
Normal file
@ -0,0 +1,135 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="xecure.crypto.jni.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%
|
||||
int err = 0;
|
||||
String[] pemCerts = {};
|
||||
|
||||
// 서명 대상 파일 경로
|
||||
String strOrgFile = "/signfileinfo/test.txt";
|
||||
|
||||
// 1차 서명 파일을 저장할 경로
|
||||
String strSignFile = "/signfileinfo/test_1.sig";
|
||||
|
||||
// 2차 서명 파일을 저장할 경로
|
||||
String strSignFile2 = "/signfileinfo/test_2.sig";
|
||||
|
||||
// 2차 서명 인증서 정보
|
||||
File certpath = new File("/signfileinfo/cert/signCert.der");
|
||||
File keypath = new File("/signfileinfo/cert/signPri.key");
|
||||
String passwd = "qwer1234";
|
||||
|
||||
String signedData = request.getParameter("aSignedMsg");
|
||||
String vidMsg = request.getParameter("aVidMsg");
|
||||
|
||||
out.println("<h1>XecureWeb for Multi - SignFileInfo Test (Server)</h1>");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>1. 클라이언트 서명값</h3>");
|
||||
if(signedData == null || signedData.length() == 0) {
|
||||
out.println("invalid request");
|
||||
return;
|
||||
}
|
||||
out.println("Client Signed Data: " + signedData + "<br>");
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>2. 기존 서명 파일 삭제</h3>");
|
||||
out.println("Delete File 1: " + strSignFile + "<br>");
|
||||
out.println("Delete File 2: " + strSignFile2 + "<br>");
|
||||
|
||||
File f1 = new File(strSignFile);
|
||||
File f2 = new File(strSignFile2);
|
||||
f1.delete();
|
||||
f2.delete();
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>3. 서명값 + 원본 파일 병합</h3>");
|
||||
out.println("Original File Path: " + strOrgFile + "<br>");
|
||||
out.println("Merge File Path: " + strSignFile + "<br>");
|
||||
|
||||
XecureConfig xconfig = new XecureConfig();
|
||||
|
||||
SplitFileSign sfs = new SplitFileSign(xconfig);
|
||||
byte[] bytes = new java.math.BigInteger(signedData, 16).toByteArray();
|
||||
err = sfs.merge(strSignFile, strOrgFile, bytes, pemCerts);
|
||||
if (err != 0)
|
||||
{
|
||||
out.println("> SplitFileSign.merge error[" + sfs.getLastError() + "]");
|
||||
return;
|
||||
}
|
||||
out.println("> SplitFileSign.merge success<br>");
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>4. 병합된 서명 파일 검증</h3>");
|
||||
out.println("Merge File Path: " + strSignFile + "<br>");
|
||||
|
||||
FileSignVerifier fsv = new FileSignVerifier(xconfig, strSignFile);
|
||||
if (fsv.getLastError() != 0)
|
||||
{
|
||||
out.println("> FileSignVerifier error[" + fsv.getLastError() + "][" + fsv.getLastErrorMsg() + "]");
|
||||
return;
|
||||
}
|
||||
out.println("> FileSignVerifier success<br>");
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>5. 식별번호 검증</h3>");
|
||||
if(vidMsg == null || vidMsg.length() == 0) {
|
||||
out.println("> no input VID Data");
|
||||
}
|
||||
else
|
||||
{
|
||||
out.println("Client VID Data: " + vidMsg + "<br>");
|
||||
|
||||
VidVerifier vv = new VidVerifier(xconfig);
|
||||
//vv.virtualIDVerifyS(vidMsg, fsv.getSignerCertificate().getCertPem(), "1111112222222"); // 서버측에서 식별번호 입력 시 사용
|
||||
vv.virtualIDVerifyS(vidMsg, fsv.getSignerCertificate().getCertPem());
|
||||
if (vv.getLastError() != 0)
|
||||
{
|
||||
out.println("> VidVerifier error[" + vv.getLastError() + "][" + vv.getLastErrorMsg() + "]");
|
||||
return;
|
||||
}
|
||||
out.println("> VidVerifier success<br>");
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>6. 서버에서 파일 서명 (2차 서명)</h3>");
|
||||
out.println("2nd Sign File path:" + strSignFile2 + "<br>");
|
||||
out.println("Cert File path:" + certpath + "<br>");
|
||||
out.println("Key File path:" + keypath + "<br>");
|
||||
out.println("Password:" + passwd + "<br>");
|
||||
|
||||
if (!certpath.exists() || !keypath.exists())
|
||||
{
|
||||
out.println("> not exists Cert");
|
||||
return;
|
||||
}
|
||||
|
||||
RandomAccessFile fcert = new RandomAccessFile(certpath, "r");
|
||||
byte[] bpem = new byte[(int)fcert.length()];
|
||||
fcert.read(bpem);
|
||||
fcert.close();
|
||||
|
||||
RandomAccessFile fkey = new RandomAccessFile(keypath, "r");
|
||||
byte[] bkey = new byte[(int)fkey.length()];
|
||||
fkey.read(bkey);
|
||||
fkey.close();
|
||||
|
||||
byte[] bpasswd = passwd.getBytes();
|
||||
|
||||
FileSigner fs = new FileSigner(xconfig);
|
||||
err = fs.signFileAddWithKey(bpem, bkey, bpasswd, strSignFile, strSignFile2);
|
||||
if (err != 0)
|
||||
{
|
||||
out.println("> FileSigner.signFileAddWithKey error[" + fs.getLastError() + "]");
|
||||
return;
|
||||
}
|
||||
out.println("> FileSigner.signFileAddWithKey success");
|
||||
//-----------------------------------------------------------------------------
|
||||
out.println("<h3>7. 2차 서명 파일 검증</h3>");
|
||||
out.println("2nd Sign File path:" + strSignFile2 + "<br>");
|
||||
|
||||
FileMultiSignVerifier fmsv = new FileMultiSignVerifier(xconfig, strSignFile2);
|
||||
if (fmsv.getLastError() != 0)
|
||||
{
|
||||
out.println("> FileMultiSignVerifier error[" + fmsv.getLastError() + "]");
|
||||
return;
|
||||
}
|
||||
out.println("> FileMultiSignVerifier success");
|
||||
%>
|
||||
14
src/main/webapp/AnySign4PC/test/test.html
Normal file
14
src/main/webapp/AnySign4PC/test/test.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title> New Document </title>
|
||||
<meta name="Generator" content="EditPlus">
|
||||
<meta name="Author" content="">
|
||||
<meta name="Keywords" content="">
|
||||
<meta name="Description" content="">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
hello world
|
||||
</body>
|
||||
</html>
|
||||
373
src/main/webapp/AnySign4PC/test/user_regist_anypin.jsp
Normal file
373
src/main/webapp/AnySign4PC/test/user_regist_anypin.jsp
Normal file
@ -0,0 +1,373 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ page buffer="16kb" %>
|
||||
<%@ page import="xecure.servlet.*" %>
|
||||
<%@ page import="xecure.crypto.*" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
<%
|
||||
response.setHeader("Cache-Control","no-store");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
|
||||
<%
|
||||
String []nameList = {"자신", "남편", "부인", "딸램", "아들", "막내", "장남", "장녀",
|
||||
"차녀", "차남", "엄마", "아빠", "형님", "언니", "누나", "오빠", "동생",
|
||||
"할아버지", "할머니", "큰아버지", "큰어머니", "삼촌", "사촌",
|
||||
"매부", "매재", "매형", "제수", "제부", "고모", "고모부",
|
||||
"이모", "이모부", "아저씨", "조카"};
|
||||
|
||||
java.util.Random aRandom = null;
|
||||
|
||||
aRandom = (java.util.Random)application.getAttribute ("xwup.ibs.random");
|
||||
if (aRandom == null)
|
||||
{
|
||||
aRandom = new java.util.Random ();
|
||||
application.setAttribute ("xwup.ibs.random", aRandom);
|
||||
}
|
||||
%>
|
||||
<%
|
||||
String commandType = request.getParameter("commandType");
|
||||
String targetRA = request.getParameter ("targetRA");
|
||||
String operaterId = "internet";
|
||||
String user_policy_type = request.getParameter("user_policy_type") ;
|
||||
String company_name = request.getParameter("company_name");
|
||||
String user_name = request.getParameter("user_name");
|
||||
String cert_type = request.getParameter("cert_type");
|
||||
String cert_class = request.getParameter("cert_class");
|
||||
String corp_code = request.getParameter("corp_code");
|
||||
|
||||
String org_code = request.getParameter("org_code");
|
||||
String orgid_code = request.getParameter("orgid_code");
|
||||
|
||||
String position = request.getParameter("position");
|
||||
String foreigner_id_num = request.getParameter("foreigner_id_num");
|
||||
String reg_master_num = request.getParameter("reg_master_num");
|
||||
String executive_num = request.getParameter("executive_num");
|
||||
String publicOrPrivate = request.getParameter("user_public_or_private");
|
||||
|
||||
//String ext3 = request.getParameter("ext3");
|
||||
|
||||
int i;
|
||||
int ca_result = 0;
|
||||
XecureConfig xconf = new XecureConfig ();
|
||||
XecureCA ca_client = null;
|
||||
String ip = null;
|
||||
int port = -1;
|
||||
int caType = -1;
|
||||
int caRMPType = -1;
|
||||
%>
|
||||
|
||||
<%
|
||||
ip = xconf.getXecureCaHost ();
|
||||
port = xconf.getXecureCaPort ();
|
||||
|
||||
if (targetRA != null)
|
||||
{
|
||||
if (targetRA.equalsIgnoreCase ("1024")) /* 1024 XecureCA Information */
|
||||
{
|
||||
ip = "192.168.0.26";
|
||||
port = 29210;
|
||||
caType = 2;
|
||||
caRMPType = 2;
|
||||
}
|
||||
else if (targetRA.equalsIgnoreCase ("2048")) /* 2048 XecureCA Information */
|
||||
{
|
||||
if (publicOrPrivate.equals("yessignmpki")) {
|
||||
ip = "192.168.0.43";
|
||||
port = 5301;
|
||||
caType = 2;
|
||||
caRMPType = 1;
|
||||
} else {
|
||||
//ip = "192.168.0.4";
|
||||
ip = "192.168.60.60";
|
||||
//port = 21200;
|
||||
port = 30000;
|
||||
caType = 2;
|
||||
caRMPType = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ca_client = new XecureCA (xconf, ip, port, caType, caRMPType);
|
||||
|
||||
|
||||
if (org_code == null)
|
||||
org_code = "";
|
||||
if (orgid_code == null)
|
||||
orgid_code = "";
|
||||
if (corp_code == null)
|
||||
corp_code = "0000";
|
||||
if (cert_class == null)
|
||||
cert_class = "0000";
|
||||
if (cert_type == null)
|
||||
cert_type = "0000";
|
||||
|
||||
|
||||
if (commandType != null && commandType.equalsIgnoreCase ("update"))
|
||||
{
|
||||
boolean isError = false;
|
||||
if (user_policy_type == null)
|
||||
isError = true;
|
||||
|
||||
if (user_name == null)
|
||||
isError = true;
|
||||
|
||||
if (isError)
|
||||
{
|
||||
%>
|
||||
({"code":"-1"
|
||||
"reason":"no policy or user_name or ssn"
|
||||
"moreinformation":""})
|
||||
<%
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (user_policy_type == null)
|
||||
{
|
||||
user_policy_type = "104";
|
||||
}
|
||||
|
||||
if (user_name == null || user_name.length () == 0)
|
||||
{
|
||||
user_name = nameList [aRandom.nextInt (nameList.length)];
|
||||
if (targetRA.equalsIgnoreCase("2048"))
|
||||
{
|
||||
while (user_name.length() < 4)
|
||||
{
|
||||
user_name = nameList [aRandom.nextInt (nameList.length)];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
user_name = new String(user_name.getBytes("iso8859-1"), "utf-8");
|
||||
|
||||
String euser_name = request.getParameter("euser_name");
|
||||
String user_id = request.getParameter("user_id");
|
||||
String real_id = request.getParameter("real_id");
|
||||
String ssn = request.getParameter("ssn");
|
||||
|
||||
String policy_type ;
|
||||
String user_type;
|
||||
String check_real_id;
|
||||
String service_code, service_key;
|
||||
String cert_status;
|
||||
|
||||
user_type = user_policy_type.substring(0, 1);
|
||||
|
||||
if( user_type.equals("1") )
|
||||
{
|
||||
if (ssn == null || ssn.length () == 0)
|
||||
{
|
||||
StringBuffer aBuffer = new StringBuffer ();
|
||||
Calendar aCalendar = Calendar.getInstance ();
|
||||
String aSSNTail = null;
|
||||
aSSNTail = String.valueOf (aRandom.nextInt (2999999));
|
||||
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.YEAR)).substring (2));
|
||||
|
||||
if (aCalendar.get(Calendar.MONTH) < 10)
|
||||
aBuffer.append ("0");
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.MONTH)));
|
||||
|
||||
if (aCalendar.get(Calendar.DAY_OF_MONTH) < 10)
|
||||
aBuffer.append ("0");
|
||||
aBuffer.append (String.valueOf (aCalendar.get(Calendar.DAY_OF_MONTH)));
|
||||
|
||||
|
||||
if (aSSNTail.length () < 7)
|
||||
{
|
||||
for (int aIter = 0; aIter < 7 - aSSNTail.length (); ++aIter)
|
||||
{
|
||||
aBuffer.append ("0");
|
||||
}
|
||||
}
|
||||
aBuffer.append (aSSNTail);
|
||||
|
||||
ssn = aBuffer.toString ();
|
||||
|
||||
}
|
||||
if (user_id == null)
|
||||
user_id = ssn;
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
//user_id = policy_type + ssn.charAt(5) + user_id;
|
||||
|
||||
if (real_id == null)
|
||||
real_id = user_id;
|
||||
}
|
||||
else if ( user_type.equals("2") )
|
||||
{
|
||||
if (ssn == null || ssn.length () == 0)
|
||||
{
|
||||
StringBuffer aBuffer = new StringBuffer ();
|
||||
String aSSNTail = null;
|
||||
aSSNTail = "2" + String.valueOf (aRandom.nextInt (999999999));
|
||||
|
||||
if (aSSNTail.length () < 10)
|
||||
{
|
||||
for (int aIter = 0; aIter < 10 - aSSNTail.length (); ++aIter)
|
||||
{
|
||||
aBuffer.append ("0");
|
||||
}
|
||||
}
|
||||
aBuffer.append (aSSNTail);
|
||||
|
||||
ssn = aBuffer.toString ();
|
||||
}
|
||||
|
||||
if (company_name == null)
|
||||
company_name = ssn;
|
||||
if (euser_name == null)
|
||||
euser_name = ssn;
|
||||
if (user_id == null)
|
||||
user_id = ssn;
|
||||
|
||||
policy_type = user_policy_type.substring(1,3);
|
||||
//user_id = policy_type + ssn.charAt(8) + user_id;
|
||||
|
||||
if (real_id == null)
|
||||
real_id = user_id;
|
||||
}
|
||||
else
|
||||
policy_type = user_policy_type.substring(1,2);
|
||||
|
||||
String email = "dont email me";
|
||||
String cell_phone = "dont call me";
|
||||
String fax = "dont fax me";
|
||||
String zipcode = "127-311";
|
||||
String address = "dogok dong house";
|
||||
String phone = "02-526-8000";
|
||||
String czipcode = "127-311";
|
||||
String caddress = "dogok dong";
|
||||
String cphone = "02-526-8000";
|
||||
|
||||
|
||||
%>
|
||||
({"ssn":"<%=ssn%>",
|
||||
"name":"<%=user_name%>",
|
||||
<%
|
||||
|
||||
service_code = "2";
|
||||
service_key = user_id;
|
||||
|
||||
ca_result = ca_client.viewCertificate(operaterId, service_code, service_key, corp_code, 0, 1 );
|
||||
|
||||
check_real_id = (String)ca_client.getResponseFromCertView("USERID",1);
|
||||
cert_status = (String)ca_client.getResponseFromCertView("STATUS",1);
|
||||
|
||||
if(cert_status.equalsIgnoreCase("10")) // 인증서 등록상태 정상인 경우는 재발급 등록 요청
|
||||
{
|
||||
commandType = "rereg";
|
||||
}
|
||||
else if(cert_status.equalsIgnoreCase("30") || cert_status.equalsIgnoreCase("40")) // 인증서 등록상태 폐지, 효력정지인 경우는 신규 등록 요청
|
||||
{
|
||||
commandType = "new";
|
||||
}
|
||||
else // 인증서 미등록인 경우는 신규 등록 요청
|
||||
{
|
||||
commandType = "new";
|
||||
}
|
||||
|
||||
%>
|
||||
"check_real_id":"<%=check_real_id%>",
|
||||
"cert_status":"<%=cert_status%>",
|
||||
"commandType":"<%=commandType%>",
|
||||
<%
|
||||
|
||||
if (commandType == null || commandType.equalsIgnoreCase ("new"))
|
||||
{
|
||||
ca_result = ca_client.registerNewUser (operaterId,
|
||||
user_type,
|
||||
company_name,
|
||||
user_name,
|
||||
user_id,
|
||||
ssn,
|
||||
policy_type,
|
||||
email,
|
||||
cell_phone,
|
||||
fax,
|
||||
zipcode,
|
||||
address,
|
||||
phone,
|
||||
czipcode,
|
||||
caddress,
|
||||
cphone,
|
||||
cert_type,
|
||||
cert_class,
|
||||
corp_code,
|
||||
org_code,
|
||||
orgid_code,
|
||||
position,
|
||||
foreigner_id_num,
|
||||
reg_master_num,
|
||||
executive_num,
|
||||
real_id);
|
||||
}
|
||||
else if (commandType.equalsIgnoreCase ("rereg"))
|
||||
{
|
||||
ca_result = ca_client.registerReNewUser (operaterId,
|
||||
user_type,
|
||||
company_name,
|
||||
user_name,
|
||||
user_id,
|
||||
ssn,
|
||||
policy_type,
|
||||
email,
|
||||
cell_phone,
|
||||
fax,
|
||||
zipcode,
|
||||
address,
|
||||
phone,
|
||||
czipcode,
|
||||
caddress,
|
||||
cphone,
|
||||
cert_type,
|
||||
cert_class,
|
||||
corp_code,
|
||||
org_code,
|
||||
orgid_code,
|
||||
position,
|
||||
foreigner_id_num,
|
||||
reg_master_num,
|
||||
executive_num,
|
||||
real_id,
|
||||
0);
|
||||
}
|
||||
else if (commandType.equalsIgnoreCase ("update"))
|
||||
{
|
||||
%>
|
||||
"code":"none",
|
||||
"reason":"XecureCA does not support registration for UPDATE",
|
||||
"moreinformation":"CA IP:<%=ip + ", CA Port:" + port%>"
|
||||
})
|
||||
<%
|
||||
return;
|
||||
|
||||
}
|
||||
if ( ca_result == 0 ) {
|
||||
user_id = ca_client.getResponseFromRegUser("USERID");
|
||||
real_id = ca_client.getRealUserId(user_id,corp_code);
|
||||
%>
|
||||
"code":"0",
|
||||
"ip":"<%=ip%>",
|
||||
"port":"<%=port%>",
|
||||
"regdate":"<%=ca_client.getResponseFromRegUser("REGDATE")%>",
|
||||
"regserial":"<%=ca_client.getResponseFromRegUser("REGSERIAL")%>",
|
||||
"userid":"<%=user_id%>",
|
||||
"realid":"<%=real_id%>",
|
||||
"refcode":"<%=ca_client.getResponseFromRegUser("REFCODE")%>",
|
||||
"authcode":"<%=ca_client.getResponseFromRegUser("AUTHCODE")%>"
|
||||
<% }
|
||||
else
|
||||
{
|
||||
%>
|
||||
"code":"<%=ca_client.getLastError()%>",
|
||||
"reason":"<%=ca_client.getLastErrorMsg()%>",
|
||||
"moreinformation":"CA IP:<%=ip + ", CA Port:" + port %>"
|
||||
<% }
|
||||
%>
|
||||
})
|
||||
@ -159,6 +159,9 @@
|
||||
<pattern>/web/user/mypage/case/01/168/devCiMakePop.do</pattern>
|
||||
<pattern>/web/user/siren/case/04/154/check.do</pattern>
|
||||
<pattern>*/web/user/mediation/case/caseSignPop/popup.do*</pattern>
|
||||
<pattern>/web/user/mediation/case/pdf/pdfDownload.do</pattern>
|
||||
<pattern>/web/user/mediation/case/pdf/viewer.do</pattern>
|
||||
|
||||
|
||||
</decorator>
|
||||
|
||||
|
||||
@ -40,10 +40,9 @@
|
||||
<!-- js -->
|
||||
|
||||
<script type="text/javascript">
|
||||
/* function aUserCallback(aResult) { */
|
||||
function aUserCallback() {
|
||||
/* var result = aResult.split('|');
|
||||
var user = result[1].split(',')[0].split('='); */
|
||||
function aUserCallback(aResult) {
|
||||
var result = aResult.split('|');
|
||||
var user = result[1].split(',')[0].split('=');
|
||||
/*var name = user[1];
|
||||
var idx = name.indexOf('(');
|
||||
if(idx != -1) {
|
||||
@ -54,12 +53,13 @@
|
||||
name = name.substring(0,idx);
|
||||
}*/
|
||||
|
||||
$('#caseSign').val('1');
|
||||
$('#caseSignName').val('ljh');
|
||||
$('#caseSign').val(result[0]);
|
||||
$('#caseSignName').val(user[1]);
|
||||
|
||||
caseWrite();
|
||||
}
|
||||
|
||||
|
||||
function caseSign(){
|
||||
var message = "";
|
||||
<c:choose>
|
||||
@ -72,7 +72,8 @@
|
||||
</c:choose>
|
||||
|
||||
if(confirm(message+ "에 서명 하시겠습니까?")){
|
||||
AnySign.SignDataCMS(AnySign.mXgateAddress, AnySign.aCAList, '이 내용이 전자서명됩니다.', 16777216, '', AnySign.mLimitedTrial,aUserCallback);
|
||||
// AnySign.SignDataCMS(AnySign.mXgateAddress, AnySign.aCAList, '이 내용이 전자서명됩니다.', 16777216, '', AnySign.mLimitedTrial,aUserCallback);
|
||||
AnySign.SignDataCMS(AnySign.mXgateAddress, AnySign.aCAList, '이 내용이 전자서명됩니다.', 16777472, '', AnySign.mLimitedTrial,aUserCallback);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,9 +97,18 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
height: 1200px; /* 스크롤바가 생기도록 내용의 높이를 늘립니다 */
|
||||
padding: 20px;
|
||||
background-color: #f9f9f9;
|
||||
overflow: auto; /* 스크롤바가 보이도록 설정 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="seedPop" style="overflow: hidden;">
|
||||
<body class="seedPop">
|
||||
<form:form name="frm" id="frm" action="" method="post">
|
||||
<input type="hidden" id="commentType" name="commentType" value="${commentType}"/>
|
||||
<input type="hidden" id="caseNo" name="caseNo" value="${caseNo}"/>
|
||||
@ -119,7 +129,8 @@
|
||||
<div id="content" style="text-align: center;">
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4808000000'}">
|
||||
<iframe src="/user/mediation/case/pdf/viewer.do?file=/site/case/upload/uploadFiles/case/${file.fileFunc}/${file.fileOrgname}" style="border: none; width: 97%; height: 700px;" frameborder="0"></iframe>
|
||||
<%-- <iframe src="/web/user/mediation/case/pdf/viewer.do?file=/site/case/upload/uploadFiles/case/${file.fileFunc}/${file.fileOrgname}" style="border: none; width: 97%; height: 700px;" frameborder="0"></iframe> --%>
|
||||
<iframe src="/web/user/mediation/case/pdf/viewer.do?dataIdx=${file.seqNo}" style="border: none; width: 97%; height: 700px;" frameborder="0"></iframe>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="btArea bt_c">
|
||||
|
||||
@ -2,375 +2,124 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<!doctype html>
|
||||
<html dir="ltr" mozdisallowselectionprint>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>PDF 문서 VIEW</title>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>PDF Viewer</title>
|
||||
<link rel="stylesheet" href="/js/pdf/web/viewer.css">
|
||||
|
||||
|
||||
<!-- This snippet is used in production (included from viewer.html) -->
|
||||
<link rel="resource" type="application/l10n" href="/js/pdf/web/locale/locale.properties">
|
||||
<!-- <link rel="stylesheet" href="/js/pdf/web/customViewer.css"> 커스텀 스타일 추가 -->
|
||||
<script src="/js/pdf/build/pdf.js"></script>
|
||||
|
||||
|
||||
<script src="/js/pdf/web/viewer.js"></script>
|
||||
<script src="/kccadrPb/usr/script/jquery-3.5.0.js"></script>
|
||||
</head>
|
||||
|
||||
<body tabindex="1" class="loadingInProgress">
|
||||
<div id="outerContainer">
|
||||
<style>
|
||||
/* 헤더 툴바 스타일 */
|
||||
#toolbar {
|
||||
background-color: #f0f0f0;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
<div id="sidebarContainer">
|
||||
<div id="toolbarSidebar">
|
||||
<div class="splitToolbarButton toggled">
|
||||
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
|
||||
<span data-l10n-id="thumbs_label">Thumbnails</span>
|
||||
</button>
|
||||
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
|
||||
<span data-l10n-id="document_outline_label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
|
||||
<span data-l10n-id="attachments_label">Attachments</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarContent">
|
||||
<div id="thumbnailView">
|
||||
</div>
|
||||
<div id="outlineView" class="hidden">
|
||||
</div>
|
||||
<div id="attachmentsView" class="hidden">
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarResizer" class="hidden"></div>
|
||||
</div> <!-- sidebarContainer -->
|
||||
#pdf-container {
|
||||
margin-top: 60px; /* 툴바 높이만큼 마진 추가 */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
<div id="mainContainer">
|
||||
<div class="findbar hidden doorHanger" id="findbar">
|
||||
<div id="findbarInputContainer">
|
||||
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
|
||||
<span data-l10n-id="find_previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
|
||||
<span data-l10n-id="find_next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
#toolbar button {
|
||||
padding: 5px 10px;
|
||||
margin: 0 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
<div id="findbarOptionsOneContainer">
|
||||
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
||||
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
|
||||
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
||||
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
|
||||
</div>
|
||||
<div id="findbarOptionsTwoContainer">
|
||||
<input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="96">
|
||||
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole words</label>
|
||||
<span id="findResultsCount" class="toolbarLabel hidden"></span>
|
||||
#toolbar span {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 헤더 툴바 추가 -->
|
||||
<div id="toolbar">
|
||||
<button id="prev-page">이전 페이지</button>
|
||||
<span>페이지 <span id="current-page">1</span> / <span id="total-pages">---</span></span>
|
||||
<button id="next-page">다음 페이지</button>
|
||||
</div>
|
||||
<div id="pdf-container"></div> <!-- PDF 페이지를 표시할 컨테이너 -->
|
||||
|
||||
<div id="findbarMessageContainer">
|
||||
<span id="findMsg" class="toolbarLabel"></span>
|
||||
</div>
|
||||
</div> <!-- findbar -->
|
||||
<script>
|
||||
var url = '/web/user/mediation/case/pdf/pdfDownload.do?dataIdx=${dataIdx}'; // 서버에서 설정한 PDF 다운로드 경로
|
||||
|
||||
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
|
||||
<div id="secondaryToolbarButtonContainer">
|
||||
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
var pdfDoc = null,
|
||||
currentPage = 1,
|
||||
totalPages = 0,
|
||||
scale = 1.5,
|
||||
canvas = null,
|
||||
context = null;
|
||||
|
||||
<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
var viewer = document.getElementById('pdf-container');
|
||||
var currentPageSpan = document.getElementById('current-page');
|
||||
var totalPagesSpan = document.getElementById('total-pages');
|
||||
|
||||
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
// PDF 로딩
|
||||
pdfjsLib.getDocument(url).promise.then(function(pdf) {
|
||||
pdfDoc = pdf;
|
||||
totalPages = pdf.numPages;
|
||||
totalPagesSpan.textContent = totalPages;
|
||||
|
||||
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
renderPage(currentPage);
|
||||
}).catch(function(reason) {
|
||||
// PDF 로딩 에러
|
||||
console.error(reason);
|
||||
});
|
||||
|
||||
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
// 페이지 렌더링 함수
|
||||
function renderPage(pageNum) {
|
||||
pdfDoc.getPage(pageNum).then(function(page) {
|
||||
var viewport = page.getViewport({scale: scale});
|
||||
|
||||
<div class="horizontalToolbarSeparator visibleLargeView"></div>
|
||||
// 기존 캔버스 제거
|
||||
viewer.innerHTML = '';
|
||||
|
||||
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
|
||||
<span data-l10n-id="first_page_label">Go to First Page</span>
|
||||
</button>
|
||||
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
|
||||
<span data-l10n-id="last_page_label">Go to Last Page</span>
|
||||
</button>
|
||||
canvas = document.createElement('canvas');
|
||||
canvas.style.display = 'block'; // 블록 요소로 설정
|
||||
context = canvas.getContext('2d');
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
viewer.appendChild(canvas);
|
||||
|
||||
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
|
||||
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
|
||||
</button>
|
||||
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
|
||||
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
|
||||
</button>
|
||||
var renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
};
|
||||
page.render(renderContext).promise.then(function () {
|
||||
console.log('Page ' + pageNum + ' rendered');
|
||||
});
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
currentPageSpan.textContent = pageNum;
|
||||
});
|
||||
}
|
||||
|
||||
<button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
|
||||
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
|
||||
</button>
|
||||
<button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
|
||||
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
|
||||
</button>
|
||||
// 이전 페이지 버튼 이벤트
|
||||
document.getElementById('prev-page').addEventListener('click', function() {
|
||||
if (currentPage <= 1) {
|
||||
return;
|
||||
}
|
||||
currentPage--;
|
||||
renderPage(currentPage);
|
||||
});
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="scrollVertical" class="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabindex="62" data-l10n-id="scroll_vertical">
|
||||
<span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollHorizontal" class="secondaryToolbarButton scrollModeButtons scrollHorizontal" title="Use Horizontal Scrolling" tabindex="63" data-l10n-id="scroll_horizontal">
|
||||
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollWrapped" class="secondaryToolbarButton scrollModeButtons scrollWrapped" title="Use Wrapped Scrolling" tabindex="64" data-l10n-id="scroll_wrapped">
|
||||
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator scrollModeButtons"></div>
|
||||
|
||||
<button id="spreadNone" class="secondaryToolbarButton spreadModeButtons spreadNone toggled" title="Do not join page spreads" tabindex="65" data-l10n-id="spread_none">
|
||||
<span data-l10n-id="spread_none_label">No Spreads</span>
|
||||
</button>
|
||||
<button id="spreadOdd" class="secondaryToolbarButton spreadModeButtons spreadOdd" title="Join page spreads starting with odd-numbered pages" tabindex="66" data-l10n-id="spread_odd">
|
||||
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
|
||||
</button>
|
||||
<button id="spreadEven" class="secondaryToolbarButton spreadModeButtons spreadEven" title="Join page spreads starting with even-numbered pages" tabindex="67" data-l10n-id="spread_even">
|
||||
<span data-l10n-id="spread_even_label">Even Spreads</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator spreadModeButtons"></div>
|
||||
|
||||
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="68" data-l10n-id="document_properties">
|
||||
<span data-l10n-id="document_properties_label">Document Properties…</span>
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- secondaryToolbar -->
|
||||
|
||||
<div class="toolbar">
|
||||
<div id="toolbarContainer">
|
||||
<div id="toolbarViewer">
|
||||
<div id="toolbarViewerLeft">
|
||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
|
||||
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
|
||||
</button>
|
||||
<div class="toolbarButtonSpacer"></div>
|
||||
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
|
||||
<span data-l10n-id="findbar_label">Find</span>
|
||||
</button>
|
||||
<div class="splitToolbarButton hiddenSmallView">
|
||||
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
|
||||
<span data-l10n-id="previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
|
||||
<span data-l10n-id="next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
<input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
|
||||
<span id="numPages" class="toolbarLabel"></span>
|
||||
</div>
|
||||
<div id="toolbarViewerRight" class="hidden">
|
||||
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
<a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="verticalToolbarSeparator hiddenSmallView"></div>
|
||||
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
|
||||
<span data-l10n-id="tools_label">Tools</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="toolbarViewerMiddle">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
|
||||
<span data-l10n-id="zoom_out_label">Zoom Out</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
|
||||
<span data-l10n-id="zoom_in_label">Zoom In</span>
|
||||
</button>
|
||||
</div>
|
||||
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
||||
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
||||
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
||||
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
||||
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
|
||||
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
|
||||
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
|
||||
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
||||
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
||||
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
||||
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
||||
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
||||
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
||||
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
||||
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingBar">
|
||||
<div class="progress">
|
||||
<div class="glimmer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<menu type="context" id="viewerContextMenu">
|
||||
<menuitem id="contextFirstPage" label="First Page"
|
||||
data-l10n-id="first_page"></menuitem>
|
||||
<menuitem id="contextLastPage" label="Last Page"
|
||||
data-l10n-id="last_page"></menuitem>
|
||||
<menuitem id="contextPageRotateCw" label="Rotate Clockwise"
|
||||
data-l10n-id="page_rotate_cw"></menuitem>
|
||||
<menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
|
||||
data-l10n-id="page_rotate_ccw"></menuitem>
|
||||
</menu>
|
||||
|
||||
<div id="viewerContainer" tabindex="0">
|
||||
<div id="viewer" class="pdfViewer"></div>
|
||||
</div>
|
||||
|
||||
<div id="errorWrapper" hidden='true'>
|
||||
<div id="errorMessageLeft">
|
||||
<span id="errorMessage"></span>
|
||||
<button id="errorShowMore" data-l10n-id="error_more_info">
|
||||
More Information
|
||||
</button>
|
||||
<button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
|
||||
Less Information
|
||||
</button>
|
||||
</div>
|
||||
<div id="errorMessageRight">
|
||||
<button id="errorClose" data-l10n-id="error_close">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
|
||||
</div>
|
||||
</div> <!-- mainContainer -->
|
||||
|
||||
<div id="overlayContainer" class="hidden">
|
||||
<div id="passwordOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="password" id="password" class="toolbarField">
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="documentPropertiesOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_size">Page Size:</span> <p id="pageSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_linearized">Fast Web View:</span> <p id="linearizedField">-</p>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="printServiceOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="print_progress_message">Preparing document for printing…</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<progress value="0" max="100"></progress>
|
||||
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- overlayContainer -->
|
||||
|
||||
</div> <!-- outerContainer -->
|
||||
<div id="printContainer"></div>
|
||||
</body>
|
||||
// 다음 페이지 버튼 이벤트
|
||||
document.getElementById('next-page').addEventListener('click', function() {
|
||||
if (currentPage >= totalPages) {
|
||||
return;
|
||||
}
|
||||
currentPage++;
|
||||
renderPage(currentPage);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@ -0,0 +1,417 @@
|
||||
<%@ page contentType="text/html;charset=utf-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<!doctype html>
|
||||
<html dir="ltr" mozdisallowselectionprint>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>PDF 문서 VIEW</title>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/js/pdf/web/viewer.css">
|
||||
|
||||
|
||||
<!-- This snippet is used in production (included from viewer.html) -->
|
||||
<link rel="resource" type="application/l10n" href="/js/pdf/web/locale/locale.properties">
|
||||
<script src="/js/pdf/build/pdf.js"></script>
|
||||
|
||||
|
||||
<script src="/js/pdf/web/viewer.js"></script>
|
||||
<script src="/kccadrPb/usr/script/jquery-3.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
var url = '/web/user/mediation/case/pdf/pdfDownload.do'; // 서버에서 설정한 PDF 다운로드 경로
|
||||
|
||||
var loadingTask = pdfjsLib.getDocument(url);
|
||||
loadingTask.promise.then(function(pdf) {
|
||||
console.log('PDF loaded');
|
||||
|
||||
var numPages = pdf.numPages;
|
||||
var viewer = document.getElementById('viewer');
|
||||
|
||||
for (let pageNum = 1; pageNum <= numPages; pageNum++) {
|
||||
pdf.getPage(pageNum).then(function(page) {
|
||||
console.log('Page ' + pageNum + ' loaded');
|
||||
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport({scale: scale});
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.style.display = 'block'; // 각 페이지를 블록 요소로 설정
|
||||
var context = canvas.getContext('2d');
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
viewer.appendChild(canvas);
|
||||
|
||||
var renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
};
|
||||
var renderTask = page.render(renderContext);
|
||||
renderTask.promise.then(function () {
|
||||
console.log('Page ' + pageNum + ' rendered');
|
||||
});
|
||||
});
|
||||
}
|
||||
}, function (reason) {
|
||||
// PDF 로딩 에러
|
||||
console.error(reason);
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body tabindex="1" class="loadingInProgress">
|
||||
<div id="outerContainer">
|
||||
|
||||
<div id="sidebarContainer">
|
||||
<div id="toolbarSidebar">
|
||||
<div class="splitToolbarButton toggled">
|
||||
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
|
||||
<span data-l10n-id="thumbs_label">Thumbnails</span>
|
||||
</button>
|
||||
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
|
||||
<span data-l10n-id="document_outline_label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
|
||||
<span data-l10n-id="attachments_label">Attachments</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarContent">
|
||||
<div id="thumbnailView">
|
||||
</div>
|
||||
<div id="outlineView" class="hidden">
|
||||
</div>
|
||||
<div id="attachmentsView" class="hidden">
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarResizer" class="hidden"></div>
|
||||
</div> <!-- sidebarContainer -->
|
||||
|
||||
<div id="mainContainer">
|
||||
<div class="findbar hidden doorHanger" id="findbar">
|
||||
<div id="findbarInputContainer">
|
||||
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
|
||||
<span data-l10n-id="find_previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
|
||||
<span data-l10n-id="find_next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="findbarOptionsOneContainer">
|
||||
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
||||
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
|
||||
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
||||
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
|
||||
</div>
|
||||
<div id="findbarOptionsTwoContainer">
|
||||
<input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="96">
|
||||
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole words</label>
|
||||
<span id="findResultsCount" class="toolbarLabel hidden"></span>
|
||||
</div>
|
||||
|
||||
<div id="findbarMessageContainer">
|
||||
<span id="findMsg" class="toolbarLabel"></span>
|
||||
</div>
|
||||
</div> <!-- findbar -->
|
||||
|
||||
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
|
||||
<div id="secondaryToolbarButtonContainer">
|
||||
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
|
||||
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="horizontalToolbarSeparator visibleLargeView"></div>
|
||||
|
||||
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
|
||||
<span data-l10n-id="first_page_label">Go to First Page</span>
|
||||
</button>
|
||||
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
|
||||
<span data-l10n-id="last_page_label">Go to Last Page</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
|
||||
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
|
||||
</button>
|
||||
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
|
||||
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
|
||||
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
|
||||
</button>
|
||||
<button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
|
||||
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="scrollVertical" class="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabindex="62" data-l10n-id="scroll_vertical">
|
||||
<span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollHorizontal" class="secondaryToolbarButton scrollModeButtons scrollHorizontal" title="Use Horizontal Scrolling" tabindex="63" data-l10n-id="scroll_horizontal">
|
||||
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollWrapped" class="secondaryToolbarButton scrollModeButtons scrollWrapped" title="Use Wrapped Scrolling" tabindex="64" data-l10n-id="scroll_wrapped">
|
||||
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator scrollModeButtons"></div>
|
||||
|
||||
<button id="spreadNone" class="secondaryToolbarButton spreadModeButtons spreadNone toggled" title="Do not join page spreads" tabindex="65" data-l10n-id="spread_none">
|
||||
<span data-l10n-id="spread_none_label">No Spreads</span>
|
||||
</button>
|
||||
<button id="spreadOdd" class="secondaryToolbarButton spreadModeButtons spreadOdd" title="Join page spreads starting with odd-numbered pages" tabindex="66" data-l10n-id="spread_odd">
|
||||
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
|
||||
</button>
|
||||
<button id="spreadEven" class="secondaryToolbarButton spreadModeButtons spreadEven" title="Join page spreads starting with even-numbered pages" tabindex="67" data-l10n-id="spread_even">
|
||||
<span data-l10n-id="spread_even_label">Even Spreads</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator spreadModeButtons"></div>
|
||||
|
||||
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="68" data-l10n-id="document_properties">
|
||||
<span data-l10n-id="document_properties_label">Document Properties…</span>
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- secondaryToolbar -->
|
||||
|
||||
<div class="toolbar">
|
||||
<div id="toolbarContainer">
|
||||
<div id="toolbarViewer">
|
||||
<div id="toolbarViewerLeft">
|
||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
|
||||
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
|
||||
</button>
|
||||
<div class="toolbarButtonSpacer"></div>
|
||||
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
|
||||
<span data-l10n-id="findbar_label">Find</span>
|
||||
</button>
|
||||
<div class="splitToolbarButton hiddenSmallView">
|
||||
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
|
||||
<span data-l10n-id="previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
|
||||
<span data-l10n-id="next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
<input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
|
||||
<span id="numPages" class="toolbarLabel"></span>
|
||||
</div>
|
||||
<div id="toolbarViewerRight" class="hidden">
|
||||
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
<a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="verticalToolbarSeparator hiddenSmallView"></div>
|
||||
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
|
||||
<span data-l10n-id="tools_label">Tools</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="toolbarViewerMiddle">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
|
||||
<span data-l10n-id="zoom_out_label">Zoom Out</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
|
||||
<span data-l10n-id="zoom_in_label">Zoom In</span>
|
||||
</button>
|
||||
</div>
|
||||
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
||||
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
||||
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
||||
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
||||
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
|
||||
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
|
||||
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
|
||||
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
||||
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
||||
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
||||
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
||||
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
||||
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
||||
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
||||
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingBar">
|
||||
<div class="progress">
|
||||
<div class="glimmer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<menu type="context" id="viewerContextMenu">
|
||||
<menuitem id="contextFirstPage" label="First Page"
|
||||
data-l10n-id="first_page"></menuitem>
|
||||
<menuitem id="contextLastPage" label="Last Page"
|
||||
data-l10n-id="last_page"></menuitem>
|
||||
<menuitem id="contextPageRotateCw" label="Rotate Clockwise"
|
||||
data-l10n-id="page_rotate_cw"></menuitem>
|
||||
<menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
|
||||
data-l10n-id="page_rotate_ccw"></menuitem>
|
||||
</menu>
|
||||
|
||||
<div id="viewerContainer" tabindex="0">
|
||||
<div id="viewer" class="pdfViewer"></div>
|
||||
</div>
|
||||
|
||||
<div id="errorWrapper" hidden='true'>
|
||||
<div id="errorMessageLeft">
|
||||
<span id="errorMessage"></span>
|
||||
<button id="errorShowMore" data-l10n-id="error_more_info">
|
||||
More Information
|
||||
</button>
|
||||
<button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
|
||||
Less Information
|
||||
</button>
|
||||
</div>
|
||||
<div id="errorMessageRight">
|
||||
<button id="errorClose" data-l10n-id="error_close">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
|
||||
</div>
|
||||
</div> <!-- mainContainer -->
|
||||
|
||||
<div id="overlayContainer" class="hidden">
|
||||
<div id="passwordOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="password" id="password" class="toolbarField">
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="documentPropertiesOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_size">Page Size:</span> <p id="pageSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_linearized">Fast Web View:</span> <p id="linearizedField">-</p>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="printServiceOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="print_progress_message">Preparing document for printing…</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<progress value="0" max="100"></progress>
|
||||
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- overlayContainer -->
|
||||
|
||||
</div> <!-- outerContainer -->
|
||||
<div id="printContainer"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -249,7 +249,7 @@
|
||||
$('#commentType').val(type);
|
||||
|
||||
var f = document.scheduleFrm;
|
||||
var popOption = "width=900, height=800, resizable=no, scrollbars=no, status=no;";
|
||||
var popOption = "width=1200, height=800, resizable=no, scrollbars=yes, status=no;";
|
||||
var pop = window.open('', "caseSignPop", popOption);
|
||||
f.target = "caseSignPop";
|
||||
f.action = "/web/user/mediation/case/caseSignPop/popup.do";
|
||||
@ -350,7 +350,10 @@
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4801000000' and file.memberSeq eq isSeq}">
|
||||
<div id="fileUploadP${status.count}">
|
||||
<img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a>
|
||||
<%-- <img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a> --%>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@ -375,7 +378,10 @@
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4811000000'}">
|
||||
<div id="fileUploadP${status.count}">
|
||||
<img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a>
|
||||
<%-- <img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a> --%>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@ -391,7 +397,10 @@
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4819000000' and file.memberSeq eq isSeq}">
|
||||
<div id="fileUploadP${status.count}">
|
||||
<img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a>
|
||||
<%-- <img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a> --%>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@ -413,7 +422,10 @@
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4802000000' and file.memberSeq eq isSeq}">
|
||||
<div id="fileUploadP${status.count}">
|
||||
<img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a>
|
||||
<%-- <img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a> --%>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@ -425,8 +437,11 @@
|
||||
<dd>
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4812000000'}">
|
||||
<%-- <div id="fileUploadP${status.count}"> --%>
|
||||
<img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a>
|
||||
<div id="fileUploadP${status.count}">
|
||||
<%-- <img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a> --%>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@ -442,7 +457,10 @@
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4820000000' and file.memberSeq eq isSeq}">
|
||||
<div id="fileUploadP${status.count}">
|
||||
<img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a>
|
||||
<%-- <img src="/img/user/bbs/icon_file.gif" alt="gif" style="margin-top: 14px"> <a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user">${file.fileName} (${file.regDt}, ${file.fileOwner})</a> --%>
|
||||
<ul class="file_list fill">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@ -465,7 +483,7 @@
|
||||
<ul class="file_list fill">
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4815000000'}">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li>
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
@ -477,7 +495,7 @@
|
||||
<ul class="file_list fill">
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4828000000'}">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li>
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
@ -489,7 +507,7 @@
|
||||
<ul class="file_list fill">
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4816000000'}">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li>
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
@ -499,7 +517,7 @@
|
||||
<ul class="file_list fill">
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4817000000'}">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li>
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
@ -509,7 +527,7 @@
|
||||
<ul class="file_list fill">
|
||||
<c:forEach items="${trublreqstmngCaseFileList}" var="file" varStatus="status">
|
||||
<c:if test="${file.fileGubun == '4818000000'}">
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><i class="icon delete gray_fill"></i></button></li>
|
||||
<li><a href="/seed/extra/down/file.do?dataIdx=${file.seqNo}&funcType=${file.fileFunc}&pathKey1=${siteIdx}&downUserl=user" download="download"><i class="icon file clip"></i><span class="file_name">${file.fileName} (${file.regDt}, ${file.fileOwner})</span></a> <button type="button" class="btn only_icon round"><!-- <i class="icon delete gray_fill"></i> --></button></li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
$("#type").val("NICESEARCH");
|
||||
var param = jQuery('#frm').serialize();
|
||||
url = "/gtm/case/common/ajax/NICE.do";
|
||||
XHR(url, param, function(r){
|
||||
XHR2(url, param, function(r){
|
||||
//alert(r.apiKey);
|
||||
//alert(r.niceSearch.Search.OperationResponse.SA0701.Items.totalcount);
|
||||
//alert(r.niceSearch.Search.OperationResponse.SA0701.Items.Item[1].korentrnm);
|
||||
|
||||
@ -4372,7 +4372,8 @@ var defaultOptions = {
|
||||
kind: OptionKind.WORKER
|
||||
},
|
||||
workerSrc: {
|
||||
value: '../build/pdf.worker.js',
|
||||
// value: '../build/pdf.worker.js',
|
||||
value: '/js/pdf/build/pdf.worker.js',
|
||||
kind: OptionKind.WORKER
|
||||
}
|
||||
};
|
||||
|
||||
@ -126,6 +126,7 @@
|
||||
<url-pattern>*.woff2</url-pattern>
|
||||
<url-pattern>*.ico</url-pattern>
|
||||
<url-pattern>*.jpg</url-pattern>
|
||||
<url-pattern>*.properties</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user