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

(#281) Prevents Creation Of Unrequired Self-Signed Certificate #283

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JPRuskin
Copy link
Member

Description Of Changes

This change ensures the Chocolatey Management Service package gets the appropriate parameter in order to not generate unneeded certificate(s).

Motivation and Context

The Chocolatey-Management-Service package generates a self-signed certificate to use if no thumbprint is specified as a parameter.

Regardless of if a certificate was specified, we were installing it without a thumbprint and then setting the certificate later.

This resulted in an unused self-signed certificate being generated and stored.

Testing

Operating Systems Testing

  • Windows Server 2022 (Local, Automated)
  • Windows Server 2019 (Automated Only)

Change Types Made

  • [ ] Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • [ ] Breaking change (fix or feature that could cause existing functionality to change).
  • [ ] Documentation changes.
  • PowerShell code changes.

Change Checklist

  • [ ] Requires a change to the documentation.
  • [ ] Documentation has been updated.
  • [ ] Tests to cover my changes, have been added.
  • [ ] All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issue

Fixes #281

@JPRuskin JPRuskin force-pushed the serviceCertificateThumbprint branch from 9f84d14 to 760802b Compare December 13, 2024 10:46
@JPRuskin JPRuskin force-pushed the serviceCertificateThumbprint branch from 760802b to 6b877bd Compare January 8, 2025 18:05
@steviecoaster steviecoaster self-requested a review January 8, 2025 18:09
The Chocolatey-Management-Service package generates a self-signed certificate to use if no thumbprint is specified as a parameter.

Regardless of if a certificate was specified, we were installing it without a thumbprint and then setting the certificate later.

This resulted in an unused self-signed certificate being generated and stored.

This change ensures the package gets the appropriate parameter in order to not generate unneeded certificate(s).
@JPRuskin JPRuskin force-pushed the serviceCertificateThumbprint branch from 6b877bd to 1cae704 Compare January 9, 2025 15:03
Having CertificateThumbprint and Thumbprint treated differently across the scripts is annoying, and can introduce confusion.

This change brings all the scripts into the same $Thumbprint (with an alias for folk who instinctively use CertificateThumbprint), and an argument completer.
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.

Quickstart Guide should not create a self-signed certificate if a CertificateThumbprint is passed
1 participant