changeset 241:e70d728fdc13

secret_analysis: better handling of parametrized secrets
author Sigurd Meldgaard <stm@daimi.au.dk>
date Tue, 05 Jan 2010 14:43:30 +0100
parents 43a154b5c1e2
children c452e05a342c
files pysmcl/secret_annotator.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/secret_annotator.py	Tue Jan 05 14:42:45 2010 +0100
+++ b/pysmcl/secret_annotator.py	Tue Jan 05 14:43:30 2010 +0100
@@ -85,7 +85,7 @@
 
     All other statements just pass their value through.
     """
-    if(getattr(node, "imported_secrets", False)):
+    if(isinstance(node, ast.FunctionDef)):
         ins = ins | node.imported_secrets
     if(isinstance(node, ast.Assign)):
         target = node.targets[0]
@@ -134,7 +134,7 @@
                 for arg in function.args.args:
                     function.args_secret.append(arg.id in secrets)
                 break
-    function.body[0].imported_secrets = secrets
+    function.imported_secrets = secrets
     pysmcl.flow.analyze(function, secret_join,
                         secret_combine, analysis_key, set())
     non_compromising_functions.add(function.name)