diff options
-rwxr-xr-x | opkg-cert | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |