help with NIO and SSL

64 byte By Deo_Jaiswala at 2007-10-1 14:20:30
hi,anyone have code for SSL with NIO.Thanks

No available certificate corresponds to the SSL cipher suites which are en

441 byte By jumbosa at 2007-10-1 14:21:56
Hi,I have a very hard problem creing a server ssl.When I try to create the server I receive the following message:"avax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled."Can anyone help me? How can I avoid this message?Excuse me for my very ...

EOFException when loading keystore file

5004 byte By tcatesa at 2007-10-1 14:34:15
I had my webapp running in secure mode with Jetty (5.1.3), and I hadn't tried it for a few days. Since then our install started using the jdk1.4.2.08 (not sure if that's relevant, but I think its the only thing that changed.)Now when I try to start an HTTPS listener, I'm getting the below ...

SSL Testing

491 byte By vikasatiflexa at 2007-10-1 14:41:08
Well we have implemented jsse 1.0.3 over sockets based connection from java classes. Wanted to know whether is there any way there can be a hacking test i.e. ethical hack where we are sure that the data which goes over the network is secure and cannot be tampered. The SSL theory and ...

clientHello and Handshake

3595 byte By mardela at 2007-10-1 14:42:30
Hi,I am a classic SSL client-server configuration. Server codes in c++ and client in java.At the time of the connexion, no problems. I can see :*** ClientHello, TLSv1RandomCookie: GMT: 1100257372 bytes = { 235, 112, 202, 221, 226, 62, 97, 171, 34, 20, 223, 2, 119, 86, 85, 107, 50, 43, 132, 63, ...

javax.net.ssl.SSLException:Connection shutdown:Unrecognized SSL message

6813 byte By man479a at 2007-10-1 14:52:35
Dear Sir,I am trying to connect apache server using SSLsocket connectionI have made trusted certificated and added it as ../linux-sun-jdk1.4.2/jre/lib/security/jssecacertsThe connection was working fine before, but suddenly it started giving messageError:javax.net.ssl.SSLException: Connection ...

could not generate DH keypair error

250 byte By tarun22_2000a at 2007-10-1 14:57:26
hi,My coding was running fine with JDK 1.41.3 but when i am trying to use jdk 1.5 its giving me an error"RuntimeException : Cound not generate DH keypair: in the method call sslSock.startHandshake();what could cause this ?

client authentication certificate selector for plug-in / webstart

1097 byte By brad_aza at 2007-10-1 15:11:43
Background:I am using the JRE 1.5 and rom Sun's 1.5 enhancements page at: http://java.sun.com/j2se/1.5.0/docs/guide/deployment/enhancements-1.5.0.htmlThis is a note at the bottom about: " This release provides interactive user interface in Java Plug-in and Java Web Start during HTTPS client ...

SSL Server - how "can I start without" flag

4178 byte By mcarlinga at 2007-10-1 15:15:18
The Server starts and run if I executing by typing followingjava -Djavax.net.ssl.keyStore=mySrvKeystore -Djavax.net.ssl.keyStorePassword=123456 EchoServerHow can I make it to run whitout the need of anny flags ?import java.security.KeyStore;import javax.net.ssl.SSLServerSocket;import ...

JSSE text-based Java browser and certificate

5025 byte By lngoa at 2007-10-1 15:18:03
Hello everyone. I am working on a text-based Java web browser to access a specific web page. However, I am having some trouble recognizing the certificate from this page. This is my error:THE HEADERS--Exception in thread "main" javax.net.ssl.SSLHandshakeException: ...

SSL HTTPS error

25266 byte By epicwintera at 2007-10-1 15:20:08
I am trying to post multi-part form data to an https url and receive the response. If I post to the site with my form data I get no response at all just a weird Premature EOF error . If I post to the site with no request data I get the html page as the response but I still get the weird ...

netscape.ldap.LDAPException: failed to connect to server 127.0.0.1:389 (91)

1929 byte By _SuperRookiea at 2007-10-1 15:21:55
HiI'm distorting with my body about a point.. ^^;======================= Tmax Jeus Jdk1.3.1_04 This error only occurs on my computer in many developers..ConnectionPool (Fri Jun 03 16:04:05 KST 2005) : Creating pool:netscape.ldap.LDAPException: failed to connect to server 127.0.0.1:389 (91); ...

JSSE dependency behavior on JCE

2942 byte By alpesh.parmara at 2007-10-1 15:23:25
Hi folks,Working on JSSE, 1. JSSE specification recommends SUN as priority 1 JCE provider. The default JSSE Provider is SunJSSE. Does it needs something which is specifically provided by SunJCE provider ? 2. Can i replace SunJCE with BouncyCastle Provider at the same priority (1). Doing that ...

SSLEngine vs SSLServerSocket cipher suites

477 byte By sylvain_duloutrea at 2007-10-1 15:33:35
I'm rewritting my SSL server (synchronous IOs with SSLServerSocket)to take into account NIOs with SSLEngine.I've set both SSLEngine and SSLServerSocket cipher suites with the setEnabledCipherSuite() method to the same value. The handshake works fine with the SSLServerSocket. However I always ...

SSLSocket created with expired certificates

3450 byte By atulea at 2007-10-1 15:52:10
The tests documented here were performed using Sun JSSE 1.0.2.ServerI have installed TOMCAT and configured it for SSL by following the instructions detailed in the following link: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ssl-howto.htmlNB: The system date was set back by more than ...

-Djavax.net.ssl.trustStore=truststore without password ?

252 byte By new4javaa at 2007-10-1 16:18:25
Hello,How come you just have to specify the trustore property, with no need for its password, for https to work ?This has been puzzling me for a while so if anyone could provide any hints I would greatly appreciate it.Thanks

JDK1.5 and JSSE provider question

2923 byte By elysianfra at 2007-10-1 16:21:24
Hi !I'm trying to work with the IBM JSSE provider and the Sun JDK1.5 but it seems harder than expected. Of course I checked the policy and security files and it's ok to me, as well as the classpath.I get an Exception and I don't understand why.here is my code, and the runtime result :import ...

Weired error when using smart card as server key store

20042 byte By yeeczehoula at 2007-10-1 16:29:37
I hit an error(bad handshake record MAC) when using smart card(pkcs11) as a key store for a java ssl server. here is the code of of creating the keystore :Provider p = new sun.security.pkcs11.SunPKCS11("/usr/local/etc/pkcs11.cfg");Security.addProvider(p);KeyStore ks = ...

HandshakeStatus is always WRAP

1840 byte By deanhiller2000a at 2007-10-1 16:36:23
I am getting into the state where the status always stays at wrap...here is a code snippet....Any ideas what is wrong with my code? My buffer is logging the following over and over and over....(notice there is plenty of room in the buffer)...what is wrong?Jun 18, 2005 1:13:43 PM ...

Algorithm missing yet not all client bytes received

2019 byte By deanhiller2000a at 2007-10-1 16:36:24
I am getting some really funky behavior here....client sends 100 bytes, server receives 100 bytesserver sends 1217 bytes, client receives 1217client send 139, server receives 100 (doing asynch I/O)server receives 39client sends 6client sends 53 (status of client SSLEngine goes from WRAP to ...

deadlock bettween two SSLEngines

916 byte By deanhiller2000a at 2007-10-1 16:36:27
This may be related to my previous post or may be a different issue. I have the same implementation of my SSLEngine running in client and server...here is what occurs between the two SSLEnginesclient writes 100 bytes, server receivesserver writes 1217 bytes back, client receivesclient writes ...

Use same SSLSession for another port

369 byte By Azraelgoda at 2007-10-1 16:36:48
Hi!The SSLContext determines onto the host and the port wether a SSLSession is available for resuming or not. Now i want to use one Session for the same host but a different port. Is there any way to do this? The port is nowhere exposed and i can磘 find an entrypoint where to customize sth in ...

NEED_UNWRAP ambiguity

628 byte By deanhiller2000a at 2007-10-1 16:37:50
Is this true....(From SSLEngine it's HandshakeStatus)I cannot seem to tell the difference between 1. NEED_UNWRAP...sslEngine needs more bytes from socket before it can process packet1. NEED_UNWRAP....sslEngine needs next packetI can't seem to tell the difference, so how do I code for this? I ...

URL exception: no protocol

2831 byte By allgaeukaesa at 2007-10-1 16:43:35
I wrote a https-URL-Reader using JSDK 1.5 who includes the latest JSSE. First the https-URL-reader fetches a page from a server who uses url-rewriting for session-tracking. So far the first step is working well, I got the page content. Inside this page are hrefs pointing to follow-up-pages. ...

SSL Exception

761 byte By Bigdukea at 2007-10-1 16:49:58
I am getting the foolowing error trying to connect to a secure server:java.net.SocketException: Default SSL context init failed: DerInputStream.getLength(): lengthTag=109, too big.at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)at ...

Non-blocking SSLEngine example

35745 byte By Talchasa at 2007-10-1 17:01:21
Since the example of using SSLEngine with non-blocking IO that comes with Java is quite limited, I have decided to release my own for anyone who wants to see how I solved the various problems that you must face. The example is designed to be a generic non-blocking server that supports SSL.This ...

How to open cert. in client side by using applet

290 byte By whatsmattera at 2007-10-1 17:04:20
Hi,Now I am using applet to connect to serverI want to establish an SSL connection with server-side authentication only. Can I get the certificate from Server and store it in client side's keystore in program?. Pls help and better with sample code.Thanks

SSLSocket to support NIO - feature request voting

1384 byte By alonbla at 2007-10-1 17:08:36
Hello All,I know there were many discussions here regarding this subject.I've seen the SSLEngine solution for the problem... But I didn't like it since it is too complicated.For my understanding SSLSocket inherits Socket so an application that can handle Sockets should be able to handle ...

SSL JDK 1.1.8

119 byte By stevewallonea at 2007-10-1 17:20:38
Hello,I'm looking for an SSL implementation that works with JDK 1.1.8. Any ideas?Thx!Steve

SSL Exception

3667 byte By usman-iqbala at 2007-10-1 17:23:40
I am working on RMI based SSL application. I got the following exception when I run my clientException in thread "main" java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: ...

KeyStore and TrustStore Queries

1556 byte By kwsooa at 2007-10-1 17:27:21
Hi,Currently, I am trying to establish a secured socket connection with server authentication on the client side. Based on my understanding the keystore is used to store entity's identity and its private key and used for various cryptographic purposes and the truststore is used to public key ...

RECV SSLv3 ALERT: fatal, handshake_failure / URGENT

899134 byte By ksairam1a at 2007-10-1 17:28:02
Hi,Iam using JSSE to connect an Apache webserver. Some times I get an error from the server saying handshake failed. Appreciate if anyone can help resolve the same. Attaching the JSSE debug log and also the code.JSSE Version : 1.0.3_03JDK : 1.3.1********** Code ...

Setting perticular cryptographic suit in TLS connection

383 byte By anamika at 2007-10-1 17:28:05
My application is using JSSE 1.4.2 for creating TLS connection and there is the requirement to use TLS_RSA_WITH_3DES_EDE_CBC_SHAcypher suit only during the the TLS session.Is there any way to set TLS session with this algorithm only?Also I have found out that this algorithm is not listed as ...

Java SSL Server: No Common Encryption Algorithm with web browser

932 byte By Daliso_Zuzea at 2007-10-1 17:37:50
Hi,Does anyone out there have some working code that sets up an SSLServerSocket that can communicate with any common browser? I have tried but get a message from my browser that communication is impossible because their are no common encryption algorithms.My code for setting up the server ...

javax.net.ssl.SSLException: bad record MAC

1464 byte By sevenMa at 2007-10-1 17:38:35
Hello,I am having some strange problems with a NIO/SSL server I wrote. I am using SSLEngine to encrypt the communications. The NIO server is non-blocking. The client is using classic blocking SSLSockets. The NIO Server si just an echo server i.e. just returns to the client the message it ...

Cannot fee SSLEngine partial packets?

2626 byte By deanhiller2000a at 2007-10-1 17:38:57
I tried a test today where I took the first encrypted packet from a client SSLEngine and passed the first 10 bytes(out of 100) to a server SSLEngine. It resulted in the below exception. I more expected a buffer underflow....when I pass all 100 bytes, it works fine.Test should be easy for anyone ...

Is SSLEngine.closeOutbound really needed?

894 byte By deanhiller2000a at 2007-10-1 17:44:59
The fact that a handshake is needed on a close is a real pain. Basically, I have an nio abstraction and close is called on the MyTCPChannel and I know must block while a handshake goes on, or make the close asynchronous like sopublic void close(CloseCallback c);Is it bad to just not even close ...

can't pass data during rehandshake?

6772 byte By deanhiller2000a at 2007-10-1 17:45:29
In the docs I read "New handshaking data can be intermixed among the application data"I can't seem to get that too work. Below is alot of code all of which works except the very last line. There are only two logs in this file and I paste those after the code too. Notice SSLEngine for some ...

Client threads block forever in SSLSocketImpl.startHandshake

2800 byte By richard.barnetta at 2007-10-1 17:46:07
Hi --We have an application which has 4 threads polling a webservice over HTTPS every 1-2 minutes. We don't control the server platform or webservice framework.We've encountered a problem where one by one the threads stop polling. This has occurred 3 times, every time over a weekend (the ...

SSL and uploading/downloading files

279 byte By avodena at 2007-10-1 17:49:33
When I download/upload file via HTTP and using SSL, is my attached file sent encrypted or SSL is only for message itself? In other words I download file from https://myfoo.com/myfile.txt <-- will this file be encrypted during transmission?Thank you.Andrei

HttpsURLConnection problem -- No trusted certificate found

4690 byte By hlia at 2007-10-1 17:52:50
Pls see my souce code below:import java.net.*; import java.io.*;import javax.net.ssl.*;import java.security.cert.*;import java.security.cert.Certificate;import java.security.*;public class HttpsTest {private String client_key_file = "C:\\test.jks";private String keypass = "test123";private ...

SSLSockets

697 byte By Ajayatlnta at 2007-10-1 17:56:12
To specify the keystore we use the following in the command line of running the ssl server and the truststore on the command line when running the client.for example when running the server type on the command line:java -D javax.net.ssl.keyStore="location of your keystore" ...

someone please review...Is this a bug in SSLEngine?

2644 byte By deanhiller2000a at 2007-10-1 17:57:29
I have been dealing with this for days and finally wrote a JUnit test just against the SSLEngine itself. I am about to file a bug report, but can someone please verify that they are having the same problem.Basically, on a rehanshake, just after a Runnable is retrieved and before it is run, the ...

Keytool Error - Too Big

2127 byte By pdowsona at 2007-10-1 18:05:01
Hi,I am trying to sign a java applet called JUpload from http://www.jupload.biz, with a certificate that we already have purchased. The private key was generated in IIS 6 on a Windows 2003 server, and the certificate was given to us in a *.crt format.First I tried signing the applet using just ...

SSLSession.getAppBufferSize is Huge. Do we have to use it?

836 byte By deanhiller2000a at 2007-10-1 18:10:08
SSLSession.getAppBufferSize and SSLSession.getPacketBuffer size are both 16K. Breaking this down to 1. 16K for incoming encrypted packet buffer2. 16K for outgoing encrypted packet buffer3. 16K for incoming packet data4. I only have 2K for outgoing packet data since I know my packets are not ...

SSLServerSocket setWantClientAuth(true):

1075 byte By Elninoa at 2007-10-1 18:24:45
HiI have a problem with a Java SSLServer:Following scenario:The server uses SSLServerSocket.setWantClientAuth(true) to request the clients certificate.Client is Firefox 1.04 and is configured to "ask everytime before sending client certificate."Everything works fine as long as i choose to send ...

Algorithm SunX509 not available

5203 byte By Sumanth_Hathwara at 2007-10-1 18:36:43
Hi,I am trying to call a web service for which the WSDL url happens to be https. I am using Weblogic 7.0 and my JDK version is 1.4.1_03. Can anybody please help me?The error description is as follows : AxisFault faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException ...

RMI w/ SSL not working if outside of default package

3478 byte By serpico7456a at 2007-10-1 18:38:13
I have spent an incredible amount of time looking in forums and online for help to what should be an easy problem to no avail. So here I am looking for help.The jsse example provided by sun ( http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/samples/index.html) compiles and runs just fine ...

Viewing SSL traffic

531 byte By darkmatter77a at 2007-10-1 18:45:11
I want to be able to see the SSL handshake taking place between my simple secure Java server and secure Java client. For this purpose, I tried to use a network sniffer Ethereal. However, Ethereal is not able to detect the SSL traffic.If instead I try to connect to some https website from IE, ...

java.security.AccessControlException: access denied (java.net.SocketPermiss

717 byte By HariAdyaa at 2007-10-1 19:00:53
the code below is for a particular port and IP ..what is the command for granting permission for all the sites?please help, i have been unable to tackle this problem from the past 24 hours.iam getting an error too.. java.security.AccessControlException: access denied (java.net.SocketPermission ...