Newbie question: calling external programs/libraries from javascript

P

Philippe C. Martin

Hi,

I need to call an external program/library from a web page and get the data
to the server.

1) that program/library will get information from a smart card inserted in a
local reader.
2) the information from received must then be passed to the server (PHP
bridge ?)
3) I would like the program/library to be a Python script, yet a .exe would
be OK
4) I want this to run with IE, Mozilla & Firefox.

Any clue ?

Thanks,

Philippe
 
K

kaeli

Hi,

I need to call an external program/library from a web page and get the data
to the server.

1) that program/library will get information from a smart card inserted in a
local reader.
2) the information from received must then be passed to the server (PHP
bridge ?)
3) I would like the program/library to be a Python script, yet a .exe would
be OK
4) I want this to run with IE, Mozilla & Firefox.

Sounds like a job for an applet to me.


--
--
~kaeli~
The Bermuda Triangle got tired of warm weather. It moved to
Finland. Now Santa Claus is missing.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
P

Philippe C. Martin

Thanks,

But I'd like to avoid that as the VM might not be installed on all clients.

Regards,

Philippe
 
K

kaeli

Thanks,

But I'd like to avoid that as the VM might not be installed on all clients.

Regards,

Philippe

Perhaps I misunderstood what you wanted, since the way I was thinking, worse
things would have to be installed on the client.

Were you asking just for a web page to call some server code?
Because that doesn't need anything at all on the client -- not even
javascript.
1) that program/library will get information from a smart card inserted in a
local reader.

Is that on the client or on a server?
I was assuming client.
Javascript can't just read that. It needs help, if it can do it at all.
2) the information from received must then be passed to the server (PHP
bridge ?)

From where?
3) I would like the program/library to be a Python script, yet a .exe would
be OK

On the client?
If so, someone would have to install things.
If they're installing things, might as well use the JVM.
4) I want this to run with IE, Mozilla & Firefox.
Shouldn't matter, unless the things being run are also on the client.

If you're looking for a program that takes input from a PC smart card reader
into a server, someone's going to have to install SOMETHING. Even if it's
just an ActiveX, COM, or applet control. I myself, as a regular user, would
trust signed applet code way before I'd install some .exe file.

If you're looking for a web user to initiate a server to server data
transfer, the web user needs nothing special at all.

--
--
~kaeli~
Is it true that cannibals don't eat clowns because they
taste funny?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
P

Philippe C. Martin

Hi,

My goal:

-) The client will have a smart card inserted in his PC smart card reader
-) The client will attempt to connect to some web page
-) The server of that web page will also have a smart card which will
require to authenticate the card on the client side - or else, the page
access will be refused.

So I need the following to happen:
-) Some type of event on the client/browser side triggers the reading of
information from the _local_ smart card
-) The browser passes that information to the server code
-) The server gives that information to _his_ smart card and gets some data
in return
-) The browser gets that data and gives it to the _local_ smart card
-) Yet again (sorry) the _local_ smart card gives new data to the browser
which is passed to the server
-) The server gives that last piece of information to _his_ smart card which
say OK or NOK.
-) The server give access or not to the page depending on the smart card
answer.


This is fairly standard with regular smart card applications, but I have now
to implement it in a www environment and I want it to be as clean as
possible asfar as: usage, installation, browser portability, cross-platform
compatibility.

Regards,

Philippe
 
K

kaeli

So I need the following to happen:
-) Some type of event on the client/browser side triggers the reading of
information from the _local_ smart card

In order to implement that, the user will have to install some sort of non-
www code. Similar to things like McAfee or Norton that run on the client, but
also go over the web.

That means this will actually be written in something like .NET or Java so it
can use the browser components. You *don't* want to try to do that yourself!
LOL
If this is for PCs running Windows, I'd recommend .net. It's just easier to
make things fast in it for Windows applications, assuming you have
VisualStudio.net. C# is my preferred language for .net, personally.
I find it a pain to use Java for Windows apps because you have to go third
party to make .exe files.

After you write a program to catch events, you can have it pull up a browser
component and send data to the server. Not necessarily at the same time - you
may need to open a socket to the server to do the communications and display
results in the browser component. The other option is to use URL params,
which may not be secure enough or offer a long enough string (url limit).

And by the by, this is FAR from a newbie question! ;)
And probably in the end will have very little to do with javascript.
(at the very least, this MAY be able to be accomplished with some sort of
ActiveX or COM component, but that would not be cross-browser)

Note that the user's default browser is stored in the registry, so to bring
it up, you'll have to go look there.

--
--
~kaeli~
It was recently discovered that research causes cancer in
rats.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top