Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intercept Shareable creation with proxy #62

Open
wants to merge 158 commits into
base: master
Choose a base branch
from
Open

Intercept Shareable creation with proxy #62

wants to merge 158 commits into from

Conversation

slomo
Copy link
Contributor

@slomo slomo commented Jan 19, 2015

This is an attempt to fix #60 by introducing a java.lang.reflect.Proxy wrapper for each Shareable that will emulate a Applet context stack by updating the currentAID and previousAID.

licel and others added 30 commits October 25, 2013 17:33
…pports connections from outside via TCP.

[+] Added ability to run jCardSim in client/server mode (based on RMI).
[+] Added ability to load applet from jar-file.
[*] Refactoring.
Make sure to mask when casting byte to short in receiveBytes()
Now jCardSim operates on Raspberry Pi as a simulated Java Card and suppo...
add a command that sends half the Hello world string and indicates there is
more data.
add a test of this that confirms we get the data as well as the indication
of more data.
return data for 61XX SW
…adapted. MessageDigest was modified in accordance with JC2.2.2.
changes some underlying dynamics but keeps the current api
where selectApplet() returns boolean and adds selectAppletWithResult()
returning byte[]
failed comparisons where arrays contained values over 0x7f
fix this by up-casting to short and comparing, also add a small test
failed comparisons where arrays contained values over 0x7f
fix this by up-casting to short and comparing, also add a small test
robertbachmann and others added 27 commits October 19, 2014 03:37
Support for CLEAN_ON_DESELECT / RESET
- add check to APDU#getIncomingLength()
- add check to APDU#getOffsetCdata()
- add Simulator#changeProtocol method
- inline some package-locals from SimulatorRuntime
- add DualInterface sample applet which denies write
  operations on contactless interfaces
Minimal support for T=1 and T=CL
- Move methods form SimulatorSystem to SimulatorRuntime
- Allow users to provide a custom SimulatorRuntime
- Allow sub-classing of TransientMemory
- Check if Applet#register() is called excatly once during applet
  registration
- Distinguish between loaded applets (GP modules) and applet instances
- Add synchronized blocks to Simulator
- Set SimulatorRuntime members to protected
- Add constructor to JavaxSmartCardInterface
- Update javadoc plugin
- Add package-info
- Fix javadoc links for javax.smartcardio.*
Move jcardsim.org documentation to git repository
- Simplify language in documentation
- Update URL of "Code Conventions for the Java Programming Language"
- Use CLA=0x00 instead of 0x01
- javadoc: Remove empty "p" tags
- javadoc: Add "." to first sentence
- javadoc: Fix errors detected by Java 8's javadoc
- Allows insertion and removal of cards at runtime
- Add CardSimulator class, a Simulator which can
  be assigned to a CardTerminal
- Fix threading issue in SimulatorRuntime
- Add test case for JavaCardRemoteServer
- Update documentation
Add new TerminalFactory API: CardTerminalSimulator
@slomo
Copy link
Contributor Author

slomo commented Jan 19, 2015

The current state is not ready to merge, but I would like to have some feedback on the general approach. There are at least two ToDos from my point of view:

  • add test
  • remove code duplication

In general it should be checked whether further values are affected and or whether the context stack can be implemented in such a way that the whole simulator environment is affected.

@slomo
Copy link
Contributor Author

slomo commented Feb 2, 2015

The sematic of my implementation is actually wrong. According to the jcre spec (section 6.1.3) only if the package of the calle and caller are different the previousAID should be changed. While the currentAID should be changed always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JCSystem.getAid() doesn't work for Shareables
4 participants