Remove unneeded check for extra_certs_file_inline
PATCH 1/1 Remove unneeded check for extra_certs_file_inline
As with all the file/file_inline variable, the _inline variable is only relevant if the file variable is equal to INLINE_FILE_TAG. The tls_ctx_load_extra_certs() function nicely follows this mantra.
Removing this unneeded check silences a coverity 'dereference after null check' warning (tls_ctx_load_extra_certs() always dereferences options->extra_cert_file, and the check implies it might be null). In reality, this cannot occur, because if options->extra_cert_file_inline is non-null, so is options->extra_cert_file. Still, coverity is correct this this check is a bit weird, so let's fix it and make coverity happy.
--- src/openvpn/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/ssl.c +1 -1
@@ -602,7 +602,7 @@ init_ssl (const struct options *options, struct tls_root_ctx *new_ctx)/* Load extra certificates that are part of our own certificate chain but shouldn't be included in the verify chain */ -if (options->extra_certs_file || options->extra_certs_file_inline) +if (options->extra_certs_file) {tls_ctx_load_extra_certs (new_ctx, options->extra_certs_file, options->extra_certs_file_inline); }
Signature · 1 line
2.7.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
ACK.
Your patch has been applied to the master branch
commit 8d5b06e6fc46e214e1498352603a95028aa5c113
Author: Steffan Karger Date: Tue Nov 8 22:28:27 2016 +0100
Remove unneeded check for extra_certs_file_inline
Signed-off-by: Steffan Karger <[email protected]...>
Acked-by: David Sommerseth <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg12978.html
Signed-off-by: David Sommerseth <[email protected]...>- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJYLHohAAoJEIbPlEyWcf3ya+sP/R5QvIYTpeHuypemvm8WIFGl l8jPT7ago+TX9l6jvr0RHTFGp7TK2TVwg0wlrSjGowYM7og0lqXeGggHfd5FMfFI UXxS4ukG5sy4vi0VHiXYFE0PYlFpBPSabADjIss+LCmN3Z/BQZyADJEwBcibneym apf82RIGLy+QsUWlmBGeD9FcmH6rpnQ2nM1E+1xXucF2MsYd+I1Ir7qXI7s0C3eb +QybxC2X3If/NLwCkyh8fbwCvp05qr2YLuRRi6rSUQw8BUFqutxWhwly6vqDiqqF e1j16qYBN2bImpKsEbRn06kQ9jMki6HDo5Ei7SoodoaCs7evSKahomLJogk1elgO VlHLS+MbMJDze+SAJvuCsx+LyUiP7AfXH68mqvbGm+VTssv5y1WQhhS1RhKYrvJG Tgwt9sMAY5JQQWXjQNiCtzhdB5ChSfGE7r2+2vu9V+CKcuuOGnScSEOHKCWu2MOB LCJK07gXVhm9rfRVq+FK1P0TtNi9FigJBwjMq+naHHsQMbrd4oTaKvIHpemJnnEa rg2bE25ED+x5ns5UGuOLNHE+ZXrZEkyeaiyRKpQ06VJuXHtxOjQ13ZubqVmiI9Xq NbVKlhJhlGCVl6v4GR1bdONrFWKleNdsUfzNe13Wj/Y95x5AefnZOh6szSjEnFNN glRfdpJKYAVay6CujUAd
=l6AJ
-----END PGP SIGNATURE-----