Commit b284687
authored
fix: optimize the error message for unmatchable certificate bundle (#113)
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 <junjiegao@microsoft.com>
---------
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>1 parent d49ee99 commit b284687
File tree
3 files changed
+42
-4
lines changed- Notation.Plugin.AzureKeyVault.Tests
- Certificate
- TestData
- Notation.Plugin.AzureKeyVault/Certificate
3 files changed
+42
-4
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
37 | | - | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
0 commit comments