# OpenSSL.SSL' has no attribute 'TLSv1\_3\_METHOD

**URL:** <https://forum.cedalo.com/t/openssl-ssl-has-no-attribute-tlsv1-3-method/746>\
**Category:** Security\
**Created:** [February 20, 2023, 8:26am UTC](https://forum.cedalo.com/t/openssl-ssl-has-no-attribute-tlsv1-3-method/746 "2023-02-20T08:26:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![byronbonkers](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.cedalo.com/byronbonkers/32/499_2.png) [@byronbonkers](https://forum.cedalo.com/u/byronbonkers)\
**Post date:** [February 20, 2023, 8:26am UTC](https://forum.cedalo.com/t/openssl-ssl-has-no-attribute-tlsv1-3-method/746/1 "2023-02-20T08:26:38Z")

</div>

I have gotten the site working, but my python file that I use to connect to the mqtt broker, doesn’t want to support tlsv3 and it errors out, I’m using openssl 1.1.1.n and it still doesn’t want to, it says `AttributeError: module `‘OpenSSL.SSL’ has no attribute ‘TLSv1\_3\_METHOD’` Please help me fix this

---

<div class="post-metadata">

**Author:** ![roger.light](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@roger.light](https://forum.cedalo.com/u/roger.light)\
**Post date:** [February 23, 2023, 9:27am UTC](https://forum.cedalo.com/t/openssl-ssl-has-no-attribute-tlsv1-3-method/746/2 "2023-02-23T09:27:25Z")

</div>

Hi,

pyopenssl doesn’t have that method. The documentation states:

```auto
These constants represent the different SSL methods to use when creating a context object. New code should only use TLS_METHOD, TLS_SERVER_METHOD, or TLS_CLIENT_METHOD. If the underlying OpenSSL build is missing support for any of these protocols, constructing a Context using the corresponding *_METHOD will raise an exception.

```

So it looks like you should be using `TLS_CLIENT_METHOD`.

Regards,

Roger
