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

RUBY-3497: Use leaf cert instead of last one in verify_ocsp_endpoint #2876

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

Conversation

rayway30419
Copy link

Summary:
The MongoDB Ruby driver incorrectly handles the OCSP certificate chain by using the last certificate in the chain as the issuer. The correct behavior should be to use the certificate directly after the leaf certificate. This issue causes OCSP verification to fail when the chain contains multiple certificates.

Details:
In the current implementation of the MongoDB Ruby driver, the OCSP verification uses the last certificate in the peer_cert_chain as the issuer certificate. However, according to the correct practice and as implemented in the official MongoDB Go driver, the certificate directly after the leaf certificate should be used as the issuer.

@comandeo-mongo comandeo-mongo changed the title fix(Mongo::Socket::SSL#verify_ocsp_endpoint!): use leaf cert instead of last one RUBY-3498: Use leaf cert instead of last one in verify_ocsp_endpoint Jun 17, 2024
@comandeo-mongo comandeo-mongo changed the title RUBY-3498: Use leaf cert instead of last one in verify_ocsp_endpoint RUBY-3497: Use leaf cert instead of last one in verify_ocsp_endpoint Jun 17, 2024
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