tls: fix daysUntilFirstCertExpires() return nil when expired#21428
tls: fix daysUntilFirstCertExpires() return nil when expired#21428mattklein123 merged 7 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Loong Dai <loong.dai@intel.com>
|
There is no point in using an optional if you are going to return 0. Please fix the broken callsite to handle the lack of a value and add a test. Thanks! /wait |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks for fixing and add the test. Please check CI also.
/wait
Signed-off-by: Loong Dai <loong.dai@intel.com>
Signed-off-by: Loong Dai <loong.dai@intel.com>
Signed-off-by: Loong Dai <loong.dai@intel.com>
Signed-off-by: Loong Dai <loong.dai@intel.com>
|
Retrying Azure Pipelines: |
|
Please check CI /wait |
Do not know why server terminated abruptly, retest. /retest |
|
/retest |
|
Retrying Azure Pipelines: |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, LGTM with small comments. Sorry for the CI problems I think they are fixed.
/wait
| // NOLINT(namespace-envoy) | ||
| constexpr char TEST_EXPIRED__CERT_HASH[] = "FC:F7:07:14:C3:0D:B4:BE:0B:BF:23:9B:C2:09:DA:CD:54:66:" | ||
| "32:65:07:50:35:E8:D0:14:ED:D6:B1:96:A1:3C"; |
There was a problem hiding this comment.
I think this is unused. Delete?
There was a problem hiding this comment.
Now certs.sh will generate a hash file, not only here, but also in other tests, although some of the hash files are unused. Do we delete them as well?
There was a problem hiding this comment.
OK I see, that's fine, thanks.
| // NOLINT(namespace-envoy) | ||
| constexpr char TEST_SERVER_CERT_HASH[] = "DC:E2:2B:65:90:43:9A:36:1C:8E:6D:CA:42:8A:8C:37:C7:A1:77:" | ||
| "00:5B:C1:3E:33:8A:B9:2D:04:2C:B1:3F:0A"; | ||
| constexpr char TEST_SERVER_CERT_NOT_BEFORE[] = "Apr 7 16:46:35 2022 GMT"; | ||
| constexpr char TEST_SERVER_CERT_NOT_AFTER[] = "Apr 6 16:46:35 2024 GMT"; |
There was a problem hiding this comment.
Can you add comments on where this came from and how to regenerate it if needed?
There was a problem hiding this comment.
All are generated by certs.h, refer to https://github.com/envoyproxy/envoy/blob/main/test/config/integration/certs/README.md, or I can update that script and add comments during generating.
…oxy#21428) Signed-off-by: Loong Dai <loong.dai@intel.com> Signed-off-by: Amila Senadheera <amila.15@cse.mrt.ac.lk>
Signed-off-by: Loong Dai loong.dai@intel.com
Add days_until_first_cert_expiring stat integration test to ensure no nil error.
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]