diff options
author | Martin Willi <martin@strongswan.org> | 2007-02-08 14:31:59 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-02-08 14:31:59 +0000 |
commit | 61c0e0f220c101677307edab1b2e1716e1f44c90 (patch) | |
tree | c998a3866519dbb3a5388115b4dd21393bbccc47 /src/libstrongswan/crypto/x509.c | |
parent | 7995489a6d054a88964e462daecb9da4321111d5 (diff) | |
download | strongswan-61c0e0f220c101677307edab1b2e1716e1f44c90.tar.bz2 strongswan-61c0e0f220c101677307edab1b2e1716e1f44c90.tar.xz |
fixed printf() hooks for time
Diffstat (limited to 'src/libstrongswan/crypto/x509.c')
-rwxr-xr-x | src/libstrongswan/crypto/x509.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstrongswan/crypto/x509.c b/src/libstrongswan/crypto/x509.c index e457a1bee..d563c00cc 100755 --- a/src/libstrongswan/crypto/x509.c +++ b/src/libstrongswan/crypto/x509.c @@ -1068,7 +1068,7 @@ static int print(FILE *stream, const struct printf_info *info, /* determine the current time */ time_t now = time(NULL); - written += fprintf(stream, "%#T\n", &this->installed, utc); + written += fprintf(stream, "%#T\n", this->installed, utc); if (this->subjectAltNames->get_count(this->subjectAltNames)) { @@ -1095,20 +1095,20 @@ static int print(FILE *stream, const struct printf_info *info, written += fprintf(stream, " subject: '%D'\n", this->subject); written += fprintf(stream, " issuer: '%D'\n", this->issuer); written += fprintf(stream, " serial: %#B\n", &this->serialNumber); - written += fprintf(stream, " validity: not before %#T, ", &this->notBefore, utc); + written += fprintf(stream, " validity: not before %#T, ", this->notBefore, utc); if (now < this->notBefore) { - written += fprintf(stream, "not valid yet (valid in %V)\n", &now, &this->notBefore); + written += fprintf(stream, "not valid yet (valid in %V)\n", now, this->notBefore); } else { - written += fprintf(stream, "ok\n"); + written += fprintf(stream, "ok (expires in %V)\n", now, this->notAfter); } - written += fprintf(stream, " not after %#T, ", &this->notAfter, utc); + written += fprintf(stream, " not after %#T, ", this->notAfter, utc); if (now > this->notAfter) { - written += fprintf(stream, "expired (since %V)\n", &now, &this->notAfter); + written += fprintf(stream, "expired (since %V)\n", now, this->notAfter); } else { @@ -1146,10 +1146,10 @@ static int print(FILE *stream, const struct printf_info *info, switch (this->status) { case CERT_GOOD: - written += fprintf(stream, " until %#T", &this->until, utc); + written += fprintf(stream, " until %#T", this->until, utc); break; case CERT_REVOKED: - written += fprintf(stream, " on %#T", &this->until, utc); + written += fprintf(stream, " on %#T", this->until, utc); break; case CERT_UNKNOWN: case CERT_UNDEFINED: |