Skip to content

Commit

Permalink
Merge pull request #2049 from greenbone/GEA-254_Uploading_DER_file_as…
Browse files Browse the repository at this point in the history
…_TippingPoint_certificate_corrupts_alert

Added check of uploaded certificate for TippingPoint SMS alerts.
  • Loading branch information
timopollmeier authored Jul 21, 2023
2 parents e12a123 + 728ded2 commit a86b543
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -7219,7 +7219,16 @@ validate_tippingpoint_data (alert_method_t method, const gchar *name,

if (strcmp (name, "tp_sms_tls_certificate") == 0)
{
// TODO: Check certificate, return 52 on failure
// Check certificate, return 52 on failure
int ret;
gnutls_x509_crt_fmt_t crt_fmt;

ret = get_certificate_info (*data, strlen(*data), NULL, NULL, NULL,
NULL, NULL, NULL, NULL, &crt_fmt);
if (ret || crt_fmt != GNUTLS_X509_FMT_PEM)
{
return 52;
}
}

if (strcmp (name, "tp_sms_tls_workaround") == 0)
Expand Down

0 comments on commit a86b543

Please sign in to comment.