Hacker News new | ask | show | jobs
by woodruffw 20 days ago
The Web PKI does not allow self-signed certificates. You can self-sign a certificate and badger your users into trusting it, but as you note the browsers won't help you do that because it's a security pit of despair.

> you won't even allow the equivalent of a self-signed certificate at all.

You can embed a signature into a Python package if you want. There's even a spec for it[1], although nobody has ever really adopted it. And, of course, you can always host a signature somewhere else (and even link to it via standard packaging metadata). But PyPI will no longer allow you to upload a PGP sidecar (which were never standardized, either) because we have strong evidence that (1) nobody ever really bothered to verify them, and (2) even if they had, the quality of the key material was poor.

[1]: https://peps.python.org/pep-0427/#signed-wheel-files

1 comments

> The Web PKI does not allow self-signed certificates.

That's not what the rest of your post says. The rest of your post says that you can use one for your website--which of course is true since no one can stop you if you insist on doing it--but that the rest of the Web infrastructure will treat your certificate poorly.

I am simply pointing out that it looks to me like PyPI's attestation mechanism is taking a similar viewpoint to the Web infrastructure in this respect.

> You can embed a signature into a Python package if you want.

I'm talking about the attestation mechanism. That mechanism, unless I'm missing something, does not support self-signed certificates.