diff options
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index 9b640cee..44ef063f 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -290,8 +290,14 @@ static void requestFinished_GmRequest_(iGmRequest *d, iTlsRequest *req) { | |||
290 | : finished_GmRequestState); | 290 | : finished_GmRequestState); |
291 | if (d->state == failure_GmRequestState) { | 291 | if (d->state == failure_GmRequestState) { |
292 | if (!isVerified_TlsRequest(req)) { | 292 | if (!isVerified_TlsRequest(req)) { |
293 | d->resp->statusCode = tlsServerCertificateNotVerified_GmStatusCode; | 293 | if (isExpired_TlsCertificate(serverCertificate_TlsRequest(req))) { |
294 | setCStr_String(&d->resp->meta, "Server certificate could not be verified"); | 294 | d->resp->statusCode = tlsServerCertificateExpired_GmStatusCode; |
295 | setCStr_String(&d->resp->meta, "Server certificate has expired"); | ||
296 | } | ||
297 | else { | ||
298 | d->resp->statusCode = tlsServerCertificateNotVerified_GmStatusCode; | ||
299 | setCStr_String(&d->resp->meta, "Server certificate could not be verified"); | ||
300 | } | ||
295 | } | 301 | } |
296 | else { | 302 | else { |
297 | d->resp->statusCode = tlsFailure_GmStatusCode; | 303 | d->resp->statusCode = tlsFailure_GmStatusCode; |