-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[Fix]: Provide a meaningful error for cert sanitization #4307
Conversation
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (hyperledger#4302). Signed-off-by: Artem Barger <artem@bargr.net>
// to sanitize the cert whenever it's intermediate or leaf certificate | ||
parentCert := chain[1] | ||
var parentCert *x509.Certificate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's safe to merge since if it's not at least of size 1, it crashes... right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep.
LGTM, maybe also @ale-linux can take a look |
@denyeart this should probably be backported, and reviewed again by someone else |
…4307) This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (hyperledger#4302). Signed-off-by: Artem Barger <artem@bargr.net> (cherry picked from commit ffc6803)
@Mergifyio backport release-2.5 |
✅ Backports have been created
|
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (#4302). Signed-off-by: Artem Barger <artem@bargr.net> (cherry picked from commit ffc6803)
LGTM, backported to release-2.5. |
This commit takes care to handle the error where certificate sanitization procedure fails to construct certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without clear explanation of what exactly was wrong. Addresses (#4302). Signed-off-by: Artem Barger <artem@bargr.net> (cherry picked from commit ffc6803)
* release-2.5: Bump Go to 1.20.6 (release-2.5) (hyperledger#4322) [Fix]: Provide a meaningful error for cert sanitization (hyperledger#4307) # Conflicts: # .github/workflows/release.yml
This commit handles the error where the certificate sanitization procedure fails to construct the certificate chain due to misconfiguration. Before this commit, the peer will simply fail with panic without a clear explanation of what exactly was wrong.
Addresses (#4302).