Skip to content

Commit

Permalink
[Fleet] Fix output ca_trusted_fingerprint validation message (#154651)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet authored Apr 17, 2023
1 parent 046d97c commit 70eb193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ describe('Output form validation', () => {
'9F:0A:10:41:14:57:AD:DE:39:82:EF:01:DF:20:D2:E7:AA:53:A8:EF:29:C5:0B:CB:FA:3F:3E:93:AE:BF:63:1B'
);

expect(res).toEqual(['CA trusted fingerprint should be a base64 CA sha256 fingerprint']);
expect(res).toEqual([
'CA trusted fingerprint should be valid HEX encoded SHA-256 of a CA certificate',
]);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ export function validateCATrustedFingerPrint(value: string) {
if (value !== '' && !value.match(/^[a-zA-Z0-9]+$/)) {
return [
i18n.translate('xpack.fleet.settings.outputForm.caTrusterdFingerprintInvalidErrorMessage', {
defaultMessage: 'CA trusted fingerprint should be a base64 CA sha256 fingerprint',
defaultMessage:
'CA trusted fingerprint should be valid HEX encoded SHA-256 of a CA certificate',
}),
];
}
Expand Down

0 comments on commit 70eb193

Please sign in to comment.