<div dir="ltr"><div>Hi all,</div><div><br></div><div>There is an issue when accessing data thru HTTPS protocol, using GDAL 2.4.1 (and possibly versions older than this one) - OSGeo4W:</div><div><br></div><div>
<span style="color:rgb(102,102,102)"><span style="font-weight:600">Invalid Layer: </span>GDAL provider Cannot open GDAL dataset /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a>: CURL error: SSL certificate problem: unable to get local issuer certificate (file: ..\..\..\src\providers\gdal\qgsgdalprovider.cpp row: 2642function QgsGdalProvider::initIfNeeded:) Raster layer Provider is not valid (provider: gdal, URI: /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a> (file: ..\..\..\src\core\raster\qgsrasterlayer.cpp row: 627function QgsRasterLayer::setDataProvider:) </span><br></div><div><br></div><div>
<span style="color:rgb(102,102,102)">C:\>gdalinfo --version<br>GDAL 2.4.1, released 2019/03/15<br><br>C:\>gdalinfo /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a><br>ERROR 11: CURL error: SSL certificate problem: unable to get local issuer certificate<br>gdalinfo failed - unable to open '/vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a>'. </span><br></div><div><br></div><div>Using '
--config GDAL_HTTP_UNSAFESSL YES', as suggested in GDAL mailing list, solves the problem in the CLI, but not the access in QGIS.</div><div><br></div><div>
<span style="color:rgb(102,102,102)">C:\>gdalinfo --config GDAL_HTTP_UNSAFESSL YES /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a><br>Driver: GTiff/GeoTIFF<br>Files: /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a><br>Size is 31065, 60493<br>Coordinate System is:<br>PROJCS["ETRS89 / Portugal TM06",<br>    GEOGCS["ETRS89",<br>        DATUM["European_Terrestrial_Reference_System_1989",<br>            SPHEROID["GRS 1980",6378137,298.257222101,<br>                AUTHORITY["EPSG","7019"]],<br>            TOWGS84[0,0,0,0,0,0,0],<br>            AUTHORITY["EPSG","6258"]],<br>        PRIMEM["Greenwich",0,<br>            AUTHORITY["EPSG","8901"]],<br>        UNIT["degree",0.0174532925199433,<br>            AUTHORITY["EPSG","9122"]],<br>        AUTHORITY["EPSG","4258"]],<br>    PROJECTION["Transverse_Mercator"],<br>    PARAMETER["latitude_of_origin",39.66825833333333],<br>    PARAMETER["central_meridian",-8.133108333333334],<br>    PARAMETER["scale_factor",1],<br>    PARAMETER["false_easting",0],<br>    PARAMETER["false_northing",0],<br>    UNIT["metre",1,<br>        AUTHORITY["EPSG","9001"]],<br>    AXIS["X",EAST],<br>    AXIS["Y",NORTH],<br>    AUTHORITY["EPSG","3763"]]<br>Origin = (-127786.591583720612107,297279.380753421806730)<br>Pixel Size = (10.002778289544233,-10.002778289544233)<br>Metadata:<br>  AREA_OR_POINT=Area<br>Image Structure Metadata:<br>  COMPRESSION=JPEG<br>  INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left  ( -127786.592,  297279.381) (  9d41' 1.00"W, 42d20' 4.79"N)<br>Lower Left  ( -127786.592, -307818.686) (  9d33'59.60"W, 36d53'11.46"N)<br>Upper Right (  182949.716,  297279.381) (  5d54'49.30"W, 42d19'25.19"N)<br>Lower Right (  182949.716, -307818.686) (  6d 4'52.23"W, 36d52'38.80"N)<br>Center      (   27581.562,   -5269.653) (  7d48'42.80"W, 39d37'13.27"N)<br>Band 1 Block=31065x16 Type=Byte, ColorInterp=Red<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>  Mask Flags: PER_DATASET ALPHA<br>  Overviews of mask band: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>Band 2 Block=31065x16 Type=Byte, ColorInterp=Green<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>  Mask Flags: PER_DATASET ALPHA<br>  Overviews of mask band: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>Band 3 Block=31065x16 Type=Byte, ColorInterp=Blue<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>  Mask Flags: PER_DATASET ALPHA<br>  Overviews of mask band: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>Band 4 Block=31065x16 Type=Byte, ColorInterp=Alpha<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237 <br></span></div><div><span style="color:rgb(102,102,102)"><br></span></div><div><span style="color:rgb(102,102,102)"><span style="color:rgb(0,0,0)">This does not happen in QGIS compiled against older versions of GDAL. For instance, I've QGIS LTR in a Linux machine, compiled against GDAL 2.2.2, and the same dataset loads ok. The same in the CLI.</span><br></span></div><div><span style="color:rgb(102,102,102)"><br></span></div><div><span style="color:rgb(102,102,102)">
</span><div><span style="color:rgb(102,102,102)">pedro@omen ~ $ gdalinfo --version<br>GDAL 2.2.2, released 2017/09/15</span></div><div><span style="color:rgb(102,102,102)"><br></span></div><div><span style="color:rgb(102,102,102)">pedro@omen ~ $ gdalinfo /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif" target="_blank">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a><br>Driver: GTiff/GeoTIFF<br>Files: /vsicurl/<a href="https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif" target="_blank">https://cld.pt/dl/download/43299142-3a39-40f1-b3d1-3248611c7ec4/S2B_20190907_Mosaico_Portugal_Continental_RGB_12_8_4_3763.tif</a><br>Size is 31065, 60493<br>Coordinate System is:<br>PROJCS["ETRS89 / Portugal TM06",<br>    GEOGCS["ETRS89",<br>        DATUM["European_Terrestrial_</span><span style="color:rgb(102,102,102)">Reference_System_1989",<br>            SPHEROID["GRS 1980",6378137,298.257222101,<br>                AUTHORITY["EPSG","7019"]],<br>            TOWGS84[0,0,0,0,0,0,0],<br>            AUTHORITY["EPSG","6258"]],<br>        PRIMEM["Greenwich",0,<br>            AUTHORITY["EPSG","8901"]],<br>        UNIT["degree",0.</span><span style="color:rgb(102,102,102)">0174532925199433,<br>            AUTHORITY["EPSG","9122"]],<br>        AUTHORITY["EPSG","4258"]],<br>    PROJECTION["Transverse_</span><span style="color:rgb(102,102,102)">Mercator"],<br>    PARAMETER["latitude_of_origin"</span><span style="color:rgb(102,102,102)">,39.66825833333333],<br>    PARAMETER["central_meridian",-</span><span style="color:rgb(102,102,102)">8.133108333333334],<br>    PARAMETER["scale_factor",1],<br>    PARAMETER["false_easting",0],<br>    PARAMETER["false_northing",0],<br>    UNIT["metre",1,<br>        AUTHORITY["EPSG","9001"]],<br>    AXIS["X",EAST],<br>    AXIS["Y",NORTH],<br>    AUTHORITY["EPSG","3763"]]<br>Origin = (-127786.591583720612107,</span><span style="color:rgb(102,102,102)">297279.380753421806730)<br>Pixel Size = (10.002778289544233,-10.</span><span style="color:rgb(102,102,102)">002778289544233)<br>Metadata:<br>  AREA_OR_POINT=Area<br>Image Structure Metadata:<br>  COMPRESSION=JPEG<br>  INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left  ( -127786.592,  297279.381) (  9d41' 1.00"W, 42d20' 4.79"N)<br>Lower Left  ( -127786.592, -307818.686) (  9d33'59.60"W, 36d53'11.46"N)<br>Upper Right (  182949.716,  297279.381) (  5d54'49.30"W, 42d19'25.19"N)<br>Lower Right (  182949.716, -307818.686) (  6d 4'52.23"W, 36d52'38.80"N)<br>Center      (   27581.562,   -5269.653) (  7d48'42.80"W, 39d37'13.27"N)<br>Band 1 Block=31065x16 Type=Byte, ColorInterp=Red<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>  Mask Flags: PER_DATASET ALPHA <br>  Overviews of mask band: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>Band 2 Block=31065x16 Type=Byte, ColorInterp=Green<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>  Mask Flags: PER_DATASET ALPHA <br>  Overviews of mask band: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>Band 3 Block=31065x16 Type=Byte, ColorInterp=Blue<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>  Mask Flags: PER_DATASET ALPHA <br>  Overviews of mask band: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237<br>Band 4 Block=31065x16 Type=Byte, ColorInterp=Alpha<br>  Overviews: 15533x30247, 7767x15124, 3884x7562, 1942x3781, 971x1891, 486x946, 243x473, 122x237</span></div><div><br></div><div>
So, I assume that the 
SSL certificates are only checked in most recent versions of GDAL (for sure > 2.2.2).</div><div><br></div><div>In this way, how can QGIS deal with that? Maybe inserting an option to get the curl library to skip SSL host / certificate verification (GDAL_HTTP_UNSAFESSL)? Or maybe that would not be a good politic, skipping SSL verification...<br></div><div><br></div><div>Thank you very much!</div><div><br></div><div>Best regards,</div><div>Pedro Venâncio</div><div><br></div>

</div></div>