summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/system_camanager.php2
-rw-r--r--usr/local/www/system_certmanager.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/system_camanager.php b/usr/local/www/system_camanager.php
index 2662775..6eddd39 100644
--- a/usr/local/www/system_camanager.php
+++ b/usr/local/www/system_camanager.php
@@ -138,6 +138,8 @@ if ($_POST) {
$reqdfieldsn = array(
gettext("Descriptive name"),
gettext("Certificate data"));
+ if ($_POST['cert'] && (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE")))
+ $input_errors[] = gettext("This certificate does not appear to be valid.");
}
if ($pconfig['method'] == "internal") {
$reqdfields = explode(" ",
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 36a11bb..0113461 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -162,6 +162,8 @@ if ($_POST) {
gettext("Descriptive name"),
gettext("Certificate data"),
gettext("Key data"));
+ if ($_POST['cert'] && (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE")))
+ $input_errors[] = gettext("This certificate does not appear to be valid.");
}
if ($pconfig['method'] == "internal") {
OpenPOWER on IntegriCloud