def verifyElection(self): report = Report(self.electionID) view = VerifierView() report.attach(view) verify_svc = VerifyService.getInstance() data_dict = dict() bb = self.bulletinBoard.state.toJSON() ead = self.electionAdministrator.state.toJSON() eau = self.authorities[0].state.toJSON() json_eau = json.loads(eau) data_dict.update(json.loads(bb)) data_dict.update(json.loads(ead)) data_dict.update({'e_bold': json_eau['encryptions']}) # import pdb; pdb.set_trace() verify_svc.verify(data_dict,report,self.secparams)
def main(): """ptionally runs only subtree, start verifier and print result.""" init_socket(HOST, PORT, args.electionID) data_dict = getData() secparams = getSecparams(data_dict) report = Report(args.electionID) console = ConsoleView(step=args.step, depth=args.depth, data=args.data) report.attach(console) verify_svc = VerifyService.getInstance() if args.test: TestResult.setReport(report) data_dict = prepareData(data_dict, secparams) run_sub_tests(verify_svc.root_test, args.test, data_dict) else: verify_svc.verify(data_dict, report, secparams)