FreeOpcUa / opcua-asyncio

OPC UA library for python >= 3.7
GNU Lesser General Public License v3.0
1.04k stars 346 forks source link

Python3.12: fix CryptographyDeprecationWarning #1597

Closed jbeckerwsi closed 4 months ago

jbeckerwsi commented 4 months ago

Address the following deprecation warnings when using python 3.12

`2024-03-04 10:11:02,506 ¦ py.warnings ¦ WARNING ¦ warnings ¦ _showwarnmsg ¦ 109 ¦ 0 ¦ 0 ¦ c:....\opcua-asyncio\asyncua\crypto\uacrypto.py:334: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_after_utc. if cert.not_valid_after < now:

2024-03-04 10:11:02,507 ¦ py.warnings ¦ WARNING ¦ warnings ¦ _showwarnmsg ¦ 109 ¦ 0 ¦ 0 ¦ c:....\opcua-asyncio\asyncua\crypto\uacrypto.py:337: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_before_utc. if cert.not_valid_before > now:`

oroulet commented 4 months ago

thanks. I had tried to fix that without really finding a good solution