Nmap Development mailing list archives

Re: OpenVPN probes and script question


From: David Fifield <david () bamsoftware com>
Date: Fri, 29 Jan 2010 13:49:56 -0700

On Fri, Jan 29, 2010 at 09:42:39PM +0100, Patrik Karlsson wrote:
Apart from the probes I've implemented a script (it's kind of rough
for the moment) that retrieves the remote certificate. However, the
certificate is ASN encoded. So I guess my question is (before I start
re-inventing the wheel (again)), could I call openssl from lua to
decode it? I've looked at ssl-cert.nse but it seems to get the cert
already decoded in a table. 

See the l_get_ssl_certificate in nse_ssl_cert.cc. That's the bridge
between Lua and OpenSSL that ssl-cert.nse uses. It's best if you can
reuse that, though it might take some refactoring to allow getting a
certificate that's not part of an active OpenSSL session.

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


Current thread: