Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating PFX is appending to the pfx rather than overwriting #2397

Closed
efficiondave opened this issue Jun 19, 2023 · 1 comment
Closed

Generating PFX is appending to the pfx rather than overwriting #2397

efficiondave opened this issue Jun 19, 2023 · 1 comment
Milestone

Comments

@efficiondave
Copy link

On renewal, I need to generate a PFX file in addition to binding to IIS. Using the latest 2.2 version, I've set this up and it is running correctly except that it seems to be appending the new cert to the PFX file rather than overwriting the cert. This is the command line that it is running:
wacs.exe --source iis --commonname mail1.MYDOMAIN.net --siteid 2 --store certificatestore,pfxfile --pfxfilepath c:\SmarterMail\Certificates\ --installation iis

Is there something I should be doing differently? If I delete the pfx file and then run the renewal, everything is great.

@WouterTinus
Copy link
Member

Looks like there's definitely a bug there, but not exactly the one that you described. As far as a can tell the new version is written over the previous one but without truncating the file. I.e. if the new version is smaller than the old one, you'll end up with bytes from the previous version at the end of the file. I'm not sure how resilient the average pfx parser is, but it's easy to imagine the file would fail all kinds of sanity checks in that state.

@WouterTinus WouterTinus added this to the 2.2.6 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants