Re: [PATCH] http: add support for specifying the SSL version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Elia

Elia Pinto <gitter.spiros@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]