Ver código fonte

Fix signing with no password file

If SWUPDATE_PASSWORD_FILE is not set, passout will have a value of None.
None will be incorrectly used in the signing command.

Set passout to an empty string when SWUPDATE_PASSWORD_FILE isn't set.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
George McCollister 9 anos atrás
pai
commit
9f3a817959
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      classes/swupdate.bbclass

+ 2 - 0
classes/swupdate.bbclass

@@ -146,6 +146,8 @@ python do_swuimage () {
         passout = d.getVar('SWUPDATE_PASSWORD_FILE', True)
         if passout:
             passout = "-passin file:'%s' " % (passout)
+        else:
+            passout = ""
         signcmd = "openssl dgst -sha256 -sign '%s' %s -out '%s' '%s'" % (
             privkey,
             passout,