implemented RFC4478 (repeated authentication)
changed %V printf handler to take a time delta, %#V now takes two arguments
This commit is contained in:
@@ -544,7 +544,7 @@ static void list(const private_x509ac_t *this, FILE *out, bool utc)
|
||||
fprintf(out, " validity: not before %#T, ", &this->notBefore, utc);
|
||||
if (now < this->notBefore)
|
||||
{
|
||||
fprintf(out, "not valid yet (valid in %V)\n", &now, &this->notBefore);
|
||||
fprintf(out, "not valid yet (valid in %#V)\n", &now, &this->notBefore);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -554,14 +554,14 @@ static void list(const private_x509ac_t *this, FILE *out, bool utc)
|
||||
fprintf(out, " not after %#T, ", &this->notAfter, utc);
|
||||
if (now > this->notAfter)
|
||||
{
|
||||
fprintf(out, "expired (%V ago)\n", &now, &this->notAfter);
|
||||
fprintf(out, "expired (%#V ago)\n", &now, &this->notAfter);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(out, "ok");
|
||||
if (now > this->notAfter - ACERT_WARNING_INTERVAL * 60 * 60 * 24)
|
||||
{
|
||||
fprintf(out, " (expires in %V)", &now, &this->notAfter);
|
||||
fprintf(out, " (expires in %#V)", &now, &this->notAfter);
|
||||
}
|
||||
fprintf(out, " \n");
|
||||
}
|
||||
|
||||
@@ -279,11 +279,11 @@ static void list_certinfos(private_ca_info_t *this, FILE *out, bool utc)
|
||||
fprintf(out, "%#T, until %#T, ", &thisUpdate, utc, &nextUpdate, utc);
|
||||
if (now > nextUpdate)
|
||||
{
|
||||
fprintf(out, "expired (%V ago)\n", &now, &nextUpdate);
|
||||
fprintf(out, "expired (%#V ago)\n", &now, &nextUpdate);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(out, "ok (expires in %V)\n", &now, &nextUpdate);
|
||||
fprintf(out, "ok (expires in %#V)\n", &now, &nextUpdate);
|
||||
}
|
||||
fprintf(out, " serial: %#B, %N\n", &serial,
|
||||
cert_status_names, certinfo->get_status(certinfo));
|
||||
|
||||
@@ -463,11 +463,11 @@ static void list(private_crl_t *this, FILE* out, bool utc)
|
||||
}
|
||||
else if (now > this->nextUpdate)
|
||||
{
|
||||
fprintf(out, "expired (%V ago)\n", &now, &this->nextUpdate);
|
||||
fprintf(out, "expired (%#V ago)\n", &now, &this->nextUpdate);
|
||||
}
|
||||
else if (now > this->nextUpdate - CRL_WARNING_INTERVAL * 60 * 60 * 24)
|
||||
{
|
||||
fprintf(out, "ok (expires in %V)\n", &now, &this->nextUpdate);
|
||||
fprintf(out, "ok (expires in %#V)\n", &now, &this->nextUpdate);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1182,7 +1182,7 @@ static void list(private_x509_t *this, FILE *out, bool utc)
|
||||
fprintf(out, " validity: not before %#T, ", &this->notBefore, utc);
|
||||
if (now < this->notBefore)
|
||||
{
|
||||
fprintf(out, "not valid yet (valid in %V)\n", &now, &this->notBefore);
|
||||
fprintf(out, "not valid yet (valid in %#V)\n", &now, &this->notBefore);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1192,14 +1192,14 @@ static void list(private_x509_t *this, FILE *out, bool utc)
|
||||
fprintf(out, " not after %#T, ", &this->notAfter, utc);
|
||||
if (now > this->notAfter)
|
||||
{
|
||||
fprintf(out, "expired (%V ago)\n", &now, &this->notAfter);
|
||||
fprintf(out, "expired (%#V ago)\n", &now, &this->notAfter);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(out, "ok");
|
||||
if (now > this->notAfter - CERT_WARNING_INTERVAL * 60 * 60 * 24)
|
||||
{
|
||||
fprintf(out, " (expires in %V)", &now, &this->notAfter);
|
||||
fprintf(out, " (expires in %#V)", &now, &this->notAfter);
|
||||
}
|
||||
fprintf(out, " \n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user