加入ukey登录

master
20918 1 year ago
parent 49ca98a686
commit 2d46556806

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -161,6 +161,19 @@
<servlet-name>loginServlet</servlet-name>
<url-pattern>/servlet/loginServlet</url-pattern>
</servlet-mapping>
<!-- <servlet>-->
<!-- <servlet-name>KeyLoginServlet</servlet-name>-->
<!-- <servlet-class>com.zky.certlogin.KeyLoginServlet</servlet-class>-->
<!-- </servlet>-->
<!-- <servlet-mapping>-->
<!-- <servlet-name>KeyLoginServlet</servlet-name>-->
<!-- <url-pattern>/servlet/KeyLoginServlet</url-pattern>-->
<!-- </servlet-mapping>-->
<servlet>
<servlet-name>SelectParaServlet</servlet-name>
<servlet-class>com.zky.sspd.para.SelectParaServlet</servlet-class>

@ -181,3 +181,39 @@ INFO [2023-12-22 17:17:33 413] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-22 17:17:33 413] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 09:17:56 946] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 09:17:57 55] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:29:33 924] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:29:38 4] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:29:38 33] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:29:38 33] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:29:38 60] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:29:38 60] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:48 281] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:48 282] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:48 289] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:48 289] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:48 301] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:48 301] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:52 20] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:52 21] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:40:10 969] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:40:11 185] BJCA Client Version:2.0 Build20210118
INFO [2023-12-25 15:05:07 901] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-25 15:05:07 982] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 14:42:06 788] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 14:42:10 935] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 14:51:55 537] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 14:51:55 609] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 14:55:55 259] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 14:55:55 340] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:20:55 569] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:20:57 34] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:20:59 756] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:20:59 758] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:21:28 174] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:21:28 174] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:21:28 182] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:21:28 182] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:21:28 207] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:21:28 207] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:34:50 997] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:34:51 174] BJCA Client Version:2.0 Build20210118

