From: Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>
To: Elia Pinto <gitter.spiros@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] http: add support for specifying the SSL version
Date: Wed, 12 Aug 2015 15:33:19 +0200 (CEST) [thread overview]
Message-ID: <950187984.739852.1439386399510.JavaMail.zimbra@ensimag.grenoble-inp.fr> (raw)
In-Reply-To: <1439384456-16335-1-git-send-email-gitter.spiros@gmail.com>
Hello, Elia
Elia Pinto <gitter.spiros@gmail.com> writes:
> + if (ssl_version != NULL && *ssl_version) {
> + if (!strcmp(ssl_version,"tlsv1")) {
> + sslversion = CURL_SSLVERSION_TLSv1;
> + } else if (!strcmp(ssl_version,"sslv2")) {
> + sslversion = CURL_SSLVERSION_SSLv2;
> + } else if (!strcmp(ssl_version,"sslv3")) {
> + sslversion = CURL_SSLVERSION_SSLv3;
> +#if LIBCURL_VERSION_NUM >= 0x072200
> + } else if (!strcmp(ssl_version,"tlsv1.0")) {
> + sslversion = CURL_SSLVERSION_TLSv1_0;
> + } else if (!strcmp(ssl_version,"tlsv1.1")) {
> + sslversion = CURL_SSLVERSION_TLSv1_1;
> + } else if (!strcmp(ssl_version,"tlsv1.2")) {
> + sslversion = CURL_SSLVERSION_TLSv1_2;
> + } else {
> + warning("unsupported ssl version %s : using default",
> + ssl_version);
> +#endif
> + }
> + }
I'm curious about what would happen should 'sslVersion' be set to
'tlsv1.0' (or a value that doesn't belong to the possible values) and
'LIBCURL_VERSION_NUM' be inferior to '0x072200'.
Since we wouldn't go through any 'if' and would also skip the 'else'
case, wouldn't we have a silent 'unsupported ssl version: using
default' ?
So I think that the 'else' case should be outside of the '#if [...]
#endif'.
Thanks,
Rémi
next prev parent reply other threads:[~2015-08-12 13:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 13:00 [PATCH] http: add support for specifying the SSL version Elia Pinto
2015-08-12 13:33 ` Remi Galan Alfonso [this message]
2015-08-12 14:10 ` Elia Pinto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=950187984.739852.1439386399510.JavaMail.zimbra@ensimag.grenoble-inp.fr \
--to=remi.galan-alfonso@ensimag.grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitter.spiros@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).