nonebot / nonecorn

ASGI server that forked from hypercorn, with extra features beyond asgi spec
MIT License
6 stars 1 forks source link

RDN string spacing #25

Open brussee opened 1 year ago

brussee commented 1 year ago

Is it correct to add extra whitespace here around the equals sign? (Probably, but...) https://github.com/nonebot/nonecorn/blob/nonecorn_dev/src/hypercorn/utils.py#L277

Inserting whitespace is not advised because it may not be obvious to the user which whitespace is part of the DN string and which whitespace was added for readability.

From: https://www.rfc-editor.org/rfc/rfc4514

At least for consistency I'd argue to have a similar representation as the PEM format produced by OpenSSL, which does not have (extra) spaces around equals sign (checked on v1.1.1n).

synodriver commented 1 year ago

Well, maybe we can add a config for that?