Skip to main content

Read data over HTTPS

MapCore reads map layers and other data from https:// URLs on Windows, Linux and Android. Map layers need no setup. Other requests verify the server's certificate, and those need a CA bundle — the list of certificate authorities your machine trusts.

Map layers​

Map layers that fetch their tiles from a server — the MapCore Map Layer Server, WMS, WMTS and WCS — work over https:// with no configuration on any platform.

note

These tile requests are encrypted, but MapCore does not verify the server's certificate for them.

Requests that verify the certificate​

Other https:// requests check the server's certificate and fail without a CA bundle:

  • data opened directly from an https:// URL, such as a vector file
  • WMTS feature-info queries
  • some WCS requests

Make a CA bundle available before your application starts:

PlatformSetup
Debian, UbuntuNone — the system bundle is found automatically
RHEL, AlmaLinux, Rockyexport SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt
WindowsSet GDAL_CURL_CA_BUNDLE to the path of a CA bundle file in PEM format
AndroidShip a CA bundle file in PEM format with your app, and set GDAL_CURL_CA_BUNDLE to its path on the device

These are environment variables. GDAL_CURL_CA_BUNDLE, CURL_CA_BUNDLE and SSL_CERT_FILE are all accepted, on every platform; the first one set wins, in that order. On Android, set it from Java with android.system.Os.setenv() before your first MapCore call.

Verified against MapCore 12.5.0

Written from Development/BaseSupport/gdal/port/cpl_http.cpp