Reputation: 13
We are using JDK 1.7 for our project, it was working fine till last week but now it is failing with below error,
jarsigner: unable to sign jar: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
I came to know that this issue is due to the protocol used to communicate with time-stamp server, but I am not sure how to pass the parameter to jdk through pom.xml to enforce it to use TLSv1.2
My Pom.xml file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.project.dews.common</groupId>
<artifactId>CommonPom</artifactId>
<version>2.2-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>UserNameApplet</artifactId>
<version>2.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>User Name Applet</name>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestEntries>
<Trusted-Library>true</Trusted-Library>
<Permissions>all-permissions</Permissions>
<Codebase>*</Codebase>
<Caller-Allowable-Codebase>*</Caller-Allowable-Codebase>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>sign</goal>
<!--<goal>verify</goal>-->
</goals>
<phase>package</phase>
<configuration>
<keystore>src/main/keystore/keystore.ks</keystore>
<alias>85034585a-17b9-4a50-53e79d3a86345</alias>
<storepass>password</storepass>
<keypass>password</keypass>
<arguments>
<argument>-tsa</argument>
<argument>https://timestamp.geotrust.com/tsa</argument>
</arguments>
<!--<verbose>true</verbose>-->
<!--<certs>true</certs>-->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Build Error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jarsigner-plugin:1.4:sign (default) on project UserNameApplet: Failed executing 'cmd.exe /X /C ""C:\JAVA 7\jdk1.7.0_71\jre\..\bin\jarsigner.exe" -keystore src/main/keystore/keystore.ks -storepass ***** -tsa https://timestamp.geotrust.com/tsa -keypass ***** C:\2.X_Dev_Code_SVN\Project\Common\Applet\target\UserNameApplet-2.1-SNAPSHOT.jar 85034585a-17b9-4a50-53e79d3a86345"' - exitcode 1 ->
[INFO] jarsigner: unable to sign jar: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
I tried disabling TLSv1.0 and TLSv1.1 from java control Panel as well as disabled it using jdk.tls.disabledAlgorithms= SSLv2Hello, SSLv3, TLSv1, TLSv1.1 from java.security but I failed on both the cases and also for me I need to fix the issue only from the pom.xml.
Any suggestion to solve this problem would be much appreciated.
Upvotes: 1
Views: 464