summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenny Page <dennypage@me.com>2016-09-05 07:28:53 -0700
committerRenato Botelho <garga@FreeBSD.org>2016-09-05 13:32:58 -0300
commit82bf88b0853951928b7cf1b7930e6f6f1d90f89d (patch)
tree962c47ea0660894b12dd429ccba53aa01fb7ad80
parent526402e587f33ab0897590d72f38338be06f0b42 (diff)
downloadFreeBSD-ports-82bf88b0853951928b7cf1b7930e6f6f1d90f89d.zip
FreeBSD-ports-82bf88b0853951928b7cf1b7930e6f6f1d90f89d.tar.gz
Handle certificates with missing newline at the end
(cherry picked from commit dce6dc1f0343840fd40bde6a74c926b44c447832)
-rw-r--r--net/pfSense-pkg-ntopng/Makefile2
-rw-r--r--net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc5
2 files changed, 4 insertions, 3 deletions
diff --git a/net/pfSense-pkg-ntopng/Makefile b/net/pfSense-pkg-ntopng/Makefile
index 1a3849a..f14f82d 100644
--- a/net/pfSense-pkg-ntopng/Makefile
+++ b/net/pfSense-pkg-ntopng/Makefile
@@ -2,7 +2,7 @@
PORTNAME= pfSense-pkg-ntopng
PORTVERSION= 0.8.4
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc b/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc
index 6ff7f16..719b0cf 100644
--- a/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc
+++ b/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc
@@ -70,8 +70,9 @@ function ntopng_write_cert_file($file, $cert) {
return;
}
chmod($file, 0600);
- fwrite($fd, base64_decode($cert['crt']));
- fwrite($fd, base64_decode($cert['prv']));
+ /* newline to deal with certs/keys lacking newline at end */
+ fwrite($fd, base64_decode($cert['crt']) . "\n");
+ fwrite($fd, base64_decode($cert['prv']) . "\n");
fclose($fd);
}
OpenPOWER on IntegriCloud