truststore

JVM to ignore certificate name mismatch

北战南征 提交于 2020-01-02 09:27:33
问题 I know there were a lot of questions/answers about how to ignore SSL error in the code. On our dev region dev.domain.tld we have configured a app server over SSL. The certificate that is displayed is for somedev.domain.tld . There is no way to change the certificate, it will always be a domain mismatch. So when I deploy a web-service to https://dev.domain.tld and try to connect/call my webservice I get an exception: Caused by: java.security.cert.CertificateException: No name matching dev

Java - asymmetric encryption of traffic with pre-shared public keys and without trust store hassles

二次信任 提交于 2020-01-01 07:13:07
问题 I'm trying to communicate using RSA preshared keys and, ideally, without involving truststore shenanigans The setup is basically like this: There's an applet on client side and a servlet on server side (duh :) ) The applet has servlet's RSA public key (Spub) hardcoded. The servlet has it's own RSA private key (Spriv) hardcoded. They applet generates a random AES 256 key (session key), encrypts it with servlet's public key (which it has hardcoded), connects to the servlet over a TCP socket and

SSLHandshakeException: Trust anchor for certification path not found. Only on Android API < 19

那年仲夏 提交于 2020-01-01 05:21:47
问题 I'm having issues with the https connection to a server with a self signed certificate on devices < api 19. I followed this guide published by android for trusting self-signed certifcates Android SSL and it seems to work fine with all the api>19 devices i tested. How ever i keep getting the "Trust anchor for certification path not found" error on pre 19. I've created the keystore using keytool and doesn't seem to be the problem because is working on some devices. This is my code: URL url_uri

Setting multiple truststore on the same JVM

谁说我不能喝 提交于 2019-12-28 04:09:06
问题 I have an Java application running on a weblogic server. The application has two distinct modules which use SSL to connect to external web services - let's say module A and module B. Module A - Built on Axis - Uses truststore A Moudle B - Built on Spring-ws - Uses truststore B. Module A is existing. Module B is being introduced. I need to be able to set the truststore dynamically in the JVM based on which module is being invoked. Due to some constraints I do not have the option - to create a

Is it possible to get Java to ignore the “trust store” and just accept whatever SSL certificate it gets?

独自空忆成欢 提交于 2019-12-28 01:56:30
问题 I am trying to write an SSL client that sends mail using the javax.mail API. The problem I am having is that the server request that I use SSL, but the server is also configured with a non-standard SSL certificate. The web pages I have found say that I need to install the certificate into the trust store. I don't want to do that (I don't have the necessary permissions.) Is there a way to get Java to just ignore the certificate error and accept it? Failing that, is there a way to have the

Truststore and Keystore Definitions

大城市里の小女人 提交于 2019-12-27 11:37:32
问题 What's the difference between a keystore and a truststore? 回答1: A keystore contains private keys, and the certificates with their corresponding public keys. A truststore contains certificates from other parties that you expect to communicate with, or from Certificate Authorities that you trust to identify other parties. 回答2: A keystore contains private keys. You only need this if you are a server, or if the server requires client authentication. A truststore contains CA certificates to trust.

Does JSSE use a certificate in a PrivateKeyEntry as a trust anchor?

跟風遠走 提交于 2019-12-25 06:44:49
问题 If a key store containing one or more PrivateKeyEntry is specified as a trust store, will JSSE create a trust anchor from the end-entity certificate in each of those entries? In other words, is it enough to have a certificate under a PrivateKeyEntry if we have one keystore with both trusted and private entries? Or, must we also add that certificate as a TrustedCertificateEntry ? 回答1: It doesn't matter where certificate placed either under PrivateKeyEntry or under trustedCertEntry , JVM trusts

Exporting SSL Certificate in Linux Browser (or Linux Command Line) for Java Certificate Truststore

霸气de小男生 提交于 2019-12-25 00:36:06
问题 Background: I am having some trouble consuming a Web Service with ColdFusion 9 (peer not authenticated). First, I'm going to try importing the cert into ColdFusion's underlying Java keystore. If that doesn't work, I'm going to try to fiddle with ColdFusion's security provider. But my questions are more specific... Question: How do I export the cert (at the right level) in Chrome (or Linux CLI), and in which format? Details I have seen some instructions for exporting a cert from a browser, but

Spring Boot | How to update Truststore dynamically?

孤人 提交于 2019-12-22 05:23:38
问题 I have currently implemented mutual TLS in my Spring Boot application and I am doing it programatically, like so: @Bean public ServletWebServerFactory servContainer() { TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); TomcatConnectorCustomizer tomcatConnectorCustomizer = new TomcatConnectorCustomizer() { @Override public void customize(Connector connector) { connector.setPort(8443); connector.setScheme("https"); connector.setSecure(true); Http11NioProtocol protocol

SSL connection to MySQL server with Java

青春壹個敷衍的年華 提交于 2019-12-22 05:11:25
问题 I am trying to connect to a MySQL server using Java over SSL. I am getting the following exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Cannot connect to MySQL server on www.mysite.com:3306. Make sure that there is a MySQL server running on the machine/port you are trying to connect to and that the machine this software is running on is able to connect to this host/port (i.e. not firewalled). Also make sure that the server has not been started with the --skip