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 fix suggested in sros2 bug report. #1552

Merged

Conversation

jpace121
Copy link

Description

Fixes #1546 using the same method as OpenDDS/OpenDDS#3992 (comment).

As stated in: OpenDDS/OpenDDS#3992 (comment)

"Implement the suggestion in ros2/sros2#282.
Specifically, use PKCS7_NOINTERN to not accept any signatures in the signed document. This, in turn, requires the use of the certs parameter to PKCS7_verify. PKCS7_NOVERIFY is used since the permissions CA certificate will not be chain verified."

Verification

I built ros2 rolling from source with cyclonedds tag 0.10.2 checked out and used the scripts here copied and slightly modified from the sros2 issue to verify the reported issue. Specifically, the should-fail script should not allow the subscriber to receive messages at the end.

I then cherry-picked this issue a branch forking from the 0.10.2 tag and verified the should-fail script now failed. I used the should-succeed script to test a configuration where the permissions did allow the two nodes to talk, and verified that worked as well.

I referenced the openssl docs here to confirm the API and heavily based this PR on the OpenDDS PR linked above.

Fixes: #1546
Related to: ros2/sros2#282

Signed-off-by: James Pace [email protected]

(Apologies for the last PR. I was a little quick to the draw there...)

As stated in: OpenDDS/OpenDDS#3992 (comment)

"Implement the suggestion in ros2/sros2#282.
Specifically, use PKCS7_NOINTERN to not accept any signatures in the signed document.
This, in turn, requires the use of the certs parameter to PKCS7_verify.
PKCS7_NOVERIFY is used since the permissions CA certificate will not be chain verified."

Fixes: eclipse-cyclonedds#1546
Related to: ros2/sros2#282

Signed-off-by: James Pace <[email protected]>
Copy link
Contributor

@eboasson eboasson left a comment

Choose a reason for hiding this comment

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

That took some reading and double-checking to even feel I am allowed to write "LGTM" 😅 I concur with the analysis and proposal on sros and then this is the logical consequence. Thank you very much @jpace121 !

@eboasson eboasson merged commit de27a11 into eclipse-cyclonedds:master Feb 2, 2023
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.

Chain of trust issues with a single CA certificate
2 participants