diff options
author | Andrew Zaborowski <andrew.zaborowski@intel.com> | 2022-10-31 11:53:39 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2022-11-01 08:53:18 -0500 |
commit | 0efa6407b27dcddcc891a5153d20e7db73f9a8f0 (patch) | |
tree | 7e767fa5b091c8083a8687f0ce6f0b32112d94ba | |
parent | b2898c90e077ed36aba518aaacee65568c44f174 (diff) |
cert: Fix logic in cert_parse_asn1_time check
Fix wrong operator in a condition that ended up being always true.
-rw-r--r-- | ell/cert.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -236,7 +236,7 @@ static uint64_t cert_parse_asn1_time(const uint8_t *data, size_t len, return L_TIME_INVALID; if (unlikely((len != i + 1 || data[i] != 'Z') && - (len != i + 5 || data[i] != '+' || data[i] != '-'))) + (len != i + 5 || (data[i] != '+' && data[i] != '-')))) return L_TIME_INVALID; tm.tm_year = (data[0] - '0') * 10 + (data[1] - '0'); |