Am 23.03.25 um 02:29 schrieb Ulli Horlacher:

     sock = ssl.SSLContext.wrap_socket(sock)

Ich hab da wohl was nicht verstanden. Wie gehts richtig?

Du musst die wrap_socket Methode auf einer *Instanz* der Klasse SSLContext aufrufen.

Diese Instanz erzeugst du am besten mit:

context = ssl.create_default_context()

Hier gibt es Beispielcode:

https://docs.python.org/3/library/ssl.html#socket-creation


Hdh, Chris
_______________________________________________
python-de Mailingliste -- python-de@python.org
Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an 
python-de-le...@python.org
https://mail.python.org/mailman3/lists/python-de.python.org/
Mitgliedsadresse: arch...@mail-archive.com

Reply via email to