From: Mike Vastola Date: 2010-09-20T23:19:27+09:00 Subject: Re: SSLSocket -- Connection reset by peer Brian Candler wrote: > Mike Vastola wrote: >> DisplayUpdater::update_display('127.0.0.1', 23, '--') > > You're really running an SSL server on the telnet port on your local > computer? Haha. No. I change the port/hostname to mask what it really was. > >> I can >> connect to it flawlessly from the same computer that's running ruby with >> openssl s_client. > > Can you show the full command line you use for openssl s_client ? And > the certificate validation result when you run it? > openssl s_client -connect {non-localhost-host}:{non-telnet-port} -cert cert.pem -key key.pem -CAfile cacert.pem CONNECTED(00000003) depth=1 {INSERT_CA_SUBJECT_HERE} verify return:1 depth=0 {INSERT_SERVER_SUBJECT_HERE} verify return:1 --- Certificate chain 0 s: {INSERT_SERVER_SUBJECT_HERE} i: {INSERT_CA_SUBJECT_HERE} 1 s: {INSERT_CA_SUBJECT_HERE} i: {INSERT_CA_SUBJECT_HERE} --- Server certificate -----BEGIN CERTIFICATE----- {INSERT_CERTIFICATE_HERE} -----END CERTIFICATE----- subject= {INSERT_SERVER_SUBJECT_HERE} issuer= {INSERT_CA_SUBJECT_HERE} --- Acceptable client certificate CA names {INSERT_CA_SUBJECT_HERE} --- SSL handshake has read 4252 bytes and written 5147 bytes --- New, TLSv1/SSLv3, Cipher is AES256-SHA Server public key is 4096 bit Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : AES256-SHA Session-ID: 1BE2DD87165574CD6F2D99720007FDCA811C63546FB449A72B0293C54177A5E5 Session-ID-ctx: Master-Key: BCCAE579F3AF185BDAFF1D30D6F058573EC8266DE2877CE73E30ED7ED2BE819DD15B7098304F59529BAF6BE12FD18EED Key-Arg : None Start Time: 1284991918 Timeout : 300 (sec) Verify return code: 0 (ok) --- %%% Starting Here Is the actual Custom Protocol Communications %%% -- OK *** Setting display 00 to value '--' via /dev/ttyUSB0. DONE %%% End Custom Protocol Communications %%% closed > Also, have you tried: > sslSock.write(data + "\r\n") No.. will try though.. -- Posted via http://www.ruby-forum.com/.