jar-signing

XMLBeans jar can't be signed when imported from custom class

妖精的绣舞 提交于 2019-12-07 04:46:59
问题 In NetBeans I created an Exporter class that exports some data to an EXCEL file using APACHE POI, which uses XMLBeans. I added the APACHE POI 3.10.1 libraries by downloading the zip binaries and adding the jars manually. When I use this class inside the same project, everything runs correctly. Then I added this class to another project, via right click Libraries -> Add Project. But when I tried running this I got the following error while compiling. Signing JAR: C:\Users\c\p\dist\lib\xmlbeans

Verifying an APK programmatically using JarSigner

耗尽温柔 提交于 2019-12-06 12:47:44
问题 I want to use verify an APK from Java code using JarSigner. I am writing an app that programatically installs APKs (much like Google Play) and before installing it checks for the following: Verify the signature of the .SF file itself.Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest. Verify the digest listed in each entry in the .SF file with each corresponding section in the manifest. Read each file in the JAR file that has an entry in the

Sign a jar file created with maven-assembly plugin

情到浓时终转凉″ 提交于 2019-12-06 06:18:10
问题 I'd like to build an assembly and then sign it. My problem is that the jarsigner signs not the assembly, only the standalone jar file. Could you tell me what is the problem? Maven seems like 'magic' to me after having used Ant for years.. I can't see the way the plugins cooperate and pass information to each other. After executing mvn install , I get two jar files, one called example-1.0.0-SNAPSHOT.jar and this is signed, and one called example-1.0.0-jar-with-dependencies.jar and this is not

EV Code Signing extremely slow

烈酒焚心 提交于 2019-12-05 20:57:42
问题 Since February, GlobalSign only issues EV Code Signing certificates. This means that code signing has to be done with a hardware token (Safenet USB eTokens). Since I had to switch to EV Code Signing, I noticed a huge time increase while signing my application. From a few minutes with a regular java keystore, to over 40 minutes with the eToken. According to the GlobalSign site, I should sign my jars as following: jarsigner -keystore NONE -storetype PKCS11 -tsa http://timestamp.globalsign.com

Can Maven re-sign dependencies?

懵懂的女人 提交于 2019-12-05 20:10:52
I'm using maven-jarsigner-plugin to sign a shaded uber-jar of mine. I do need to distribute some dependencies in their own jars though, and want to take those jars from a Maven repo, clear them of any existing signatures, and sign them with my own certificate. Are there any Maven plugins that do this, or would i involve some Ant plugin hackery? Turns out maven-jarsigner-plugin can re -sign existing jars using it's removeExistingSignatures config element. So simple! I use maven-dependency-plugin to copy artifacts into a .war project in the generate-resources phase, then sign them in the process

Restrict java to only execute signed jars?

爱⌒轻易说出口 提交于 2019-12-05 19:59:15
Java jars can be signed with the JDK jarsigner tool. This, in conjuction with the policytool, appears to only allow you to add privileges to the jar when it is run. I would like a default "Revoke access to run." Is it possible to make java do white-listing in such a way that only jar files that have been signed by a certain set of certificates are allowed to run at all? h22 As I understand, this is on your computer you can control. Use java -Djava.security.manager YourApplication when starting the application. This installs the default security manager that can be configured through policy

XMLBeans jar can't be signed when imported from custom class

∥☆過路亽.° 提交于 2019-12-05 10:25:12
In NetBeans I created an Exporter class that exports some data to an EXCEL file using APACHE POI, which uses XMLBeans. I added the APACHE POI 3.10.1 libraries by downloading the zip binaries and adding the jars manually. When I use this class inside the same project, everything runs correctly. Then I added this class to another project, via right click Libraries -> Add Project. But when I tried running this I got the following error while compiling. Signing JAR: C:\Users\c\p\dist\lib\xmlbeans-2.6.0.jar to C:\Users\c\p\dist\lib\xmlbeans-2.6.0.jar as nb-jfx jarsigner: unable to sign jar: java

Signing java 11 jar with jarsigner duplicate entry module-info.class

北慕城南 提交于 2019-12-05 09:58:13
Hi I am new with java modules so this might be a dumb question. I was trying to sign my jar file with keystore and got the following error. user@Ubuntu:libs(master)$ jarsigner -keystore keyStoreFileName Test.jar alias Enter Passphrase for keystore: jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: module-info.class I couldn't find any documentation of how to avoid this. So I did jar -tf to check the content of the jar and yes, it does have multiple module-info.class files Is there any option to combine them? and how? my module-info.java contains the following. module

“Package not signed correctly” appearing for some users

一世执手 提交于 2019-12-05 04:58:58
I have an app on Google Play for years that has seen countless updates. The latest update (the first one in a while) fails to install for some people, they simply get the "Package not signed correctly" error message. It works for my Android devices I have at home. I'm building and signing with a custom build system that basically boils down to calling ant release , followed by jarsigner -verbose -keystore $(keystore) -storepass $(storepass) $(appname).apk $(alias) zipalign -v 4 $(appname).apk $(finalname).apk That has worked for years, there were no changes to the build system or keystore, I

Signing a jnlp in order to get rid of the Security Warning

匆匆过客 提交于 2019-12-05 00:02:52
问题 I am developing at a company where a jnlp file is used to start a swing web based java application. It has plenty of jars that are downloaded to the client's jvm cache. When I updated my jvm to its currently latest version (build 1.7.0_45-b18) I started seeing the security warning below when I try to run the jnlp file: After I saw this error and read this article about signing jnlp files from oracle site( Signing JNLP files) then I added three things to the project: A JNLP-INF folder