Install extended applet on JavaCard - applet

How can I deploy an extended Java-Card-applet to my card?
Until now I've only dealt with classic applets and installed them with GlobalPlatformPro under OS X.
However, when I try to install an extended applet (using gp -install KCIdentity.eap) it fails with the following message:
Exception in thread "main" java.lang.RuntimeException: Could not figure out the package name of the applet!
at pro.javacard.gp.CapFile.<init>(CapFile.java:94)
at pro.javacard.gp.CapFile.<init>(CapFile.java:65)
at pro.javacard.gp.GPTool.main(GPTool.java:441)
Does anyone know how I can deploy my applet to my card (ideally using OS X, but Debian or Windows is also OK)?
Edit: Link to GlobalPlatformPro: https://github.com/martinpaljak/GlobalPlatformPro
Update:
This has nothing to do with extended APDUs but with the Java-VM-version. Classic applets use version 2.x whereas extended applets use version 3.y. NetBeans packages the extended applets in an *.eap-file which doesn't seem to be supported... However I'll look if I can package it in an *.cap-file. Renaming didn't work...

I guess with "extended applet" you are refering to an applet that Extended Length APDUs. To use extended length APDUs the Applet must implement the ExtendedLength interface fomr the standard javacard package. Otherwise the applet will return with 0x6700 to extended Length APDUs.
However, GP says that the package name could not be determined, so I suppose you did not properly convert/compile the CAP file. Therefore you should review your compilation process.
I suppose the .eap is a typo? Otherwise change that to .cap, which is the standard format for downloading applets to the card.
edit: answer in the comments.
edit: the reason turned out to be that the card does not support the connected edition. Javacard3 is divided into classic edition(basically an update on the Javacard 2.2.2 API) and the connected edition(new mechanisms like Webserver applets etc...).

Related

How to reference a specific DLL for functionality in said DLL

Good day,
I have an application that I developed that transfers files between two machines ("site" and "server"). This application was set to target dotNet 3.5. Furthermore, I am using Renci.SshNet to handle the connections between the machines and the transferring of said files.
The issue that I am facing currently though is that about 70% of the "site" machines do not have a standard dotNet and is also quite old; thus these machines do not support all the required functionality as the external dll makes calls to System.Threading.WaitHandle.WaitOne() and System.Threading.WaitHandle.WaitAny(WaitHandle[], Int32) and other overloads of these methods.
The workaround that I have for this though is to install netfx20SP2 or netfx30SP1, yet I am not in the position to perform this update on all machines as they are scattered across the country and have data limitations (bandwidth and cap).
What I want to do possibly is to embed the System.Threading dll that I have downloaded and then the application should use those classes instead, or alternatively just point the application to use the said dll.
Is this at all possible, or do you have to load the dll into the GAC? And also, will it be possible to "run" this higher version of System.Threading in the application while the system itself is on a lower framework version. Something is telling me that the best bet will be to actually run the service pack installation to avoid unnecessary coding but I'm not sure exactly how to approach this.
Thank you in advance for any assistance / suggestions,
JD
To allow the execution of an application that, let's say, targets .Net 4; while the machine itself only has let's say, .Net 3.5, installed, one can redirect Windows to check the local (executing) directory for dlls that should contain the required symbols loaded into memory instead of the default symbols that get loaded upon execution (the default would be the NetFx installed on the machine - which I believe the highest version of the framework that can be found upon loading when the execution starts or would be the highest available version that is lower or equal to the targeted framework).
This file's contents (myApp.exe.local) are ignored. It is just there to tell Windows to
look in that folder for the applicable symbols and if not found, the system will roll back to attempt to load these symbols from the NetFx directory.
Read more at Microsoft Dev Center - Docs (link is attached to the following paragraph which is a Copy-Paste of a section of this document).
To use DLL redirection, create a redirection file for your application. The redirection file must be named as follows: App_name.local. For example, if the application name is Editor.exe, the redirection file should be named Editor.exe.local. You must install the .local file in the application directory. You must also install the DLLs in the application directory.

typo3 8.7.9 - download language package and update extension list failed

I already installed TYPO3 8.7.9, changed the language to german but can't download the language pack. It says:
Error
The request has failed.
Also if I change the dropdown in Extensions to Get Extensions it says:
Update Extension List
Could not access remote resource https://repositories.typo3.org/mirrors.xml.gz
I'm using MAMP on Windows 7. Also in the System environment check there are four orange issues which - I thought - already fixed in the php.ini:
Low PHP script execution time
PHP max_input_vars very low
Windows apache thread stack size
PHP extension fileinfo not loaded
Do you think it had something to do with "curl"? It often appears during my Google research.
I would be pleased if someone could help me :)
I can access this file via browser, so it's available. A missing curl could be the problem, you're right.

