summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2021-03-10 14:14:33 +0100
committerSimon Rettberg2021-03-10 14:14:33 +0100
commit2f67ff35f5b4ee2843b37978978a96852451d108 (patch)
treeb3f4075eb42cad01ea3c444696a6c154654828a3
parentRemember if we were sourced and don't do it again (diff)
downloadslx-tools-2f67ff35f5b4ee2843b37978978a96852451d108.tar.gz
slx-tools-2f67ff35f5b4ee2843b37978978a96852451d108.tar.xz
slx-tools-2f67ff35f5b4ee2843b37978978a96852451d108.zip
[cert] Only import hashed symlink certs into nssdb
This makes sure we don't import duplicates, or the cert bundle etc.
-rw-r--r--modules/cert.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/cert.inc b/modules/cert.inc
index 3b4a222..23aeacd 100644
--- a/modules/cert.inc
+++ b/modules/cert.inc
@@ -17,7 +17,7 @@ cert_to_nssdb() {
return # pass exit code
fi
if [ -d "$src" ]; then
- find "$src" \( -type f -o -type l \) -name "*.pem" | while read -r file; do
+ find "$src" -type l -name "*.?" | while read -r file; do
file="$( readlink -f "$file" )"
# Make sure there's nothing after this call so the exit code survives the loop end
certutil -A -d sql:"$db" -n "$( basename "$file" )" -t C,C,C -i "$file"