keystore

using safenet LUNA Api with eclipse (LunaTokenManager)

放肆的年华 提交于 2019-12-12 01:46:23
问题 I have implemented a test unit to load Luna keystore but something is wrong when i try to initialize the "LunaTokenManager": public static void main(String[] args) { try { LunaTokenManager tokenManager = LunaTokenManager.getInstance(); } catch (Throwable t) { t.printStackTrace(); } } i got the following message: java.lang.UnsatisfiedLinkError: com.chrysalisits.crypto.LunaAPI.Initialize()V at com.chrysalisits.crypto.LunaAPI.Initialize(Native Method) at com.chrysalisits.crypto.LunaTokenManager.

Java Server SSL with different storepass and keypass

限于喜欢 提交于 2019-12-11 19:47:09
问题 I create with Keytool a serverkeystore.jks with 2 different pwd for store and key, but i get java.security.UnrecoverableKeyException: Cannot recover key unless I edit one of them and put the same value in both How can i modify my code to allow 2 different pass? : SSLServerSocket sslserversocket=null; try { System.setProperty("javax.net.ssl.keyStore", serverKeyStore); System.setProperty("javax.net.ssl.keyStorePassword", pwdStore); SSLServerSocketFactory sslserversocketfactory =

Eclipse Export Android apk hanging

时光毁灭记忆、已成空白 提交于 2019-12-11 18:36:27
问题 I have a problem that when exporting an APK with Eclipse it just hangs and doesn't complete. When I shut down Windows I see an error message saying "Enter keystore password:" but without offering an input box. What can I do? 回答1: I discovered that the problem was that the keystore password I was entering contained these characters: $ £ % ! " I'm not sure which character caused the problem, but after choosing a password that didn't contain any of these characters, the problem stopped occurring

SSLContext. Should I reload it?

坚强是说给别人听的谎言 提交于 2019-12-11 10:28:23
问题 I am interested in updating a truststore dynamically. What would be the best option? Reload SSLContext or is it possible to recreate TrustManagers ? 回答1: You can't 'reload' an SSLContext , but you can certainly create a new one. A custom TrustManager won't help, as it is the underlying TrustManagerFactory that has the connection to the keystore, not the TrustManager . 来源: https://stackoverflow.com/questions/13173610/sslcontext-should-i-reload-it

Java KeyStore duplicate aliases

家住魔仙堡 提交于 2019-12-11 09:54:46
问题 I have a Java KeyStore with couple of entries sharing the same alias (duplicates). When I do a getEntry(...) or getCertificate(...) or getKey(...) , I always get the first entry in all the cases. How do I always get the ones that I want? I have tried exporting the first entry to an external file (using keytool ), and then deleting the first entry from the original KeyStore, and then importing back the exported entry with a different alias. This would work if the entry is a Trusted Certificate

Is there a way that I can do Mutual SSL without direct acces to the Websphere keystore in Java?

流过昼夜 提交于 2019-12-11 09:05:43
问题 I'm trying to establish Mutual SSL between 2 Websphere 8.5.5 servers. I'll just call them ServerA and ServerB. ServerA: Client side, added ServerB's SSL certificate into DefaultTrustKeyStore. ServerB: Server side, added ServerA's SSL certificate into DefaultTrustKeyStore. I also installed a WAR which provide a servlet that could receive HTTP POST message, log it, and response "OK" to client. Client Auth mode set to "Required". Now I got a problem: traditional way of Mutual SSL client side

From certificate Alias to PEM File with private key included using Java

廉价感情. 提交于 2019-12-11 07:32:34
问题 I have this code to generate a CER file using the alias: public class TestFromAliasToCER { public static final int KEY_SIZE = 1024; public static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----"; public static final String END_CERT = "-----END CERTIFICATE-----"; public final static String LINE_SEPARATOR = System.getProperty("line.separator"); public static void main(String[] args) throws FileNotFoundException, IOException, NoSuchAlgorithmException, NoSuchProviderException,

convert CertStore into X509Certificate[ ] array JAVA

六眼飞鱼酱① 提交于 2019-12-11 06:26:58
问题 I made a cert store and want to add another certificate from another function in this class. Make chain in class 1 with caCert and intermediateCert : List<X509Certificate> certList = new ArrayList<X509Certificate>(); certList.add(0, interCert); certList.add(1, caCert); Store<X509Certificate> certs = new JcaCertStore(certList); certStore = new JcaCertStoreBuilder().addCertificates(certs).build(); I want to add a new build user certificate in class 2: certStore = new JcaCertStoreBuilder()

Kurento - Configure Java applications to use https - keystore error

假如想象 提交于 2019-12-11 06:08:41
问题 Generated keystore and configured in application.properties file as given in this link - http://doc-kurento.readthedocs.io/en/stable/mastering/securing-kurento-applications.html But still facing error - java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) ~[na:1.7.0_101] at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) ~[na:1.7.0_101] at java.security.KeyStore.load(KeyStore

SSL Servlet Implementation Issue : received a record that exceeded the maximum permissible length

点点圈 提交于 2019-12-11 06:04:34
问题 I am having problem using SSL with my application. I did the following: I added the following passage to my security-contraint tag: <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> and added the following in my Server.xml in Tomcat <Connector port="8443" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="true" disableUploadTimeout="true" acceptCount="100" debug="0" scheme="https" secure="true" clientAuth="false"