Skip to content

generate_adhoc_ssl_pair() uses hardcoded subject alternative name of * #2158

@henryk

Description

@henryk

Steps to reproduce:

  • Use a development server created with werkzeug.service.generate_adhoc_ssl_pair(cn="localhost") (I'm using pytest-httpserver)
  • Connect with Python built-in methods (making sure to provide the adhoc certificate as a CA file)

Actual results:

  • A hardcoded SAN of * is added to the certificate, leading to ssl.SSLCertVerificationError: ("sole wildcard without additional labels are not support: '*'.",)

Expected results:

  • The cn value should also be the single DNS name in the SAN

Environment:

  • Python version: Python 3.8.5
  • Werkzeug version: 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions