Skip to content

How to use SSL without certificate verification? #9875

@60999

Description

@60999

CircuitPython version

Adafruit CircuitPython 9.2.1 on 2024-11-20; Adafruit Feather ESP32-S3 Reverse TFT with ESP32S3

It seems there isn't such a function. Is it necessary to verify the server certificate after enabling SSL?

Code/REPL

# 创建 SSL 上下文并禁用证书验证
ssl_context = ssl.SSLContext(ssl.create_default_context())
ssl_context.check_hostname = False
# ssl_context.(ssl.CERT_NONE, None)  # 禁用证书验证
ssl_context.set_default_verify_paths()

Behavior

Failed to verify certificate

Description

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions