---
name: "mongoc_stream_tls_check_cert"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.4.2-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_stream_tls_check_cert"
---

# mongoc\_stream\_tls\_check\_cert(3)

The mongoc\_stream\_tls\_check\_cert() function shall perform a RFC-6125 certificate verification.

## NAME

mongoc\_stream\_tls\_check\_cert() - The mongoc\_stream\_tls\_check\_cert() function shall perform a RFC-6125 certificate verification.

## SYNOPSIS

```
bool
mongoc_stream_tls_check_cert (mongoc_stream_t *stream,
                              const char      *host);
```

## PARAMETERS

- **stream**

  A **mongoc\_stream\_tls\_t**

- **host**

  A UTF‐8 string holding the hostname used in socket creation. This value is what will be matched against the server provided certificate.

The **[mongoc\_stream\_tls\_check\_cert(3)](/mongoc_stream_tls_check_cert/3.md)** function shall perform a RFC‐6125 certificate verification.

## RETURNS

The **[mongoc\_stream\_tls\_check\_cert(3)](/mongoc_stream_tls_check_cert/3.md)** function returns true if the certificate is valid was successful. If false, openssl errors may be set.

## COLOPHON

**This page is part of MongoDB C Driver.** Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
