Page MenuHomeFreeBSD

D42490.diff
No OneTemporary

D42490.diff

diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh
--- a/usr.sbin/certctl/certctl.sh
+++ b/usr.sbin/certctl/certctl.sh
@@ -71,6 +71,11 @@
\) 2>/dev/null
}
+eolcvt()
+{
+ cat "$@" | tr -s '\r' '\n'
+}
+
do_hash()
{
local hash
@@ -181,7 +186,7 @@
IFS="$oldIFS"
for CFILE in $(cert_files_in "$@") ; do
verbose "Reading $CFILE"
- case $(egrep -c '^-+BEGIN CERTIFICATE-+$' "$CFILE") in
+ case $(eolcvt "$CFILE" | egrep -c '^-+BEGIN CERTIFICATE-+$') in
0)
;;
1)
@@ -190,7 +195,7 @@
*)
verbose "Multiple certificates found, splitting..."
SPLITDIR=$(mktemp -d)
- egrep '^(---|[0-9A-Za-z/+=]+$)' "$CFILE" | \
+ eolcvt "$CFILE" | egrep '^(---|[0-9A-Za-z/+=]+$)' | \
split -p '^-+BEGIN CERTIFICATE-+$' - "$SPLITDIR/x"
for CERT in $(find "$SPLITDIR" -type f) ; do
"$CFUNC" "$CERT"

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 6:22 AM (20 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15762596
Default Alt Text
D42490.diff (847 B)

Event Timeline