Index: nse_ssl_cert.cc =================================================================== --- nse_ssl_cert.cc (revision 33720) +++ nse_ssl_cert.cc (working copy) @@ -452,6 +452,10 @@ lua_setfield(L, -2, "subject"); } + const char *sig_algo = OBJ_nid2ln(OBJ_obj2nid(cert->sig_alg->algorithm)); + lua_pushstring(L, sig_algo); + lua_setfield(L, -2, "sig_algorithm"); + issuer = X509_get_issuer_name(cert); if (issuer != NULL) { x509_name_to_table(L, issuer); Index: scripts/ssl-cert.nse =================================================================== --- scripts/ssl-cert.nse (revision 33720) +++ scripts/ssl-cert.nse (working copy) @@ -29,6 +29,7 @@ /organizationName=VeriSign, Inc./countryName=US | Public Key type: rsa | Public Key bits: 2048 +| Signature Algorithm: sha1WithRSAEncryption | Not valid before: 2011-03-23 00:00:00 | Not valid after: 2013-04-01 23:59:59 | MD5: bf47 ceca d861 efa7 7d14 88ad 4a73 cb5b @@ -50,6 +51,7 @@ /organizationalUnitName=Terms of use at https://www.verisign.com/rpa (c)06 | Public Key type: rsa | Public Key bits: 2048 +| Signature Algorithm: sha1WithRSAEncryption | Not valid before: 2011-03-23 00:00:00 | Not valid after: 2013-04-01 23:59:59 | MD5: bf47 ceca d861 efa7 7d14 88ad 4a73 cb5b @@ -95,6 +97,7 @@ -- rsa -- 2048 -- +-- sha1WithRSAEncryption -- -- 2011-03-23T00:00:00+00:00 -- 2013-04-01T23:59:59+00:00 @@ -188,6 +191,7 @@ o.subject = name_to_table(cert.subject) o.issuer = name_to_table(cert.issuer) o.pubkey = cert.pubkey + o.sig_algo = cert.sig_algorithm o.validity = {} for k, v in pairs(cert.validity) do if type(v)=="string" then @@ -214,6 +218,7 @@ if nmap.verbosity() > 0 then lines[#lines + 1] = "Public Key type: " .. cert.pubkey.type lines[#lines + 1] = "Public Key bits: " .. cert.pubkey.bits + lines[#lines + 1] = "Signature Algorithm: " .. cert.sig_algorithm end lines[#lines + 1] = "Not valid before: " ..