tlsfuzzer/tlslite-ng

View on GitHub

Showing 324 of 1,708 total issues

Function hashAndVerify has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def hashAndVerify(self, sigBytes, bytes, rsaScheme='PKCS1', hAlg='sha1',
Severity: Minor
Found in tlslite/utils/rsakey.py - About 35 mins to fix

    Function HKDF_expand_label has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def HKDF_expand_label(secret, label, hashValue, length, algorithm):
    Severity: Minor
    Found in tlslite/utils/cryptomath.py - About 35 mins to fix

      Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self, p=0, q=0, g=0, x=0, y=0):
      Severity: Minor
      Found in tlslite/utils/python_dsakey.py - About 35 mins to fix

        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, p, q, g, x, y):
        Severity: Minor
        Found in tlslite/utils/dsakey.py - About 35 mins to fix

          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, cipherSuite, clientHello, serverHello, acceptedCurves,
          Severity: Minor
          Found in tlslite/keyexchange.py - About 35 mins to fix

            Function _clientResume has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _clientResume(self, session, serverHello, clientRandom,
            Severity: Minor
            Found in tlslite/tlsconnection.py - About 35 mins to fix

              Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def create(self, ticket_lifetime, ticket_age_add, ticket_nonce, ticket,
              Severity: Minor
              Found in tlslite/messages.py - About 35 mins to fix

                Function calcSSL2PendingStates has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def calcSSL2PendingStates(self, cipherSuite, masterSecret, clientRandom,
                Severity: Minor
                Found in tlslite/recordlayer.py - About 35 mins to fix

                  Function _pickServerKeyExchangeSig has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def _pickServerKeyExchangeSig(settings, clientHello, certList=None,
                  Severity: Minor
                  Found in tlslite/tlsconnection.py - About 35 mins to fix

                    Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(self, cipherSuite, clientHello, serverHello,
                    Severity: Minor
                    Found in tlslite/keyexchange.py - About 35 mins to fix

                      Function calcPendingStates has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def calcPendingStates(self, cipherSuite, masterSecret, clientRandom,
                      Severity: Minor
                      Found in tlslite/recordlayer.py - About 35 mins to fix

                        Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def create(self, certificate_types=None, certificate_authorities=None,
                        Severity: Minor
                        Found in tlslite/messages.py - About 35 mins to fix

                          Function handshakeClientAnonymous has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def handshakeClientAnonymous(self, session=None, settings=None,
                          Severity: Minor
                          Found in tlslite/tlsconnection.py - About 35 mins to fix

                            Function calcFinished has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def calcFinished(version, masterSecret, cipherSuite, handshakeHashes,
                            Severity: Minor
                            Found in tlslite/mathtls.py - About 35 mins to fix

                              Function calcMasterSecret has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def calcMasterSecret(version, cipherSuite, premasterSecret, clientRandom,
                              Severity: Minor
                              Found in tlslite/mathtls.py - About 35 mins to fix

                                Function getTackExt has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def getTackExt(self):
                                        """Get the TACK and/or Break Sigs from a TACK Cert in the chain."""
                                        tackExt = None
                                        # Search list in backwards order
                                        for x509 in self.x509List[::-1]:
                                Severity: Minor
                                Found in tlslite/x509certchain.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function addVarSeq has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        def addVarSeq(self, seq, length, lengthLength):
                                            """
                                            Add a bounded list of same-sized values
                                
                                            Create a list of specific length with all items being of the same
                                Severity: Minor
                                Found in tlslite/utils/codec.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function _isIP has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def _isIP(address):
                                        """Return True if the address is an IPv4 address"""
                                        if not address:
                                            return False
                                        vals = address.split('.')
                                Severity: Minor
                                Found in tlslite/integration/clienthelper.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function open has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def open(self, nonce, ciphertext, aad):
                                
                                        if len(nonce) != 12:
                                            raise ValueError("Bad nonce length")
                                        if self.tagLength == 16 and len(ciphertext) < 16:
                                Severity: Minor
                                Found in tlslite/utils/aesccm.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        def __init__(self, n=0, e=0, key_type="rsa"):
                                            self.rsa = None
                                            self._hasPrivateKey = False
                                            if (n and not e) or (e and not n):
                                                raise AssertionError()
                                Severity: Minor
                                Found in tlslite/utils/openssl_rsakey.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language