Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109427797
D42276.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42276.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
@@ -67,8 +67,7 @@
find -L "$@" -type f \( \
-name '*.pem' -or \
-name '*.crt' -or \
- -name '*.cer' -or \
- -name '*.crl' \
+ -name '*.cer' \
\) 2>/dev/null
}
@@ -114,7 +113,7 @@
otherhash=$(openssl x509 -sha1 -in "$otherfile" -noout -fingerprint)
if [ "$certhash" = "$otherhash" ] ; then
info "Skipping untrusted certificate $hash ($otherfile)"
- return 1
+ return 0
fi
done
for otherfile in $(find $CERTDESTDIR -name "$hash.*") ; do
@@ -182,7 +181,7 @@
IFS="$oldIFS"
for CFILE in $(cert_files_in "$@") ; do
verbose "Reading $CFILE"
- case $(grep -c '^Certificate:$' "$CFILE") in
+ case $(egrep -c '^-+BEGIN CERTIFICATE-+$' "$CFILE") in
0)
;;
1)
@@ -191,8 +190,8 @@
*)
verbose "Multiple certificates found, splitting..."
SPLITDIR=$(mktemp -d)
- egrep '^[^#]' "$CFILE" | \
- split -p '^Certificate:$' - "$SPLITDIR/x"
+ egrep '^(---|[0-9A-Za-z/+=]+$)' "$CFILE" | \
+ split -p '^-+BEGIN CERTIFICATE-+$' - "$SPLITDIR/x"
for CERT in $(find "$SPLITDIR" -type f) ; do
"$CFUNC" "$CERT"
done
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 5, 10:38 PM (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16482141
Default Alt Text
D42276.diff (1 KB)
Attached To
Mode
D42276: certctl: Fix recent regressions.
Attached
Detach File
Event Timeline
Log In to Comment