mod/notification-ntfy: check for root certificate availability

... at least with default server.
This commit is contained in:
Christian Hesse 2023-10-13 14:54:20 +02:00
parent 5932586ee4
commit d3992c13a0

View file

@ -63,6 +63,7 @@
:global NtfyTopic;
:global NtfyTopicOverride;
:global CertificateAvailable;
:global EitherOr;
:global IfThenElse;
:global LogPrintExit2;
@ -85,6 +86,11 @@
}
:do {
:if ($NtfyServer = "ntfy.sh") do={
:if ([ $CertificateAvailable "R3" ] = false) do={
$LogPrintExit2 warning $0 ("Downloading required certificate failed.") true;
}
}
/tool/fetch check-certificate=yes-without-crl output=none http-method=post \
$Url http-header-field=$Headers http-data=$Text as-value;
} on-error={