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

Add support for ECDSA Certificates #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jborean93
Copy link

Description Of Changes

Adds support for using an ECDSA based certificate which is becoming more common as people move away from RSA. As part of this change it is now able to get the unique key container name for both RSA and ECDSA types but also support editing permissions on keys using the older Legacy CryptoAPI providers and the newer CNG providers.

Motivation and Context

See above

Testing

Ran playbook on a new environment with an ECDSA key. You can use the following to generate an ECDSA key using OpenSSL

openssl ecparam \
    -name secp384r1 \
    -genkey \
    -noout \
    -out cert.key

openssl req \
    -new \
    -x509 \
    -out cert.pem \
    -key cert.key \
    -days 365 \
    -subj "/CN=server.chocolatey.test" \
    -addext "subjectAltName = DNS:server.chocolatey.test"

openssl pkcs12 \
    -export \
    -certpbe PBE-SHA1-3DES \
    -keypbe PBE-SHA1-3DES \
    -macalg SHA1 \
    -out cert.pfx \
    -inkey cert.key \
    -in cert.pem

Operating Systems Testing

Server 2022 but should be supported all the way back to Server 2008. The dotnet APIs should not matter as the playbook install .NET 4.8 which is essentially the latest available.

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 v2 compatibility checked?

Related Issue

Adds support for using an ECDSA based certificate which is becoming more
common as people move away from RSA. As part of this change it is now
able to get the unique key container name for both RSA and ECDSA types
but also support editing permissions on keys using the older Legacy
CryptoAPI providers and the newer CNG providers.
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.

1 participant