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

certutil: Add functional options #239

Closed
wants to merge 1 commit into from

Conversation

AndersonQ
Copy link
Member

What does this PR do?

Add functional options to NewRootCA and GenerateChildCert to allow setting a prefix for the CN and multiple DNS names.

Also, it fixes GenerateChildCert generating a RSA instead of EC certificate

Why is it important?

  • set CN prefix: when generating and using multiple certificates, such as to configure mTLS, it's hard to debug any issue if all certificates have the same CN
  • add multiple DNS names: when trying to simulate a real situation, it might require a certificate to have multiple DNSs

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have added tests that prove my fix is effective or that my feature works

Author's Checklist

add functional options to New*RootCA and Generate*ChildCert to allow setting a prefix for the CN and multiple DNS names
@AndersonQ AndersonQ added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Oct 16, 2024
@AndersonQ AndersonQ self-assigned this Oct 16, 2024
@AndersonQ AndersonQ requested a review from a team as a code owner October 16, 2024 09:00
@AndersonQ AndersonQ requested review from mauri870 and faec and removed request for a team October 16, 2024 09:00
@AndersonQ AndersonQ closed this Oct 16, 2024
@AndersonQ AndersonQ deleted the certutil-add-opts-func branch October 16, 2024 09:01
@AndersonQ
Copy link
Member Author

closed in favour of #240

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @AndersonQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants