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

First commit, just find the root certificate for now.

parents
Branches
No related tags found
No related merge requests found
#!/bin/sh -e
subject_hash () {
openssl x509 -noout -subject_hash -in $1
}
issuer_hash () {
openssl x509 -noout -issuer_hash -in $1
}
find_root () {
for filename in "$@"
do
if [ "$(subject_hash $filename)" = "$(issuer_hash $filename)" ]
then
echo "$filename"
break
fi
done
}
root="$(find_root "$@")"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment