InWebApplication UsageAppletSometimes it is a good choice, for example, inFlexYou can add the special upload functionAppletAs an alternative. WhileAppletWhen you need to access local resources, you need to be recognized by the customer's machine. Naturally, we will think of digital signatures in network knowledge (Digital Signature). AndJava AppletIs more convenient.
Before the digital signatureAppletExport applicationsJarPackage, and then mainly useJava SEProvided inKeytool.exeAndJarsigner.exeTool. The former is used to generate the keystore and export the certificate, and the latter is usedApplet jar.
When signing, we can find a directory at willJarIn the folder, enter the folder in the Command window, execute the relevant commands in sequence, and enter the password information. During execution, we will find that a keystore file is generated under the corresponding directory (StoreSuffix) and a certificate file (CERTSuffix ).
The Red Shadow part is the name of the keystore, and the end isStoreThe orange shadow part is the alias of the keystore, the green shadow part is the exported certificate, and the end isCERTThe blue part is manually exported and placed in the corresponding folderJarPackage. You can name the shadow part by yourself.
The key password entered for the first time. The certificate and signature will be exported later.JarPackage is required. The first step is to enter the name, unit, and other information required to generate the key.
After the signature is complete, you can directlyJarUsed in the project. First loadAppletThe browser will ask the customer to confirm the certificate (as shown in ). The client user can access local resources after being trusted.
This article introducesJavaTools and usage of digital signature, you can use the content of the first image to complete the correspondingJarThe package's digital signature, and thenJarFiles can be directly applied after you enter the project. For more information, see connect below.
Refer:
Digital Signature
Http://baike.baidu.com/view/7626.htm
Http://en.wikipedia.org/wiki/Digital_signature
Java Applet Digital Signature
Http://www.cnblogs.com/tqsummer/archive/2011/01/19/1939013.html
Http://blog.csdn.net/shangdyu/article/details/6992568
Http://blog.csdn.net/border1985/article/details/666710
Https://www.owasp.org/index.php/Digital_Signature_Implementation_in_Java