@ -138,11 +138,6 @@
</td>
</tr>
<tr>
<td class="right"> 请选择证书: </td>
<td class="left">
@ -157,21 +152,6 @@
</td>
</tr>
<tr>
<td class="right"> 选择设备序列号: </td>
<td class="left">
@ -185,6 +165,32 @@
<input type="text" class="StandardWidth" id="id_selected_device_sn">
</td>
</tr>
<button type="button" id="key_login">选择完毕</button>
<script>
document.addEventListener("DOMContentLoaded", function() {
// 获取按钮元素
const button = document.getElementById("key_login"); // 替换成你实际的按钮ID
// 监听按钮的点击事件
button.addEventListener("click", function() {
// 获取两个input框的值
//var certListValue = document.getElementById("id_cert_list").value;
var selectedCertIdValue = document.getElementById("id_selected_cert_id").value;
alert("选择成功,点击返回登陆");
// 创建一个新的XMLHttpRequest对象
var xhr = new XMLHttpRequest();
// 设置POST请求的目标路径为login
const url = "/keylogin"; // 替换成实际的路径
// 设置POST请求
xhr.open("POST", url, true);
// 设置POST请求的Content-Type头部
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(JSON.stringify(selectedCertIdValue))
// xhr.send(selectedCertIdValue(value))
});
});
</script>
</table>
</div>
<!-- //////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@ -340,9 +346,9 @@
// xhr.open("POST", "/login", true);
// xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
// xhr.send("value=" + encodeURIComponent(value));
} else {
// 获取按钮元素
}
else {
form_xtx.id_login_out_res.value = "证书[" + certId + "]登录失败";
//当登录失败时调用SOF_GetLastError取错误码errcode为79时表示pin码复杂度不符合
SOF_GetLastError(function(retObj) {

@ -197,9 +197,10 @@ a:visited {
<td colspan="2" height="25px"><input name="btnLogin"
onclick="return check();" type="image"
src="/images/btn.gif" />
<A id=LinkButton2
href="/login.html"
style="font-size: 15px;">UKEY登录
style="font-size: 15px;">UKEY检测
</A>
</td>

@ -41,6 +41,26 @@
<version>3.4.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.71</version>
</dependency>
</dependencies>

@ -0,0 +1,40 @@
package com.zky.certlogin;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.security.Key;
@WebServlet("/keylogin")
public class KeyLoginServlet extends HttpServlet{
private static String formData;
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException {
// 从请求中获取表单信息
BufferedReader reader = request.getReader();
StringBuilder sb = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
formData = sb.toString();
// System.out.println(formData);
// // 创建一个新的Cookie对象
Cookie cookie = new Cookie("formData", formData);
// 设置Cookie的路径
cookie.setPath("/"); // 设置为根路径使得整个应用都可以访问该Cookie
// 将Cookie添加到响应中
response.addCookie(cookie);
}
}

@ -55,6 +55,10 @@ public class Login {
public String menuname=null;
public String sanyuan=null;
public String certname = null;
public String certid = null;
public String getMenuname() {
return this.menuname;
}
@ -98,6 +102,12 @@ public class Login {
para_out.fchg("FRAMEWORKID", 0, frameworkid);
para_out.fchg("OPTRID", 0, optrid);
para_out.fchg("SANYUAN", 0, sanyuan);
para_out.fchg("CERTNAME", 0, certname);
para_out.fchg("CERTID", 0, certid);
para_out.fchg("EMPNAME", 0, empname);
para_out.fchg("OPTRPWD", 0, emppwd);
para_out.fchg("OPTRSTAT", 0, empstate);
@ -121,6 +131,11 @@ public class Login {
para_out.fchg("FRAMEWORKID", 0, null);
para_out.fchg("OPTRID", 0, null);
para_out.fchg("SANYUAN", 0, null);
para_out.fchg("CERTNAME", 0, null);
para_out.fchg("CERTID", 0, null);
para_out.fchg("OPTRGRP", 0, null);
para_out.fchg("EMPNAME", 0, null);
para_out.fchg("OPTRPWD", 0, null);
@ -193,6 +208,8 @@ public class Login {
passtag = "0";
parentdeptid = null;
sanyuan=null;
certname = null;
certid = null;
}
/**
@ -235,7 +252,7 @@ public class Login {
}
String ls_sql =
"select frameworkid,empname,emppwd,empstate,empstatedate,emplvl,empcontaddr,empcontphone,empcontmobphone,empfaxnum,empidbegindate,empidenddate,sanyuan from tab_employee where empid = ?";
"select frameworkid,empname,emppwd,empstate,empstatedate,emplvl,empcontaddr,empcontphone,empcontmobphone,empfaxnum,empidbegindate,empidenddate,sanyuan,certname,certid from tab_employee where empid = ?";
try {
//连接数据库
conn = DbConn.getConn();
@ -254,6 +271,10 @@ public class Login {
empstatedate = rs.getString("empstatedate");
optrlvl = rs.getString("emplvl");
sanyuan=rs.getString("sanyuan");
certname=rs.getString("certname");
certid=rs.getString("certid");
optrcontaddr = rs.getString("empcontaddr");
optrcontphone = rs.getString("empcontphone");
optrcontmobphone = rs.getString("empcontmobphone");
@ -355,22 +376,25 @@ public class Login {
8acptsitetypeidchar(2)
9acptsitename(char40)
*/
public int checkPwd(String emppwd, HashFmlBuf para_out) {
public int checkPwd(String emppwd, String certid, HashFmlBuf para_out) {
//清除输出缓冲区中的数据
para_out.finit();
//比较口令是否校验成功
if (encrypt_optr_password(emppwd).equals(this.emppwd)) {
if (encrypt_optr_password(emppwd).equals(this.emppwd) && certid.equals(this.certid)) {
//判断口令是否过期
if (empstate.equals("0")) {
para_out.fchg("CHECKTAG", 0, "00004");
para_out.fchg("ERRORINFO", 0, "您的用户账号已经过期!");
return -1;
}
} else {
} else if(!encrypt_optr_password(emppwd).equals(this.emppwd)){
para_out.fchg("CHECKTAG", 0, "00002");
para_out.fchg("ERRORINFO", 0, "您输入的登录密码不正确!");
return -1;
} else {
para_out.fchg("ERRORINFO", 0, "您的UKEY登录信息不正确!");
return -1;
}
//判断岗位是否存在

@ -1,13 +1,13 @@
package com.zky.manager;
import java.io.BufferedReader;
import java.io.IOException;
import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import org.apache.log4j.Logger;
import com.zky.pub.*;
import com.zky.util.*;
@ -28,6 +28,7 @@ public class LoginServlet extends HttpServlet {
HttpSession session = request.getSession();
String useid=request.getParameter("username");
String pwd=request.getParameter("password");
Object[] obj = { useid, pwd };
String versionOfJxc = (String)request.getParameter("versionOfJxc");
//获得分辨率
@ -43,7 +44,7 @@ public class LoginServlet extends HttpServlet {
String checkCode = request.getParameter("check_code");
String rightCheckCode = (String)session.getAttribute("c");
if(!checkCode.equals(rightCheckCode)) {
url = "../login.jsp?type=relogin&errorinfo="+URLEncoder.encode("验证码不正确,请重新输入!", "GB2312");
url = "../login.jsp?type=relogin&errorinfo="+URLEncoder.encode("验证码不正确,请重新输入!", "utf-8");
response.sendRedirect(Common.GbConvertIso(url));
session.setAttribute("obj", obj);
}
@ -91,6 +92,21 @@ public class LoginServlet extends HttpServlet {
// 从页面上获取输入参数
empid = request.getParameter("username").trim();
emppwd = request.getParameter("password").trim();
Cookie[] cookies = request.getCookies();
// 遍历Cookie数组找到名称为"formData"的Cookie对象
String certid = null;
for (Cookie cookie : cookies) {
if (cookie.getName().equals("formData")){
//System.out.println(cookie.getName()+ ": " + cookie.getValue());
certid = cookie.getValue();
cookie.setMaxAge(10);
}
}
try {
login_obj.checkOptrid(empid, para_out);
ls_checktag = para_out.fget("CHECKTAG", 0);
@ -100,9 +116,10 @@ public class LoginServlet extends HttpServlet {
session.setAttribute("login", login_obj);
// 调用方法验证口令
para_out.finit();
login_obj.checkPwd(emppwd, para_out);
login_obj.checkPwd(emppwd, certid, para_out);
if (para_out.fget("CHECKTAG", 0).equals("00000")) {
// 口令验证通过
// 判断部门个数,如果有多个工作部门,则转到部门选择页面,用户需要选择一个部门。
rowcount = para_out.fget("DEPTCOUNT", 0);
// 如果只有一个部门,则直接获取菜单登录

@ -0,0 +1,13 @@
import com.zky.certlogin.KeyLoginServlet;
import java.io.IOException;
public class testKeyLoginServlet {
public static void main(String[] args) throws IOException {
KeyLoginServlet servlet = new KeyLoginServlet(); // 创建 servlet 类的实例
// 调用 doPost 方法
// 调用 getFormData 方法并打印 formData 变量的值
//System.out.println(servlet.getFormData());
}
}

@ -161,6 +161,19 @@
<servlet-name>loginServlet</servlet-name>
<url-pattern>/servlet/loginServlet</url-pattern>
</servlet-mapping>
<!-- <servlet>-->
<!-- <servlet-name>KeyLoginServlet</servlet-name>-->
<!-- <servlet-class>com.zky.certlogin.KeyLoginServlet</servlet-class>-->
<!-- </servlet>-->
<!-- <servlet-mapping>-->
<!-- <servlet-name>KeyLoginServlet</servlet-name>-->
<!-- <url-pattern>/servlet/KeyLoginServlet</url-pattern>-->
<!-- </servlet-mapping>-->
<servlet>
<servlet-name>SelectParaServlet</servlet-name>
<servlet-class>com.zky.sspd.para.SelectParaServlet</servlet-class>

File diff suppressed because it is too large Load Diff

@ -181,3 +181,39 @@ INFO [2023-12-22 17:17:33 413] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-22 17:17:33 413] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 09:17:56 946] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 09:17:57 55] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:29:33 924] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:29:38 4] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:29:38 33] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:29:38 33] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:29:38 60] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:29:38 60] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:48 281] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:48 282] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:48 289] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:48 289] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:48 301] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:48 301] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:33:52 20] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:33:52 21] BJCA Client Version:2.0 Build20210118
INFO [2023-12-23 14:40:10 969] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-23 14:40:11 185] BJCA Client Version:2.0 Build20210118
INFO [2023-12-25 15:05:07 901] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-25 15:05:07 982] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 14:42:06 788] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 14:42:10 935] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 14:51:55 537] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 14:51:55 609] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 14:55:55 259] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 14:55:55 340] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:20:55 569] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:20:57 34] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:20:59 756] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:20:59 758] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:21:28 174] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:21:28 174] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:21:28 182] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:21:28 182] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:21:28 207] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:21:28 207] BJCA Client Version:2.0 Build20210118
INFO [2023-12-27 15:34:50 997] Load HSM config IP1:10.10.3.2,Port1:8000
INFO [2023-12-27 15:34:51 174] BJCA Client Version:2.0 Build20210118

@ -138,11 +138,6 @@
</td>
</tr>
<tr>
<td class="right"> 请选择证书: </td>
<td class="left">
@ -157,21 +152,6 @@
</td>
</tr>
<tr>
<td class="right"> 选择设备序列号: </td>
<td class="left">
@ -185,6 +165,32 @@
<input type="text" class="StandardWidth" id="id_selected_device_sn">
</td>
</tr>
<button type="button" id="key_login">选择完毕</button>
<script>
document.addEventListener("DOMContentLoaded", function() {
// 获取按钮元素
const button = document.getElementById("key_login"); // 替换成你实际的按钮ID
// 监听按钮的点击事件
button.addEventListener("click", function() {
// 获取两个input框的值
//var certListValue = document.getElementById("id_cert_list").value;
var selectedCertIdValue = document.getElementById("id_selected_cert_id").value;
alert("选择成功,点击返回登陆");
// 创建一个新的XMLHttpRequest对象
var xhr = new XMLHttpRequest();
// 设置POST请求的目标路径为login
const url = "/keylogin"; // 替换成实际的路径
// 设置POST请求
xhr.open("POST", url, true);
// 设置POST请求的Content-Type头部
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(JSON.stringify(selectedCertIdValue))
// xhr.send(selectedCertIdValue(value))
});
});
</script>
</table>
</div>
<!-- //////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@ -340,9 +346,9 @@
// xhr.open("POST", "/login", true);
// xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
// xhr.send("value=" + encodeURIComponent(value));
} else {
// 获取按钮元素
}
else {
form_xtx.id_login_out_res.value = "证书[" + certId + "]登录失败";
//当登录失败时调用SOF_GetLastError取错误码errcode为79时表示pin码复杂度不符合
SOF_GetLastError(function(retObj) {

@ -197,9 +197,10 @@ a:visited {
<td colspan="2" height="25px"><input name="btnLogin"
onclick="return check();" type="image"
src="/images/btn.gif" />
<A id=LinkButton2
href="/login.html"
style="font-size: 15px;">UKEY登录
style="font-size: 15px;">UKEY检测
</A>
</td>

Loading…
Cancel
Save