New to Mono - help setting search path?

Running Ubuntu Oneric 11.10 with 1 GB RAM and 250 GB HDD Dell Inspiron Laptop.
I got some demo code from a tutorial to read XML. When I compile it, I get this message:
"The type or namespace name '.Xml' does not exist in the namespace 'System'. Are you missing an assembly reference?" (using System.Xml;)
I have the library in this path: /usr/lib/mono/gac/System.Xml/4.0.0.0_b77a5c561934e089/System.Xml.dll
Are you using MonoDevelop to build your application? If so, make sure that there is a reference to System.Xml in your project.
In case you are hardcore enough to "manually" use dmcs to build your application (or you are using a Makefile or some other automated build process), make sure you pass /r:/usr/lib/mono/4.0/System.Xml.dll as one of the arguments to your dmcs build command.
Only for didatic purposes, here is the references editing option in MonoDevelop, in which you should choose to add a reference:
Note: your distro could have installed System.Xml.dll in another path, so please verify.
Your monodoc problem is an entirely different issue and probably means either a directory or file is missing from the installed docs or there is a bug in monodoc entirely

Linking Qt Libraries to a Cmake project (in eclipse)

so what I'm trying to do is utilize a simple Qt application IN eclipse without using the eclipse QT plugin by linking the required libraries through the GCC C++ Linker. However, I have been unable to locate the exact name of the library to use, or which libraries will be necessary. I've located the path of the Qt library my application seems to be accessing, but I continue to get an error when building that just says "-lqt" doesn't exist/can't find, etc.
The reason I'm doing this is because I'm building a simple game in OGRE for a project at the uni and wanted to use a Qt application for the GUI. Well, I didn't necessarily want too, but our professor wishes us to do so. Please don't suggest that I simply embed an Ogre widgit into my Qt application as this isn't an opti
Any ideas?
Thanks <3
Well, if you are using CMake then it should take care of everything provided that you instructed it to do so. phb provided a link to even better instructions.
First step is to instruct the CMake that we need Qt for our project. This is done with (you can specify individual parts that are needed as well):
find_package(Qt4 REQUIRED)
If Qt is not found in the typical locations (e.g. QTDIR is not set) - cmake will fail.
You also have to instruct CMake to use Qt include paths and set certain compiler definitions:
include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})
Finally, for each target you need to tell that you'd like to link with Qt libraries:
target_link_libraries(foo ${QT_LIBRARIES})
You might also want to process your headers and will have to process the user interface files with moc. For the details please refer to the provided links.
In addition to provided links you can have a look at the comments at the top of FindQt4.cmake file.

Websphere Application Server 6.1 (localized): Override locale for console messages

I have installed RAD 7.5 (based on Eclipse Ganymede 3.4.0) in Spanish. I'm working with Websphere Application Server 6.1 (spanish too).
The problem I have is that all console messages appear in Spanish, but translation is, in my personal opinion, quite poor (especially since even the console errors are displayed in Spanish and it's difficult to find documentation about exact error messages).
I want to start the IDE in the original language (English) and I know that there is a command line switch -nl en that, placed beside eclipse executable path on program shortcut, serves for this purpose. But I'm still getting some resources' labels (e.g. "Tasks" tab) into spanish (tab says "Tareas"), also server console still displays messages in spanish.
[UPDATE: Yesterday the client for whom I work, changed my PC for a more powerful one, and the untranslated tabs problem does not occur anymore (the new PC has Windows 7 and the previous one was XP, maybe it's that)]
My question is: Does anyone know how I could get WAS console messages displayed 100% in English, overriding locale specified at setup time? Is there some command line switch that serves to get this? Is there any way to edit WAS config files to achieve this?
Note: It is impossible to reinstall RAD and WAS, because of some restrictions on my computer.
Thanks in advance.
Web Console:
To change web console messages you have to set english as web browser's preferred language.
Log messages:
WebSphere logging/tracing mechanism are build upon Java's standard library ResourceBundle/Locale classes.
Localized messages are stored inside WebSphere jars
(example: com.ibm.ws.naming.util.WsnMessages_es.class).
So to change the console language you have to change JVM default locale's language.
In WebSphere Console:
[Application Server] \ Server Infrastructure \
Java and Process Management\
Process definition \
Java Virtual Machine \
Generic JVM arguments
Add parameter : -Duser.language=US
This method changes JVM's configuration so it can have impact on you application.