Skip to content

fix(ssl): honor updated le-mail on certificate renewal#497

Open
mrrobot47 wants to merge 1 commit into
EasyEngine:developfrom
mrrobot47:fix/renewal-honor-le-mail
Open

fix(ssl): honor updated le-mail on certificate renewal#497
mrrobot47 wants to merge 1 commit into
EasyEngine:developfrom
mrrobot47:fix/renewal-honor-le-mail

Conversation

@mrrobot47

Copy link
Copy Markdown
Member

Problem

On renewal, getOrCreateDistinguishedName() rebuilt the CSR's distinguished name using the stored email (from first issuance) and ignored the le-mail value passed in. So changing le-mail never took effect on subsequent certificates — every renewal CSR kept the original address. (The SAN list already updated correctly; only the email was sticky.)

Fix

When a stored distinguished name exists, use the passed $email if it is non-empty, falling back to the stored email only when none is provided. The updated DN is persisted as before, so the new email sticks for future renewals. All other DN fields and the SAN list are unchanged.

Testing

Manual: change le-mail, trigger a renewal → the CSR carries the new email; with an empty le-mail, the DN falls back to the stored address.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants