<div dir="ltr">Hello,<div><br></div><div>The X509_cmp_time function is documented as returning -1 or 1 on success and 0 on error.</div><div><br></div><div>In fact it returns result of strcmp:</div><div>int X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) {
<br>...
<br>    i = strcmp(buff1, buff2);
<br>    if (i == 0)                 /* wait a second then return younger <span class="gmail-moz-smiley-s1" title=":-)"></span> */
<br>        return -1;
<br>    else
<br>        return i;
<br>} <br></div><div><br></div><div>According to documentation to the strcmp,</div><div><br></div><div>The strcmp() and strncmp() functions return an integer less than, equal 
to, or greater than  zero  if  s1
(or the first n bytes thereof) is found, respectively, to be 
less than, to match, or be greater than s2. <br></div><div><br></div><div>It means (and have been met in practice) that X509_cmp_time() returns other values than 1/-1.</div><div>So it seems reasonable to either update documentation or fix the behavior.</div><div><br></div><div>Thank you!<br clear="all"><div><br></div>-- <br><div class="gmail_signature">SY, Dmitry Belyavsky</div>
</div></div>