jsse

scp via java

若如初见. 提交于 2019-11-26 19:44:38
What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer. Tim Howland I ended up using Jsch - it was pretty straightforward, and seemed to scale up pretty well (I was grabbing a few thousand files every few minutes). shikhar plug: sshj is the only sane choice! See these examples to get started: download , upload . Take a look here That is the source code for Ants' SCP task. The code in the "execute" method is where the

javax.net.ssl.SSLException: Received fatal alert: protocol_version

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 17:49:43
Has anyone encountered this error before? I'm new to SSL, is there anything obviously wrong with my ClientHello that I'm missing? That exception is thrown with no ServerHello response. Any advice is appreciated. *** ClientHello, TLSv1 RandomCookie: GMT: 1351745496 bytes = { 154, 151, 225, 128, 127, 137, 198, 245, 160, 35, 124, 13, 135, 120, 33, 240, 82, 223, 56, 25, 207, 231, 231, 124, 103, 205, 66, 218 } Session ID: {} Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA

No cipher suites in common while establishing a secure connection

╄→尐↘猪︶ㄣ 提交于 2019-11-26 16:39:56
问题 I'm trying to establish a secure connection between two Java projects but I'm getting a SSLHandshakeException (no cipher suites in common). This are the methods to create sockets in both sides: Client: private SSLSocket getSocketConnection() throws SSLConnectionException { try { /* Load properties */ String keystore = properties.getProperty("controller.keystore"); String passphrase = properties.getProperty("controller.passphrase"); String host = properties.getProperty("controller.host"); int

How to override the cipherlist sent to the server by Android when using HttpsURLConnection?

不想你离开。 提交于 2019-11-26 12:43:38
问题 During TLS negotiation, clients send a list of supported ciphers to the server, the server picks one, and encryption starts. I want to change this cipherlist sent to the server by Android, when I\'m using HttpsURLConnection for communication. I know that I can use setSSLSocketFactory on the HttpsURLConnection object to set it up to use a SSLSocketFactory . This is useful when I want to change the trustmanager etc used by the SSLSocket returned by the SSLSocketFactory . I know that in general

java - path to trustStore - set property doesn't work?

橙三吉。 提交于 2019-11-26 09:21:31
问题 I\'ve setup a self-signed certificate to test an ssl java connection - however, it is refusing to locate the java trustStore. I\'ve saved copies of it in /Java/jre6/lib/security in addition to the folder where the classes are compiled to (im using netbeans) and also to /java/jre6/bin none of the above appears to work, because when i run the following - trustStore = null. public class ShowTrustStore { public static void main(String[] args) { System.setProperty(\"javax.net.ssl.keyStore\", \

scp via java

你说的曾经没有我的故事 提交于 2019-11-26 08:59:15
问题 What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer. 回答1: I ended up using Jsch- it was pretty straightforward, and seemed to scale up pretty well (I was grabbing a few thousand files every few minutes). 回答2: plug: sshj is the only sane choice! See these examples to get started: download, upload. 回答3: Take a look

Registering multiple keystores in JVM

淺唱寂寞╮ 提交于 2019-11-26 08:49:24
问题 I have two applications running in the same java virtual machine, and both use different keystores and truststores. A viable option would be use a single keystore and import all the other ones into the shared keystore (e.g. keytool -import), but it would really help my requirements if I could use separate keystores for separate applications running in the same jvm. I could set the keystore and truststores to be used as jvm parameters or system properties as follows: java -Djavax.net.ssl

How can I use different certificates on specific connections?

耗尽温柔 提交于 2019-11-25 22:26:06
问题 A module I\'m adding to our large Java application has to converse with another company\'s SSL-secured website. The problem is that the site uses a self-signed certificate. I have a copy of the certificate to verify that I\'m not encountering a man-in-the-middle attack, and I need to incorporate this certificate into our code in such a way that the connection to the server will be successful. Here\'s the basic code: void sendRequest(String dataPacket) { String urlStr = \"https://host.example