![Magtek Universal SDK Скачать руководство пользователя страница 10](http://html1.mh-extra.com/html/magtek/universal-sdk/universal-sdk_programmers-manual_3704653010.webp)
2 - How to Set Up the MagTek Universal Project
MagTek Universal SDK| For MMS Devices | Programmer’s Manual ( Java )
Page 10
JNLP file or HTML page that starts your RIA. If the files are not in the locations identified, the RIA is
blocked. Set this attribute to the domains where the JAR file, JNLP file, and HTML page are located. To
specify more than one domain, separate the domains by a space, for example:
Application-Library-Allowable-Codebase: *.yahoo.com *.google.com
*.magtek.com *
For more information regarding the JAR File Manifest Attributes for Security, please visit this website
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/manifest.html
In order to modify the Manifest file, please follow these steps
.
1)
Find installation folder by default, the installation folder is:
...\Library
2)
Launch the command prompt and extract the META-INF/MANIFEST.MF from the jar file.
jar xf mtusdk.jar META-INF/MANIFEST.MF
3)
Open
MANIFEST.MF
and look for the
Caller-Allowable-Codebase
and
Application-Library-
Allowable-Codebase
and add your website URL to the list like the example above.
4)
Update the manifest to the jar file.
jar umf META-INF/MANIFEST.MF mtusdk.jar
2.4
How to Sign JAR
These instructions provide an overview of obtaining and using Sun Java signing and a digital certificate.
1)
Make sure your machine has the latest Java JDK installed.
2)
Generate a public/private key pair by entering the following command, specifying an alias for your
keystore:
keytool -genkey -keyalg rsa -alias MyCert
3)
Generate a certificate signing request (CSR) by entering the following command:
keytool -certreq -alias MyCert
After prompting you to enter the password for your keystore, keytool will generate a CSR
.
4)
Save the certificate received from the Certificate provider as Certname.p7b.
5)
Import your Digital Certificate by entering the following command:
keytool -import -alias MyCert -file Certname.p7b
In this string, keytool is requested to import the Digital ID “Certname.cer” into the keystore MyCert.
6)
Bundle your applet into a Java Application Resource (JAR) file by entering the following command:
jar cvf C:\mtusdk.jar
7)
Sign your applet by using jarsigner to sign the JAR file, using the private key you saved in your
keystore:
jarsigner C:\mtusdk.jar MyCert
8)
Verify the output of your signed JAR file by entering the following command:
jarsigner -verify -verbose -certs C:\mtusdk.jar