Skip to content

Patched Java keytool for supporting importing certificates using a given crypto provider

Notifications You must be signed in to change notification settings

koh-osug/java-keytool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

This is a patched keytool version supporting to import a certificate using a provider using the srcprovidername option.

The original keytool is always using the Sun default crypto provider which cannot import e.g. Brainpool elliptic curve certificates.

Maven Dependency

    <groupId>de.ohmesoftware</groupId>
    <artifactId>keytool</artifactId>
    <version>0.0.2</version>

Build

mvn clean install

To run the sample certificate import into a trust store run:

 mvn exec:java

Choose any password.

Before running the sample again, run mvn clean install again to delete the truststore.jks file.

Use of Keytool Option srcprovidername

java -jar keytool.jar -importcert -alias ci -file CERT_CI_ECDSA_BRP.der -keystore truststore.bks -srcprovidername BC -deststoretype BKS -destprovidername BC -providerPath bcprov-jdk15on-1.59.jar -v -providerClass org.bouncycastle.jce.provider.BouncyCastleProvider

Developer Notes

To prevent the collision with the classes contained in the standard JDK / JRE some classes were renamed: <className> -> <className>2.

Deployment + Release

See https://central.sonatype.org/pages/apache-maven.html

For Snapshots

mvn clean deploy

For Releases

mvn release:clean release:prepare
mvn release:perform

Release the deployment using Nexus See https://central.sonatype.org/pages/releasing-the-deployment.html Or alternatively do it with Maven:

cd target/checkout
mvn nexus-staging:release

About

Patched Java keytool for supporting importing certificates using a given crypto provider

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages