Skip to content

Conversation

Tugzrida
Copy link
Contributor

As mentioned in #1530, I recently ran into some issues with Valet certs not passing OpenSSL's X509 strict mode, which was enabled by default in Python 3.13. This made it difficult for python apps to communicate with php apps run under Valet during development.

This PR adds the necessary X509 extensions to both the CA and per-site leaf certificates to satisfy strict mode.

Note that the reference to the extension config file has been removed from the CSR creation command as the AKID extension can't be added without the CA certificate present (which it isn't when running this command). This has no effect on the final certificate as the CSR extensions were being overwritten when the certificate was signed anyway.

I have tested the migration pathway of this change under VirtualBuddy, and securing sites after this change continues to work regardless of whether the CA certificate was generated before or after this change.

The only thing to note is if the CA cert was generated prior to this change (and therefore doesn't have a SKID extension), generated leaf certificates will have a blank AKID, which shouldn't impact their validity to non-strict mode clients, however they will not pass strict mode validation until the CA is deleted and re-created with the new extensions.

If desired, logic could be added to detect the presence of the SKID extension in the CA certificate and forcibly re-create it if not found, however I didn't think this was wise as a default as it would disrupt the trust of other Valet site certificates until they too were re-created, which would likely be unexpected behaviour.

@mattstauffer
Copy link
Collaborator

As someone who's not an expert on OpenSSL, I read it and tested it and I think it works fine. Opening up for anyone else to comment, and if I dont' hear any other notes in about a week, we'll merge. Thanks @Tugzrida!

@Tugzrida
Copy link
Contributor Author

Morning @mattstauffer, is this good to merge and release now?

@drbyte
Copy link
Contributor

drbyte commented Sep 30, 2025

Looks good to me 👍

@mattstauffer mattstauffer merged commit 04eb1b9 into laravel:master Oct 4, 2025
6 checks passed
@mattstauffer
Copy link
Collaborator

Thanks @Tugzrida and @drbyte!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants