const char msg[] = "Server certificate validation failed, check logs.";
int result;
+ ssize_t size_written;
char buffer[sizeof(HTTP_RESPONSE_FORMAT)
+ 3 * sizeof(error) + sizeof(msg)];
error, "", error, error, msg);
assert(result > 0 && (size_t)result < sizeof(buffer));
- gnutls_record_send(session, buffer, strlen(buffer));
+ size_written = gnutls_record_send(session, buffer, strlen(buffer));
+ if (size_written < 0) {
+ LOG(WARNING, "tls_send_invalid_cert_message(): "
+ "gnutls_record_send(): %s",
+ gnutls_strerror((int)size_written));
+ }
+ /* Just an error message, no need to check if everything was written. */
}