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 -key-encipherment-selector and use CA certs for verification #217

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

hslatman
Copy link
Contributor

When a SCEP server returns multiple certificates, it is possible that not all certificates can or should be used for encryption. There already was a KeyEnciphermentsSelector, but that wasn't readily usable with the provided SCEP client. A new flag was added to enable this selector: -key-encipherment-selector. It will filter out certificates that aren't marked as being usable for key or data encryption.

When verifying the PKIMessage from the CA only the Recipients in the outgoing message were being looked through when selecting a certificate to verify the signature. This commit changes that by including all certificates returned by the CA when the client performs the GetCACerts operation.

When a SCEP server returns multiple certificates, it is possible
that not all certificates can or should be used for encryption.
There already was a `KeyEnciphermentsSelector`, but that wasn't
readily usable with the provided SCEP client. A new flag was added
to enable this selector: `-key-encipherment-selector`. It will
filter out certificates that aren't marked as being usable for
key or data encryption.

When verifying the `PKIMessage` from the CA only the `Recipients`
in the outgoing message were being looked through when selecting
a certificate to verify the signature. This commit changes that
by including all certificates returned by the CA when the client
performs the `GetCACerts` operation.
Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hslatman! Sorry for the mega delay here. In general we don't like globals, so would prefer to keep the flags inside of main. Would you mind putting those back and I can re-review? Thanks!

Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jessepeterson jessepeterson merged commit 781f804 into micromdm:main Jul 15, 2024
6 checks passed
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.

2 participants