The applet can be used not only with PKCS 7 signature type but also more advanced signature types of CAdES and XAdES. The classes in package light
is created for PKCS 7 signature and common
and smartcard
library files are sufficient for the applet to run properly.
For advanced signatures, the other classes in the applet module must be used and more libraries must be included. The list of required libraries takes place main.jsp
. There two applet codes in “main.jsp” one of which is for PKCS 7 and the other for advanced signatures. You can activate the code of the one and comment out the other.
The variable signatureFormat
in the main class (WebLoginApplet
) must be used to specify the type of the signature when using advances signatures. (CAdES or XAdES).
The code segment for PKCS 7 signature is as follows:
< applet name="webloginapplet" code="tr.gov.tubitak.uekae.applet.light.LightApplet" archive= "new-applet.jar, lib/ma3api-common-1.4.16.jar, lib/ma3api-smartcard-1.4.16.jar, lib/slf4j-api-1.6.6.jar, lib/slf4j-log4j12-1.6.6.jar, lib/log4j-1.2.17.jar, a.jar" width="0" height="0" MAYSCRIPT> </ applet>
The code segment for advanced signatures is as follows:
< applet name="webloginapplet" code="tr.gov.tubitak.uekae.applet.WebLoginApplet" archive= "new-applet.jar, lib/ma3api-asn-1.4.16.jar, lib/ma3api-certstore-1.4.16.jar, lib/ma3api-certvalidation-1.4.16.jar, lib/ma3api-cmssignature-1.4.16.jar, lib/ma3api-common-1.4.16.jar, lib/ma3api-crypto-1.4.16.jar, lib/ma3api-crypto-gnuprovider-1.4.16.jar, lib/ma3api-crypto-sunprovider-1.4.16.jar, lib/ma3api-infra-1.4.16.jar, lib/ma3api-signature-1.4.16.jar, lib/ma3api-smartcard-1.4.16.jar, lib/ma3api-xmlsignature-1.4.16.jar, lib/akiscif-2.4.7.jar, lib/asn1rt-6.42.jar, lib/slf4j-api-1.6.6.jar, lib/slf4j-log4j12-1.6.6.jar, lib/log4j-1.2.17.jar, a.jar" width="0" height="0" MAYSCRIPT> </ applet>