简体   繁体   中英

windows-my certificate store equivalent linux

I have a pfx file which I've stored on my windows machine. I'm able to access it in my java program using

http://www.oracle.com/technetwork/articles/javase/security-137537.html

However, is there some kind of equivalent way I can install and access the certificate in java on a linux platform?

I also saw this link: Linux equivalent for the Windows certificate store

Are these accessible in a java api?

Reading your link and several post here and here , there is no available system keystore for linux in a similar way to Windows. There is only an historical OpenSSL convention to store in the filesystem certificates /etc/ssl/certs and keys /etc/ssl/private

Therefore, it is needed to install an extra package to manage keys. I have found

Mozilla Firefox Keystore

Java applications launched from browsers (almostd deprecated) applets that needed to access user's keystore, got certificates from Mozilla Firefox's keystore. You can use it also from a Java local application. See http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/keystores.html

  1. Create jss directory under Mozilla's installed directory.

  2. Copy JSS JAR file into the jss directory.

  3. Copy JSS native library .so into Mozilla's installed directory.

  4. Set environment variable MOZILLA_HOME to Mozilla's installed directory in Mozilla's launch script.

  5. Change environment variable LD_LIBRARY_PATH to include Mozilla's installed directory in Mozilla's launch script.

In this blog is also explained (spanish)

This is a well-known alternative to get a managed keystore on Linux without using the filesystem.

Gnome keyring

I have found this project, but I can not make sure it works properly. It has a PKCS#11 interface, so it should be accesible from Java using the suitable driver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM