Skip to content

Commit

Permalink
Merge pull request #36 from AdguardTeam/fix/cert_sort
Browse files Browse the repository at this point in the history
fix cert sort
  • Loading branch information
sfionov authored Jul 17, 2023
2 parents 1bef367 + 517eef3 commit 800d4b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=adguardcert
name=AdGuard Certificate
version=v2.0-beta2
versionCode=31
version=v2.0-beta3
versionCode=32
author=AdGuard
description=Moves AdGuard's root CA certificate from the user certificate store to the system certificate store.
4 changes: 2 additions & 2 deletions module/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ MODDIR=${0%/*}
# Apps will reject certs that are in the `cacerts-removed`.
AG_CERT_HASH=0f4ed297
AG_INTERMEDIATE_CERT_HASH=47ec1af8
AG_CERT_FILE=$(ls /data/misc/user/*/cacerts-added/${AG_CERT_HASH}.* | sort | tail -n1)
AG_INTERMEDIATE_CERT_FILE=$(ls /data/misc/user/*/cacerts-added/${AG_INTERMEDIATE_CERT_HASH}.* | sort | tail -n1)
AG_CERT_FILE=$(ls /data/misc/user/*/cacerts-added/${AG_CERT_HASH}.* | (IFS=.; while read -r left right; do echo $right $left.$right; done) | sort -nr | (read -r left right; echo $right))
AG_INTERMEDIATE_CERT_FILE=$(ls /data/misc/user/*/cacerts-added/${AG_INTERMEDIATE_CERT_HASH}.* | (IFS=.; while read -r left right; do echo $right $left.$right; done) | sort -nr | (read -r left right; echo $right))
if [ -e "${AG_CERT_FILE}" ] && [ -e "${AG_INTERMEDIATE_CERT_FILE}" ]; then
cp -f ${AG_CERT_FILE} ${MODDIR}/system/etc/security/cacerts/${AG_CERT_HASH}.0
Expand Down

0 comments on commit 800d4b2

Please sign in to comment.