mirror of
https://github.com/nmap/nmap.git
synced 2026-01-20 05:09:02 +00:00
Support chained certificate files with --ssl-cert.
Use the recommended SSL_CTX_use_certificate_chain_file over SSL_CTX_use_certificate_file. https://www.openssl.org/docs/ssl/SSL_CTX_use_certificate.html#NOTES Patch by Greg Bailey. http://seclists.org/nmap-dev/2013/q2/399
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [Ncat] Ncat now support chained certificates with the --ssl-cert
|
||||
option. [Greg Bailey]
|
||||
|
||||
o Stop parsing TCP options after reaching EOL in libnetutil. Bug reported
|
||||
by Gustavo Moreira. [Henri Doreau]
|
||||
|
||||
|
||||
@@ -173,8 +173,8 @@ SSL_CTX *setup_ssl_listen(void)
|
||||
} else {
|
||||
if (o.sslcert == NULL || o.sslkey == NULL)
|
||||
bye("The --ssl-key and --ssl-cert options must be used together.");
|
||||
if (SSL_CTX_use_certificate_file(sslctx, o.sslcert, SSL_FILETYPE_PEM) != 1)
|
||||
bye("SSL_CTX_use_certificate_file(): %s.", ERR_error_string(ERR_get_error(), NULL));
|
||||
if (SSL_CTX_use_certificate_chain_file(sslctx, o.sslcert) != 1)
|
||||
bye("SSL_CTX_use_certificate_chain_file(): %s.", ERR_error_string(ERR_get_error(), NULL));
|
||||
if (SSL_CTX_use_PrivateKey_file(sslctx, o.sslkey, SSL_FILETYPE_PEM) != 1)
|
||||
bye("SSL_CTX_use_Privatekey_file(): %s.", ERR_error_string(ERR_get_error(), NULL));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user