从网络浏览器访问智能卡读卡器? [英] Smartcard reader access from a web browser?

查看:47
本文介绍了从网络浏览器访问智能卡读卡器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从运行在同一台机器上的网络浏览器访问连接到计算机的智能卡读卡器,即从 ActionScript、JavaScript 或在其中运行的任何脚本?

Is it possible to access a smartcard reader connected to a computer from a web browser running on the same machine, i.e. from an ActionScript, JavaScript or whatsoever script running therein?

例如,我在 ActionScript 中阅读了有关 flash.external.ExternalInterface 类的一些内容.它可以用于访问智能卡读卡器还是沙盒无法穿透?

For example, I read something about the flash.external.ExternalInterface class in ActionScript. Can it be used for accessing a smartcard reader or is the Sandbox impenetrable?

推荐答案

问:是否可以从运行在同一台计算机上的 Web 浏览器访问连接到计算机的智能卡读卡器?

Q: is it possible to access smartcard reader connected to a computer from a web browser running on the same machine?

A:是的,这是可能的.我可以通过使用签名的 JAVA 小程序来做到这一点.java小程序需要签名,因为它需要用户授予访问系统文件/硬件的权限(与让小程序为您编写/编辑/删除文本文件相同).

A: Yes, it is possible. I was able to do that by using a signed JAVA applet. The java applet needs to be signed since it will require user to grant permission to access system files/hardware(same as letting an applet write/edit/delete a text file for you).

为什么是Java?我使用的智能卡读卡器已经有一个 JAVA API,它也有使用 java 访问它的例子.但是这些示例是用 Swing 编码的.(就像一个独立的桌面应用程序)我所做的只是将 java swing 代码移植到浏览器上的小程序.通过要求智能卡、用户名和密码,我成功地使用这个小程序在网站/webapp 上进行登录和注销.我会说非常安全.

Why java? the smart card reader I used already has a JAVA API, it also have examples on accessing it using java. But the examples are coded in swing. (like a standalone desktop application) What I did is simply porting the java swing code to applet on a browser. I successfully used this applet to make a login and log out on a website/webapp by requiring smart cards, username and password. Pretty secure I would say.

源代码?尽管我很想分享它,但我受公司合同的约束,不能分享代码.只需找到使用 java 的示例智能卡访问并将其移植到小程序(用于网络)

The source code? As much as I would like to share it, but I'm bound on a company contract to not share the code. Just find a sample smart card access using java and just port it to applet(for web)

希望能帮到你

这篇关于从网络浏览器访问智能卡读卡器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