public void TrustCertificate(string host, string certHash)
        {
            try
            {
                using (SqliteCommand command = m_connection.CreateCommand())
                {
                    SqliteParameter dateString = new SqliteParameter("$dateString", DateTime.UtcNow.ToString("o"));
                    SqliteParameter param0     = new SqliteParameter("$certHash", certHash);
                    SqliteParameter param1     = new SqliteParameter("$host", host);

                    command.CommandText = $"UPDATE cert_exemptions SET DateExempted = $dateString WHERE Thumbprint = $certHash AND Host = $host";
                    command.Parameters.Add(dateString);
                    command.Parameters.Add(param0);
                    command.Parameters.Add(param1);

                    command.ExecuteNonQuery();

                    OnAddCertificateExemption?.Invoke(host, certHash, true);
                }
            }
            catch (Exception ex)
            {
                LoggerUtil.RecursivelyLogException(m_logger, ex);
            }
        }
        public void AddExemptionRequest(HttpWebRequest request, X509Certificate certificate)
        {
            try
            {
                using (SqliteCommand command = m_connection.CreateCommand())
                {
                    bool clearExemptionData  = false;
                    bool createExemptionData = false;

                    SqliteParameter param0 = new SqliteParameter("$certHash", certificate.GetCertHashString());
                    SqliteParameter param1 = new SqliteParameter("$host", request.Host);

                    command.CommandText = $"SELECT Thumbprint, Host, DateExempted, ExpireDate FROM cert_exemptions WHERE Thumbprint = $certHash AND Host = $host";
                    command.Parameters.Add(param0);
                    command.Parameters.Add(param1);
                    using (SqliteDataReader reader = command.ExecuteReader())
                    {
                        if (reader.Read())
                        {
                            clearExemptionData = !isReaderRowCurrentlyExempted(reader);
                        }
                        else
                        {
                            createExemptionData = true;
                        }
                    }

                    if (clearExemptionData)
                    {
                        command.CommandText = $"UPDATE cert_exemptions SET DateExempted = NULL, ExpireDate = NULL WHERE Thumbprint = $certHash AND Host = $host";
                        command.ExecuteNonQuery();

                        OnAddCertificateExemption?.Invoke(request.Host, certificate.GetCertHashString(), false);
                    }
                    else if (createExemptionData)
                    {
                        command.CommandText = $"INSERT INTO cert_exemptions (DateExempted, ExpireDate, Thumbprint, Host) VALUES (NULL, NULL, $certHash, $host)";
                        command.ExecuteNonQuery();

                        OnAddCertificateExemption?.Invoke(request.Host, certificate.GetCertHashString(), false);
                    }
                }
            }
            catch (Exception ex)
            {
                LoggerUtil.RecursivelyLogException(m_logger, ex);
            }
        }