From 3b76ce224e40f670c0988985d9a9405edb7ed24d Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 31 Jul 2020 09:22:56 +0300 Subject: GmRequest: Print the server certificate for testing --- src/gmrequest.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/gmrequest.c b/src/gmrequest.c index 25ff90af..5ee3382c 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c @@ -164,6 +164,14 @@ static void requestFinished_GmRequest_(iAnyObject *obj) { SDL_RemoveTimer(d->timeoutId); d->timeoutId = 0; d->state = finished_GmRequestState; +#if 0 + printf("Server certificate:\n%s\n", + cstrLocal_String(pem_TlsCertificate(serverCertificate_TlsRequest(d->req)))); + iDate expiry; + validUntil_TlsCertificate(serverCertificate_TlsRequest(d->req), &expiry); + printf("Valid until %04d-%02d-%02d\n", expiry.year, expiry.month, expiry.day); + printf("Subject: %s\n", cstrLocal_String(subject_TlsCertificate(serverCertificate_TlsRequest(d->req)))); +#endif unlock_Mutex(&d->mutex); iNotifyAudience(d, finished, GmRequestFinished); } -- cgit v1.2.3