ssl - OpenSSL Command to check if a server is presenting a certificate -


i'm trying run openssl command narrow down ssl issue might when trying send outbound message our system.

i found command in topic: using openssl certificate server

openssl s_client -connect ip:port -prexit 

the output of results in

connected(00000003) 15841:error:140790e5:ssl routines:ssl23_write:ssl handshake failure:s23_lib.c:188: --- no peer certificate available --- no client certificate ca names sent --- ssl handshake has read 0 bytes , written 121 bytes --- new, (none), cipher (none) secure renegotiation not supported compression: none expansion: none --- 

does mean server isn't presenting certificate? tried other systems on different ip:port , present certificate successfully.

does mutual authentication affect command -prexit?

--update--

i ran command again

openssl s_client -connect ip:port -prexit 

and response now

connected(00000003) write:errno=104 --- no peer certificate available --- no client certificate ca names sent --- ssl handshake has read 0 bytes , written 121 bytes --- new, (none), cipher (none) secure renegotiation not supported compression: none expansion: none --- 

i added -ssl3 command

openssl s_client -connect ip:port -prexit -ssl3 

response:

connected(00000003) write:errno=104 --- no peer certificate available --- no client certificate ca names sent --- ssl handshake has read 0 bytes , written 0 bytes --- new, (none), cipher (none) secure renegotiation not supported compression: none expansion: none ssl-session:     protocol  : sslv3     cipher    : 0000     session-id:      session-id-ctx:      master-key:      key-arg   : none     krb5 principal: none     start time: 1403907236     timeout   : 7200 (sec)     verify return code: 0 (ok) --- 

also trying -tls1

connected(00000003) write:errno=104 --- no peer certificate available --- no client certificate ca names sent --- ssl handshake has read 0 bytes , written 0 bytes --- new, (none), cipher (none) secure renegotiation not supported compression: none expansion: none ssl-session:     protocol  : tlsv1     cipher    : 0000     session-id:      session-id-ctx:      master-key:      key-arg   : none     krb5 principal: none     start time: 1403907267     timeout   : 7200 (sec)     verify return code: 0 (ok) --- 

i debugging ssl issue today resulted in same write:errno=104 error. found out reason behaviour server required sni (servername tls extensions) work correctly. supplying -servername option openssl made connect successfully:

openssl s_client -connect domain.tld:443 -servername domain.tld 

hope helps.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -