summaryrefslogtreecommitdiffstats
path: root/opkg-cert
diff options
context:
space:
mode:
Diffstat (limited to 'opkg-cert')
-rwxr-xr-xopkg-cert12
1 files changed, 11 insertions, 1 deletions
diff --git a/opkg-cert b/opkg-cert
index 82238aa..2cac000 100755
--- a/opkg-cert
+++ b/opkg-cert
@@ -227,7 +227,17 @@ check_cert()
# Check dates.
now=$(time)
- if [ "${valid}" -eq 0 ] || [ ${now} -lt "${valid}" ]; then
+ if [ "${valid}" -eq 0 ]; then
+ # There was no "V" key in the payload, so this is most likely a
+ # dummy seed certificate that prokit generates to make opkg-cert
+ # download and verify the actual certificate from a mirror. If
+ # we reached here, the actual certificate was invalid.
+ if ${new}; then
+ rm -f -- "${cert}"
+ fi
+ return 1
+ fi
+ if [ ${now} -lt "${valid}" ]; then
if ${new}; then
rm -f -- "${cert}"
else