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

Improve Error Messaging for Unmatchable Certificate Bundle #114

Closed
JeyJeyGao opened this issue May 24, 2023 · 0 comments · Fixed by #113
Closed

Improve Error Messaging for Unmatchable Certificate Bundle #114

JeyJeyGao opened this issue May 24, 2023 · 0 comments · Fixed by #113
Assignees

Comments

@JeyJeyGao
Copy link
Collaborator

JeyJeyGao commented May 24, 2023

When a user provides an unmatchable certificate bundle (The same DNs but different public key), the error message currently displayed is:

{"errorCode":"ERROR","errorMessage":"Error occurred during a cryptographic operation."}

This error message is unclear, and it may be difficult for users to understand the underlying issue and how to resolve it. For better user experience, we should optimize this error message to provide more specific information about the problem and potential solutions.

@JeyJeyGao JeyJeyGao self-assigned this May 24, 2023
shizhMSFT pushed a commit that referenced this issue May 24, 2023
)

Fix: 
- optimize the error message for unmatchable certificate bundle (correct
DNs but incorrect public key)
- optimize error message for partial chain


Test:
Previous error message:
```json
{
  "errorCode": "ERROR",
  "errorMessage": "Error occurred during a cryptographic operation."
}
```

Current error message:
```json
{
  "errorCode": "VALIDATION_ERROR",
  "errorMessage": "Failed to build the X509 chain. Error occurred during a cryptographic operation. The certificate bundle is unreadable. Please ensure the certificate bundle matches the specific certifcate."
}
```
Resolves #114 
Signed-off-by: Junjie Gao <[email protected]>

---------

Signed-off-by: Junjie Gao <[email protected]>
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 a pull request may close this issue.

1 participant