---
name: "ne_ssl_set_protovers"
section: "3"
platform: "linux"
package: "neon"
version: "0.37.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ne_ssl_set_protovers"
---

# ne\_ssl\_set\_protovers(3)

set session SSL/TLS minimum or maximum protocol version

## NAME

ne\_ssl\_set\_protovers - set session SSL/TLS minimum or maximum protocol version

## SYNOPSIS

```
#include <ne_session.h>
```

**int ne\_ssl\_set\_protovers(ne\_session \****sess***, enum ne\_ssl\_protocol** *min***, enum ne\_ssl\_protocol** *max***);**

## DESCRIPTION

The **ne\_ssl\_set\_protovers** function sets the minimum and/or maximum SSL/TLS version. Either minimum and/or maximum may be specified as **NE\_SSL\_PROTO\_UNSPEC**, in which case no limit is imposed.

## RETURN VALUE

The **ne\_ssl\_set\_protovers** function returns zero on success or non-zero on error. Errors include an invalid range (minimum above maximum), or if the protocol version is not supported by the SSL/TLS toolkit in use, or if SSL/TLS is not in use for the session.

## HISTORY

**ne\_ssl\_set\_protovers** is available in neon 0.34.0 and later.

## SEE ALSO

[**ne\_ssl\_proto\_name**(3)](/ne_ssl_proto_name/3.md), [**ne\_session\_create**(3)](/ne_session_create/3.md).

## COPYRIGHT

Copyright © 2001-2026 Joe Orton\
