Repository navigation
Keep openssl.cnf on upgrade and back up a leftover one on a fresh install - #42
Merged
openssl-machine merged 7 commits intoDec 4, 2026
Conversation
Uninstall keeps config\openssl.cnf but deletes fipsmodule.cnf. After uninstalling a FIPS install, the leftover openssl.cnf includes a file that no longer exists. When Windows Installer considers the leftover edited, it keeps it on the next install, so openssl.exe fails at startup and a FIPS install fails in its fipsinstall step (error 1722). On a fresh install (not an upgrade), move a leftover openssl.cnf to openssl.cnf.<yyyyMMdd-HHmmss>.bak before the files are installed, so the shipped configuration is used and earlier backups are kept. Upgrades keep the existing configuration. Fixes openssl#41 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
/ci |
jogme
requested changes
Dec 4, 2026
jogme
left a comment
Contributor
There was a problem hiding this comment.
It would be nice to notify the user, about this action - about failure and success too, so they know they need to take care of their config file and won't just silently start openssl to work differently.
I'd add a warning maybe to the last window (saying the install was successful) about the moved old config. If the install fails then the config should be moved back to have a clean rollback.
Replace the cmd one-liner that moved a leftover openssl.cnf with inline PowerShell custom actions: - FindLeftoverConfig runs on a fresh install once the wizard is done, or in the execute sequence for a silent install. It picks the backup name, stores it in CONFIG_BACKUP and checks that no other program holds the leftover open. If one does, the user can close it and retry or cancel, instead of the move failing later. - BackupConfig moves the leftover to that name before the files are installed, and BackupConfigRollback moves it back if the install fails. - The final dialog tells the user where the old configuration went. CONFIG_BACKUP is a secure custom property, so the value set in the wizard reaches the elevated install. Test a locked leftover, a failure after the move and the wizard flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Upgrade table detects an installed newer version into AI_NEWERPRODUCTFOUND, but nothing acted on it: an older package installed silently over the newer one (exit 0), and both products stayed registered for the same folder. A launch condition now stops the install with "A newer version of OpenSSL Library is already installed." Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
/ci |
An upgrade within a release branch now only replaces the binaries. ReadPreviousSettings reads the previous version's folder and choices (application, SDK, PATH, FIPS and its type) from what is installed and sets KEEP_SETTINGS, which keeps config\openssl.cnf as it is and makes the wizard go from the license straight to the install. Before, an upgrade overwrote the user's openssl.cnf, which also turned FIPS off. fipsinstall still runs, so fipsmodule.cnf matches the new module. The Upgrade table now only matches versions of the same release branch, so different branches install side by side, each into its own folder. Document upgrades, side-by-side branches, uninstall, the missing Modify and the leftover backup in the README, and fix INSTALL_APPS there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upgrade tests installed the newest published release first. That made them depend on the network and on what happened to be published, and they skipped for the first release of a branch and for side by side until another branch was released. CI now builds two more MSIs from the same binaries, stamped as the next patch release and as the first release of the next branch, and the upgrade, refusal and side-by-side tests use them. --previous-installer still upgrades from a given release, such as the last published one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
/ci |
Adjust PATH also prepends the include and lib folders to INCLUDE and LIB. The branch installed or upgraded last comes first in all three, and every branch of a major version ships the same DLL names, so programs that find OpenSSL through PATH, and builds that use INCLUDE and LIB, get that branch. Registry keys and each branch's own openssl.exe are not affected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Different release branches already installed side by side: Advanced Installer's side-by-side option removes an older version only when it is in the same folder, and each branch has its own. The Upgrade table is limited to the release branch because of what this branch added: with rows matching any older version, ReadPreviousSettings takes another branch over as the previous version (folder, options and openssl.cnf), and the newer-version launch condition refuses to install an older branch next to a newer one. The side-by-side test only installed the older branch first, so it missed the second case; it now runs in both orders, and fails in both with rows that match other branches. The README warns against installing two branches into one folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jogme
approved these changes
Dec 4, 2026
jogme
left a comment
Contributor
There was a problem hiding this comment.
I have the feeling that the upgrade version check logic will need some rework in the future, but good to go for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uninstall keeps
config\openssl.cnfbut deletesfipsmodule.cnf, so after uninstalling a FIPS install the next install could inherit a config that includes a missing file and fail in fipsinstall (error 1722). Upgrades had the opposite problem: they overwrote the user'sopenssl.cnf, which also turned FIPS off.openssl.cnfis moved toopenssl.cnf.<yyyyMMdd-HHmmss>.bak, and the final page names the backup. If the file is locked, the wizard offers Retry (a silent install fails cleanly). Rollback restores the file.openssl.cnfare kept, the wizard skips the option pages, andfipsmodule.cnfis regenerated.The README documents all of this, plus the fact that there is no Modify (changing options means uninstall and install again). New tests cover these paths in the lifecycle, package and GUI suites. CI builds the extra installers they need from the same binaries. Checked on Windows 10 with local x86 builds.
Fixes #41