Skip to content
Snippets Groups Projects
Commit e4063852 authored by nimrod's avatar nimrod
Browse files

Renamed the find_issued_by function to find_cert_by_hash.

parent e28df866
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ find_root_cert () { ...@@ -23,7 +23,7 @@ find_root_cert () {
done done
} }
find_issued_by () { find_cert_by_hash () {
# Recieves the issuer hash and a list of file paths, returns the path to # Recieves the issuer hash and a list of file paths, returns the path to
# the certificate which was issued by that hash. # the certificate which was issued by that hash.
certhash="$1" certhash="$1"
...@@ -66,12 +66,12 @@ bundle_certs () { ...@@ -66,12 +66,12 @@ bundle_certs () {
echo "Failed to find root certificate." > /dev/stderr echo "Failed to find root certificate." > /dev/stderr
exit 1 exit 1
fi fi
issued="$(find_issued_by $issuer *)" issued="$(find_cert_by_hash $issuer *)"
while [ -n "$issued" ] while [ -n "$issued" ]
do do
ordered_certs="$issued $ordered_certs" ordered_certs="$issued $ordered_certs"
issuer="$issued" issuer="$issued"
issued="$(find_issued_by $issuer *)" issued="$(find_cert_by_hash $issuer *)"
done done
cat $ordered_certs cat $ordered_certs
cd .. cd ..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment