What is the IP address of the web server in Java Card 3.0 connected version?
Asked Answered
M

1

6

When we run a web server in a java card 3.0 compatible card, how can we request that server or rather at which IP address do we request that server. Further more can an android app request and get a response from the server if so how can we do it ?

Mlle answered 9/1, 2017 at 17:45 Comment(5)
I don't see any reason for casting close votes or downvotes. I find this question absolutely valid and very interesting. Have you studied Global Platform Card Networked Framework? I think it must be relevant to your question.Chondrite
Is there any real Java Card 3 Extended version compatible card? or are they all virtual?Ibbison
In an emulator it runs on the localhost at default PORT 8019. Assuming such a card exists can the IP of the SIM card slot work as the localhost for the web server ?Mlle
What emulator do you use? Netbeans?Chondrite
Yes I use netbeans for developing javacardMlle
D
5

Obviously if it isn't directly connected to a network it cannot obtain an IP address by itself (it would not be much use if it could). If there is an IP address assigned to it it must be on the host machine, routing the packets to the smart card.

Or, as the standard states in the JCRE spec of the 3.0.1 connected edition:

A Java Card Platform implementation is not required to support the TCP/IP or UDP/IP on card. Connections over HTTP, HTTPS, and TLS protocols and datagrams over the UDP protocol MAY be supported over IP, as well as non-IP protocols, by using a gateway on the terminal or hosting device. The TLS protocol MUST be supported on card.

But also:

Applications MUST NOT be required to know that a non-IP protocol is being used.

So basically the host will receive a TCP/IP stream, and convert it into packets towards the card.

Danelle answered 11/1, 2017 at 1:40 Comment(6)
Do you know of any application server or a web server that supports this forwarding out of the box? Or is this a gap in the stack, that must be filled in the future before real connected cards are released?Chondrite
Is there any existing Android app that could work as a bridge between "localhost" in Android browser and the SIM card?Chondrite
@Chondrite Nope, I haven't worked with the connected editions. I don't see how you can a) have an IP address and b) can do without routing on the host though so I think this is the only possible answer (I presumed this and then tried to find it in the Java Card specs, knowing that I would find it).Danelle
I'm putting this answer on "hold" to see if somebody knows a more authoritative answer, see also comment in bounty.Danelle
Where did you find that an applet can specify his own IP address?Chondrite
@Chondrite I didn't but a question was posed where localhost was being used, which made me doubt my answer somewhat, so I'm not 100% certain (I'm still pretty sure that the host needs to be involved of course). I mainly kept my answer here to avoid getting an identical answer from the one I already posted.Danelle

© 2022 - 2024 — McMap. All rights reserved.