Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107174776
D42490.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
847 B
Referenced Files
None
Subscribers
None
D42490.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D42490: certctl: Convert line endings before inspecting files.
Attached
Detach File
Event Timeline
Log In to Comment