---
name: "mongoc_stream_tls_do_handshake"
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_do_handshake"
---

# mongoc\_stream\_tls\_do\_handshake(3)

This function shall perform an SSL handshake on the underlying stream.

## NAME

mongoc\_stream\_tls\_do\_handshake() - This function shall perform an SSL handshake on the underlying stream.

## SYNOPSIS

```
bool
mongoc_stream_tls_do_handshake (mongoc_stream_t *stream,
                                int32_t          timeout_msec);
```

## PARAMETERS

- **stream**

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

- **timeout\_msec**

  A timeout, in milliseconds, for the handshake.

This function shall perform an SSL handshake on the underlying stream.

## RETURNS

The **[mongoc\_stream\_tls\_do\_handshake(3)](/mongoc_stream_tls_do_handshake/3.md)** function returns true if the handshake was successful. If false, errno or 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.
