Home page logo
/

nmap-dev logo Nmap Development mailing list archives

nsock_connect_ssl: bad version identification?
From: " mixter () gmail com" <mixter () gmail com>
Date: Thu, 15 May 2008 21:02:53 +0200

I'm trying to establish a SSL connection using nsock_connect_ssl(),
but everytime
I get "Did not receive identification string" (using nmap -sV with ssl
support) or:
"Bad protocol version identification '\200\177\001\003\001' from 127.0.0.1"
(the latter with my usage of nsock_connect_ssl():
nmap-exp/ncat/ncat_main.c  line 471).

Nsock is supposed to provide a normal, working ssl session, right?
If so, what did I do wrong? I call nsock_connect_ssl(pool, cs.tcp_nsi, handler,
timeout, &cs, &sockaddress, sockaddrlen, port, cs.ssl_session), with:

- pool = nsp_new(NULL)
- tcp_nsi = nsi_new(pool, NULL)
- cs is a struct conn_state of which I only touch the nsi and ssl_session
- handler function does exactly the same as nmap's handler
- timeout, port, sockaddrlen set correctly, cs.ssl_session = NULL
- sockaddress has family, s_addr, port set correctly
- everything actually working if I do a nsock_connect_tcp() instead

As I've already spent considerable time on debugging this, any hints
on closing in
on the problem would be greatly appreciated :-) And as said, the particular
ssl-connection-refusing code is already checked in: nmap-exp/ncat/ncat_main.c

Thanks,

Mixter

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]