freemyipod r381 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r380‎ | r381 | r382 >
Date:04:41, 23 December 2010
Author:theseven
Status:new
Tags:
Comment:
embios.py: Increase timeout for crypto operations to a sane value
Modified paths:
  • /embios/trunk/tools/embios.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/embios.py
@@ -658,6 +658,7 @@
659659 addr = self._hexint(addr)
660660 size = self._hexint(size)
661661 keyindex = self._hexint(keyindex)
 662+ self.embios.lib.dev.timeout = 30000
662663 self.embios.aesencrypt(addr, size, keyindex)
663664
664665 @command
@@ -668,6 +669,7 @@
669670 addr = self._hexint(addr)
670671 size = self._hexint(size)
671672 keyindex = self._hexint(keyindex)
 673+ self.embios.lib.dev.timeout = 30000
672674 self.embios.aesdecrypt(addr, size, keyindex)
673675
674676 @command
@@ -681,6 +683,7 @@
682684 sha1size = 0x14
683685 self.logger.info("Generating hmac-sha1 hash from the buffer at "+self._hex(addr)+" with the size "+self._hex(size)+
684686 " and saving it to "+self._hex(destination)+" - "+self._hex(destination+sha1size)+"...")
 687+ self.embios.lib.dev.timeout = 30000
685688 self.embios.hmac_sha1(addr, size, destination)
686689 self.logger.info("done\n")
687690 data = self.embios.read(destination, sha1size)