git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elia Pinto <gitter.spiros@gmail.com>
To: Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] http: add support for specifying the SSL version
Date: Wed, 12 Aug 2015 16:10:40 +0200	[thread overview]
Message-ID: <CA+EOSBn8xXHEXSwZ3sqcs8AaLQfDNw-5bSJSv-gwwGpaH4VW9w@mail.gmail.com> (raw)
In-Reply-To: <950187984.739852.1439386399510.JavaMail.zimbra@ensimag.grenoble-inp.fr>

2015-08-12 15:33 GMT+02:00 Remi Galan Alfonso
<remi.galan-alfonso@ensimag.grenoble-inp.fr>:
> 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' ?
You are right. I will resend. Thank you very much
>
> So I think that the 'else' case should be outside of the '#if [...]
> #endif'.
>
> Thanks,
> Rémi

      reply	other threads:[~2015-08-12 14:10 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
2015-08-12 14:10   ` Elia Pinto [this message]

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=CA+EOSBn8xXHEXSwZ3sqcs8AaLQfDNw-5bSJSv-gwwGpaH4VW9w@mail.gmail.com \
    --to=gitter.spiros@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=remi.galan-alfonso@ensimag.grenoble-inp.fr \
    /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).