mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Add the signature algorithm that was used to sign the target port's x509 (TLS) certificate to the output of ssl-cert.nse
http://seclists.org/nmap-dev/2014/q4/44
This commit is contained in:
parent
ea749d785b
commit
e11e03fa50
3 changed files with 48 additions and 36 deletions
|
|
@ -449,12 +449,16 @@ int l_get_ssl_certificate(lua_State *L)
|
|||
subject = X509_get_subject_name(cert);
|
||||
if (subject != NULL) {
|
||||
x509_name_to_table(L, subject);
|
||||
lua_setfield(L, -2, "subject");
|
||||
}
|
||||
|
||||
issuer = X509_get_issuer_name(cert);
|
||||
if (issuer != NULL) {
|
||||
x509_name_to_table(L, issuer);
|
||||
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);
|
||||
lua_setfield(L, -2, "issuer");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue