Dear Stunnel users,
I'm running stunnel on my server which accepts connections from my mobile phone emulator (j2me) like so: midlet app -> port:5555 stunnel -> port:6666 server. My midlet, which can be treated as a java app, uses ssl://127.0.0.1:5555 to connect to stunnel. I can establish a connection between the stunnel and the app because I can get information on the certificate.
The problem is that when I send data from the midlet to the server, the server doesn't accept it, nor does it signal that anything has been received even when I have double-checked that the streams are setup.
I have pasted my config and log files below. Any suggestions are fully appreciated.
Regards, Vladimir
version: stunnel 4.30 on x86-pc-mingw32-gnu with OpenSSL 0.9.8l 5 Nov 2009
stunnel.conf: cert = SecIM.pem debug = 7 ;output = stunnel.log [SecureIM] accept = 5555 connect = 6666 client = no
Log file: 2010.01.28 17:51:09 LOG5[3828:1772]: Reading configuration from file stunnel.conf 2010.01.28 17:51:09 LOG7[3828:1772]: Snagged 64 random bytes from C:/.rnd 2010.01.28 17:51:09 LOG7[3828:1772]: Wrote 0 new random bytes to C:/.rnd 2010.01.28 17:51:09 LOG7[3828:1772]: RAND_status claims sufficient entropy for the PRNG 2010.01.28 17:51:09 LOG7[3828:1772]: PRNG seeded successfully 2010.01.28 17:51:09 LOG7[3828:1772]: Certificate: SecIM.pem 2010.01.28 17:51:09 LOG7[3828:1772]: Certificate loaded 2010.01.28 17:51:09 LOG7[3828:1772]: Key file: SecIM.pem 2010.01.28 17:51:11 LOG7[3828:1772]: Private key loaded 2010.01.28 17:51:11 LOG7[3828:1772]: SSL context initialized for service SecureIM 2010.01.28 17:51:11 LOG5[3828:1772]: Configuration successful 2010.01.28 17:51:11 LOG5[3828:1772]: No limit detected for the number of clients 2010.01.28 17:51:11 LOG7[3828:1772]: FD=168 in non-blocking mode 2010.01.28 17:51:11 LOG7[3828:1772]: Option SO_REUSEADDR set on accept socket 2010.01.28 17:51:11 LOG7[3828:1772]: Service SecureIM bound to 0.0.0.0:5555 2010.01.28 17:51:11 LOG7[3828:1772]: Service SecureIM opened FD=168 2010.01.28 17:51:11 LOG5[3828:1772]: stunnel 4.30 on x86-pc-mingw32-gnu with OpenSSL 0.9.8l 5 Nov 2009 2010.01.28 17:51:11 LOG5[3828:1772]: Threading:WIN32 SSL:ENGINE Sockets:SELECT,IPv6 2010.01.28 17:52:13 LOG7[3828:2836]: Service SecureIM accepted FD=212 from 127.0.0.1:56133 2010.01.28 17:52:13 LOG7[3828:2836]: Creating a new thread 2010.01.28 17:52:13 LOG7[3828:2836]: New thread created 2010.01.28 17:52:13 LOG7[3828:3336]: Service SecureIM started 2010.01.28 17:52:13 LOG7[3828:3336]: FD=212 in non-blocking mode 2010.01.28 17:52:13 LOG7[3828:3336]: Option TCP_NODELAY set on local socket 2010.01.28 17:52:13 LOG5[3828:3336]: Service SecureIM accepted connection from 127.0.0.1:56133 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): before/accept initialization 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 read client hello A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write server hello A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write certificate A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write server done A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 flush data 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 read client key exchange A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 read finished A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write change cipher spec A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write finished A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 flush data 2010.01.28 17:52:13 LOG7[3828:3336]: 1 items in the session cache 2010.01.28 17:52:13 LOG7[3828:3336]: 0 client connects (SSL_connect()) 2010.01.28 17:52:13 LOG7[3828:3336]: 0 client connects that finished 2010.01.28 17:52:13 LOG7[3828:3336]: 0 client renegotiations requested 2010.01.28 17:52:13 LOG7[3828:3336]: 1 server connects (SSL_accept()) 2010.01.28 17:52:13 LOG7[3828:3336]: 1 server connects that finished 2010.01.28 17:52:13 LOG7[3828:3336]: 0 server renegotiations requested 2010.01.28 17:52:13 LOG7[3828:3336]: 0 session cache hits 2010.01.28 17:52:13 LOG7[3828:3336]: 0 external session cache hits 2010.01.28 17:52:13 LOG7[3828:3336]: 0 session cache misses 2010.01.28 17:52:13 LOG7[3828:3336]: 0 session cache timeouts 2010.01.28 17:52:13 LOG6[3828:3336]: SSL accepted: new session negotiated 2010.01.28 17:52:13 LOG6[3828:3336]: Negotiated ciphers: RC4-SHA SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=SHA1 2010.01.28 17:52:13 LOG7[3828:3336]: FD=424 in non-blocking mode 2010.01.28 17:52:13 LOG6[3828:3336]: connect_blocking: connecting 127.0.0.1:6666 2010.01.28 17:52:13 LOG7[3828:3336]: connect_blocking: s_poll_wait 127.0.0.1:6666: waiting 10 seconds 2010.01.28 17:52:13 LOG5[3828:3336]: connect_blocking: connected 127.0.0.1:6666 2010.01.28 17:52:13 LOG5[3828:3336]: Service SecureIM connected remote server from 127.0.0.1:56134 2010.01.28 17:52:13 LOG7[3828:3336]: Remote FD=424 initialized 2010.01.28 17:52:13 LOG7[3828:3336]: Option TCP_NODELAY set on remote socket 2010.01.28 17:54:02 LOG3[3828:3336]: SSL_read: Connection reset by peer (WSAECONNRESET) (10054) 2010.01.28 17:54:02 LOG5[3828:3336]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket 2010.01.28 17:54:02 LOG7[3828:3336]: Service SecureIM finished (0 left)
Please ignore the previous message on the subject, it is a code fault.
On 28/01/2010 18:42, Vladimir Stariradev wrote:
Dear Stunnel users,
I'm running stunnel on my server which accepts connections from my mobile phone emulator (j2me) like so: midlet app -> port:5555 stunnel -> port:6666 server. My midlet, which can be treated as a java app, uses ssl://127.0.0.1:5555 to connect to stunnel. I can establish a connection between the stunnel and the app because I can get information on the certificate.
The problem is that when I send data from the midlet to the server, the server doesn't accept it, nor does it signal that anything has been received even when I have double-checked that the streams are setup.
I have pasted my config and log files below. Any suggestions are fully appreciated.
Regards, Vladimir
version: stunnel 4.30 on x86-pc-mingw32-gnu with OpenSSL 0.9.8l 5 Nov 2009
stunnel.conf: cert = SecIM.pem debug = 7 ;output = stunnel.log [SecureIM] accept = 5555 connect = 6666 client = no
Log file: 2010.01.28 17:51:09 LOG5[3828:1772]: Reading configuration from file stunnel.conf 2010.01.28 17:51:09 LOG7[3828:1772]: Snagged 64 random bytes from C:/.rnd 2010.01.28 17:51:09 LOG7[3828:1772]: Wrote 0 new random bytes to C:/.rnd 2010.01.28 17:51:09 LOG7[3828:1772]: RAND_status claims sufficient entropy for the PRNG 2010.01.28 17:51:09 LOG7[3828:1772]: PRNG seeded successfully 2010.01.28 17:51:09 LOG7[3828:1772]: Certificate: SecIM.pem 2010.01.28 17:51:09 LOG7[3828:1772]: Certificate loaded 2010.01.28 17:51:09 LOG7[3828:1772]: Key file: SecIM.pem 2010.01.28 17:51:11 LOG7[3828:1772]: Private key loaded 2010.01.28 17:51:11 LOG7[3828:1772]: SSL context initialized for service SecureIM 2010.01.28 17:51:11 LOG5[3828:1772]: Configuration successful 2010.01.28 17:51:11 LOG5[3828:1772]: No limit detected for the number of clients 2010.01.28 17:51:11 LOG7[3828:1772]: FD=168 in non-blocking mode 2010.01.28 17:51:11 LOG7[3828:1772]: Option SO_REUSEADDR set on accept socket 2010.01.28 17:51:11 LOG7[3828:1772]: Service SecureIM bound to 0.0.0.0:5555 2010.01.28 17:51:11 LOG7[3828:1772]: Service SecureIM opened FD=168 2010.01.28 17:51:11 LOG5[3828:1772]: stunnel 4.30 on x86-pc-mingw32-gnu with OpenSSL 0.9.8l 5 Nov 2009 2010.01.28 17:51:11 LOG5[3828:1772]: Threading:WIN32 SSL:ENGINE Sockets:SELECT,IPv6 2010.01.28 17:52:13 LOG7[3828:2836]: Service SecureIM accepted FD=212 from 127.0.0.1:56133 2010.01.28 17:52:13 LOG7[3828:2836]: Creating a new thread 2010.01.28 17:52:13 LOG7[3828:2836]: New thread created 2010.01.28 17:52:13 LOG7[3828:3336]: Service SecureIM started 2010.01.28 17:52:13 LOG7[3828:3336]: FD=212 in non-blocking mode 2010.01.28 17:52:13 LOG7[3828:3336]: Option TCP_NODELAY set on local socket 2010.01.28 17:52:13 LOG5[3828:3336]: Service SecureIM accepted connection from 127.0.0.1:56133 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): before/accept initialization 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 read client hello A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write server hello A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write certificate A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write server done A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 flush data 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 read client key exchange A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 read finished A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write change cipher spec A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 write finished A 2010.01.28 17:52:13 LOG7[3828:3336]: SSL state (accept): SSLv3 flush data 2010.01.28 17:52:13 LOG7[3828:3336]: 1 items in the session cache 2010.01.28 17:52:13 LOG7[3828:3336]: 0 client connects (SSL_connect()) 2010.01.28 17:52:13 LOG7[3828:3336]: 0 client connects that finished 2010.01.28 17:52:13 LOG7[3828:3336]: 0 client renegotiations requested 2010.01.28 17:52:13 LOG7[3828:3336]: 1 server connects (SSL_accept()) 2010.01.28 17:52:13 LOG7[3828:3336]: 1 server connects that finished 2010.01.28 17:52:13 LOG7[3828:3336]: 0 server renegotiations requested 2010.01.28 17:52:13 LOG7[3828:3336]: 0 session cache hits 2010.01.28 17:52:13 LOG7[3828:3336]: 0 external session cache hits 2010.01.28 17:52:13 LOG7[3828:3336]: 0 session cache misses 2010.01.28 17:52:13 LOG7[3828:3336]: 0 session cache timeouts 2010.01.28 17:52:13 LOG6[3828:3336]: SSL accepted: new session negotiated 2010.01.28 17:52:13 LOG6[3828:3336]: Negotiated ciphers: RC4-SHA SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=SHA1 2010.01.28 17:52:13 LOG7[3828:3336]: FD=424 in non-blocking mode 2010.01.28 17:52:13 LOG6[3828:3336]: connect_blocking: connecting 127.0.0.1:6666 2010.01.28 17:52:13 LOG7[3828:3336]: connect_blocking: s_poll_wait 127.0.0.1:6666: waiting 10 seconds 2010.01.28 17:52:13 LOG5[3828:3336]: connect_blocking: connected 127.0.0.1:6666 2010.01.28 17:52:13 LOG5[3828:3336]: Service SecureIM connected remote server from 127.0.0.1:56134 2010.01.28 17:52:13 LOG7[3828:3336]: Remote FD=424 initialized 2010.01.28 17:52:13 LOG7[3828:3336]: Option TCP_NODELAY set on remote socket 2010.01.28 17:54:02 LOG3[3828:3336]: SSL_read: Connection reset by peer (WSAECONNRESET) (10054) 2010.01.28 17:54:02 LOG5[3828:3336]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket 2010.01.28 17:54:02 LOG7[3828:3336]: Service SecureIM finished (0 left)