martinpaljak / GlobalPlatformPro

🌐 🔐 Manage applets and keys on JavaCard-s like a pro (via command line or from your Java project)
https://javacard.pro/globalplatform
GNU Lesser General Public License v3.0
673 stars 210 forks source link

Add an option to disable resetting card on disconnect #297

Closed gwachob closed 2 years ago

gwachob commented 2 years ago

Added the -R option to control whether card.disconnect() is called with true or false when shutting down. This can noticeably speed up the use of the CLI and is useful when repeatedly using the CLI and you do not need to reset the card between invocations.

martinpaljak commented 2 years ago

What would you think of having an environment variable (and jvm property) like GP_PCSC_RESET? In the long run I'd like to keep the command line interface to be only about "meaningful" actions/parameters.

gwachob commented 2 years ago

That would work for me. As long as I can put it on the command line when invoking from the jar (thats the jvm property approach, right?)

gwachob commented 2 years ago

Though I would point out that it disappears from the Help screen, for better or worse.

gwachob commented 2 years ago

Please see the updated change/commit.