Files
starface-outlook-sync-addin/node_modules/office-addin-dev-certs/scripts/verify.sh
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

15 lines
414 B
Bash

#!/bin/bash
certs=$(security find-certificate -a -c "$1" -p)
while read line; do
if [[ "$line" == *"--BEGIN"* ]]; then
cert=$line
else
cert="$cert"$'\n'"$line"
if [[ "$line" == *"--END"* ]]; then
if [ 0 -lt $(echo "$cert" | openssl x509 -checkend 86400 | grep -c "will not expire") ]; then
echo "$cert"
fi
fi
fi
done <<< "$certs"