Bug fix for X.509 two-digit year.
Pointed out by Alexander Tyshlek <tyshlek@fuib.com> and Peter Gutmann <pgut001@cs.auckland.ac.nz>
This commit is contained in:
parent
e8d628156f
commit
20232a9ca5
1 changed files with 2 additions and 2 deletions
|
@ -449,9 +449,9 @@ ASN1_UTCTIME *ctm;
|
|||
X509_gmtime_adj(&atm,-offset);
|
||||
|
||||
i=(buff1[0]-'0')*10+(buff1[1]-'0');
|
||||
if (i < 70) i+=100;
|
||||
if (i < 50) i+=100;
|
||||
j=(buff2[0]-'0')*10+(buff2[1]-'0');
|
||||
if (j < 70) j+=100;
|
||||
if (j < 50) j+=100;
|
||||
|
||||
if (i < j) return (-1);
|
||||
if (i > j) return (1);
|
||||
|
|
Loading…
Reference in a new issue