Skip to content

Commit aa9dbac

Browse files
committed
Update
1 parent 54d4e4f commit aa9dbac

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/data/data/com.tool.tree/files/home/bin/sh
2+
set -e -u
3+
4+
if [ $# != 1 ] || [ "$1" = "-h" ]; then
5+
>&2 echo "usage: add-trusted-certificate FILE"
6+
>&2 echo "where FILE is a .pem, .crt, .cer, or .crl file"
7+
exit 1
8+
fi
9+
10+
CERTIFICATE_TO_ADD="$1"
11+
if [ ! -f "$CERTIFICATE_TO_ADD" ]; then
12+
>&2 "Error: Not a readable file: '$CERTIFICATE_TO_ADD'"
13+
exit 1
14+
fi
15+
16+
CERT_DIR=/data/data/com.tool.tree/files/home/tls/certs/
17+
mkdir -p $CERT_DIR
18+
echo "Copying $CERTIFICATE_TO_ADD to $CERT_DIR"
19+
cp "$CERTIFICATE_TO_ADD" $CERT_DIR
20+
openssl rehash -v $CERT_DIR
464 Bytes
Binary file not shown.
71.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)