CURL.SetOptionDOHSSLVerifyHost
------------------------------

Whether to verify the host name in the DOH (DNS-over-HTTPS) SSL certificate.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [11.2](newinversion112.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionDOHSSLVerifyHost"; curl; Value ) 

**MBS**( **"CURL.SetOptionDOHSSLVerifyHost";** /\* Whether to verify the host name in the DOH (DNS-over-HTTPS) SSL certificate. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The new setting.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The new setting. | 2 |

### Result

Returns OK or error.

### Description

Whether to verify the host name in the DOH (DNS-over-HTTPS) SSL certificate.  
Pass a 2 as asking curl to verify the DOH (DNS-over-HTTPS) server's certificate name fields against the host name.  
This option is the DOH equivalent of [CURL.SetOptionSSLVerifyPeer](CURLSetOptionSSLVerifyPeer.md) and only affects requests to the DOH server.  
When CURL.SetOptionDOHSSLVerifyHost is 2, the SSL certificate provided by the DOH server must indicate that the server name is the same as the server name to which you meant to connect to, or the connection fails.  
Curl considers the DOH server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the DOH URL to which you told Curl to connect.  
When the verify value is set to 1 it is treated the same as 2. However for consistency with the other VerifyHost options we suggest use 2 and not 1.  
When the verify value is set to 0, the connection succeeds regardless of the names used in the certificate. Use that ability with caution!  
See also [DOH\_SSL\_VERIFYHOST](https://curl.haxx.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYHOST.html) option in CURL manual.

### See also

- [CURL.SetOptionDOHSSLVerifyPeer](CURLSetOptionDOHSSLVerifyPeer.md)
- [CURL.SetOptionDOHSSLVerifyStatus](CURLSetOptionDOHSSLVerifyStatus.md)
- [CURL.SetOptionProxySSLVerifyHost](CURLSetOptionProxySSLVerifyHost.md)
- [CURL.SetOptionSSLVerifyHost](CURLSetOptionSSLVerifyHost.md)
- [CURL.SetOptionSSLVerifyPeer](CURLSetOptionSSLVerifyPeer.md)
- [CURL.SetOptionSSLVerifyStatus](CURLSetOptionSSLVerifyStatus.md)

### Release notes

- **Version 11.2**
    - Added [CURL.GetReferer](https://www.mbsplugins.eu/CURLGetReferer.shtml), [CURL.SetOptionDOHSSLVerifyHost](https://www.mbsplugins.eu/CURLSetOptionDOHSSLVerifyHost.shtml), [CURL.SetOptionDOHSSLVerifyPeer](https://www.mbsplugins.eu/CURLSetOptionDOHSSLVerifyPeer.shtml) and [CURL.SetOptionDOHSSLVerifyStatus](https://www.mbsplugins.eu/CURLSetOptionDOHSSLVerifyStatus.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 11.2pr1](https://www.mbsplugins.de/archive/2021-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 31st March 2021 , last changed 2nd April 2021

  
[CURL.SetOptionDNSShuffleAddresses](CURLSetOptionDNSShuffleAddresses.md) - [CURL.SetOptionDOHSSLVerifyPeer](CURLSetOptionDOHSSLVerifyPeer.md)

[HTML Version](CURLSetOptionDOHSSLVerifyHost.shtml)