Skip to content

Commit

Permalink
Fix undefined reference
Browse files Browse the repository at this point in the history
Simply needed to import RFCReference to fix the issue.
  • Loading branch information
johndoe31415 committed Dec 21, 2019
1 parent d09f415 commit 6bead68
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ disable=print-statement,
too-many-instance-attributes,
no-else-raise,
no-else-break,
no-else-continue
no-else-continue,
attribute-defined-outside-init

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
5 changes: 3 additions & 2 deletions upd_readme/Patcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python3
# ratched - TLS connection router that performs a man-in-the-middle attack
# Copyright (C) 2017-2017 Johannes Bauer
# Copyright (C) 2017-2019 Johannes Bauer
#
# This file is part of ratched.
#
Expand All @@ -19,9 +19,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Johannes Bauer <[email protected]>

import re

class Patcher(object):
class Patcher():
def __init__(self, filename, filetype = "c"):
assert(filetype in [ "c", "markdown" ])
self._filename = filename
Expand Down
3 changes: 1 addition & 2 deletions x509sak/estimate/EstimateSig.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from x509sak.AlgorithmDB import SignatureAlgorithms, HashFunctions, SignatureFunctions, Cryptosystems
from x509sak.estimate.BaseEstimator import BaseEstimator
from x509sak.estimate import JudgementCode, Commonness, Compatibility
from x509sak.estimate.Judgement import SecurityJudgement, SecurityJudgements
from x509sak.estimate.Judgement import SecurityJudgement, SecurityJudgements, RFCReference
from x509sak.NumberTheory import NumberTheory

@BaseEstimator.register
Expand Down Expand Up @@ -91,7 +91,6 @@ def analyze(self, signature_alg_oid, signature_alg_params, signature, root_cert
if not hweight_analysis.plausibly_random:
judgements += SecurityJudgement(JudgementCode.ECDSA_Signature_S_BitBias, "Hamming weight of ECDSA signature S parameter is %d at bitlength %d, but expected a weight between %d and %d when randomly chosen; this is likely not coincidential." % (hweight_analysis.hweight, hweight_analysis.bitlen, hweight_analysis.rnd_min_hweight, hweight_analysis.rnd_max_hweight), commonness = Commonness.HIGHLY_UNUSUAL)
except pyasn1.error.PyAsn1Error:
# TODO FIXME
standard = RFCReference(rfcno = 3279, sect = "2.2.3", verb = "MUST", text = "To easily transfer these two values as one signature, they MUST be ASN.1 encoded using the following ASN.1 structure:")
judgements += SecurityJudgement(JudgementCode.ECDSA_Signature_Undecodable, "ECDSA signature cannot be successfully decoded.", commonness = Commonness.HIGHLY_UNUSUAL, compatibility = Compatibility.STANDARDS_DEVIATION, standard = standard)

Expand Down

0 comments on commit 6bead68

Please sign in to comment.