IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
434 stars 147 forks source link

EConvertError in TIdX509.notBefore and TIdX509.notAfter properties for 4-digit years #523

Closed rlebeau closed 4 months ago

rlebeau commented 4 months ago

If an x509 certificate uses 4-digit years (ie, the GeneralizedTime format) in its "Not Before" and/or "Not After" dates, an EConvertError exception is raised. This is because the UTC_Time_Decode() function in the IdSSLOpenSSLHeaders unit only supports 2-digit years (ie, the UTCTime format). It needs to be updated to handle both formats.