Replies: 2 comments 1 reply
-
That's not possible at the moment, because there is no platform agnostic way of accessing a hardware token. W3C offers the Cryptography API, but this only exposes what the browser implements/supports. Hardware token drivers are not a part of any browser. You could wrap the platform specific code into a platform specific browser extension, but that means that you'd have to maintain a couple of versions of your extensions. The easiest way out, would be to use some native application which forwards the requests to the token to the browser, e.g. by using a websocket. For example, you could use some existing program to forward the hardware token via TCP/IP (e.g. Since you always need some platform specific code, you can also ship a native app that's doing everything you need. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, frankmorgner!
I'd been checking on the possibilities of using Isolated Web Apps -
https://github.com/WICG/isolated-web-apps/blob/main/README.md
…On Mon, 20 Nov 2023 at 03:52, Frank Morgner ***@***.***> wrote:
That's not possible at the moment, because there is no platform agnostic
way of accessing a hardware token. W3C offers the Cryptography API, but
this only exposes what the browser implements/supports. Hardware token
drivers are not a part of any browser.
You could wrap the platform specific code into a platform specific browser
extension, but that means that you'd have to maintain a couple of versions
of your extensions. The easiest way out, would be to use some native
application which forwards the requests to the token to the browser, e.g.
by using a websocket. For example, you could use some existing program to
forward the hardware token via TCP/IP (e.g. pcsc-relay
<http://frankmorgner.github.io/vsmartcard/pcsc-relay/README.html> or vicc
--type=relay
<http://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html>),
map this to a websocket (e.g. with websockify
<https://github.com/novnc/websockify>) and then use this websocket for
I/O with your WebAssembly <https://webassembly.org/> compiled version of
OpenSC in the PWA.
Since you always need some platform specific code, you can also ship a
native app that's doing *everything* you need.
—
Reply to this email directly, view it on GitHub
<#2908 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDNUFLNBC2DQ6F6AY4YL42DYFNAAXAVCNFSM6AAAAAA6JQOEP6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMMJYGY3DI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi all
I would like to know if there is any interest (or existing efforts) on building a web-based version of OpenSC which can be used from a browser (like a Chrome extension or firefod add-on) and thus be OS-agnostic.
Just checking - it would be interesting to know if the possibility exists and if not, what are the challenges.
Thanks for a great solution !
Thanks
bby
Beta Was this translation helpful? Give feedback.
All reactions