tlsfuzzer/tlslite-ng

View on GitHub

Showing 1,708 of 1,708 total issues

Avoid too many return statements within this function.
Open

            return "aes128"
Severity: Major
Found in tlslite/constants.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return self._handshakeSHA384.digest()
    Severity: Major
    Found in tlslite/handshakehashes.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return "rc4"
      Severity: Major
      Found in tlslite/constants.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return 88  # rounded RFC 3526
        Severity: Major
        Found in tlslite/mathtls.py - About 30 mins to fix

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  if self.client:
                      self._pendingWriteState = clientPendingState
                      self._pendingReadState = serverPendingState
                  else:
                      self._pendingWriteState = serverPendingState
          Severity: Minor
          Found in tlslite/recordlayer.py and 1 other location - About 30 mins to fix
          tlslite/recordlayer.py on lines 1318..1323

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 35.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                      S[i], S[j] = S[j], S[i]
          Severity: Minor
          Found in tlslite/utils/python_rc4.py and 1 other location - About 30 mins to fix
          tlslite/utils/python_rc4.py on lines 19..19

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 35.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Avoid too many return statements within this function.
          Open

                  return 80  # NIST SP 800-57
          Severity: Major
          Found in tlslite/mathtls.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return 128  # NIST SP 800-57
            Severity: Major
            Found in tlslite/mathtls.py - About 30 mins to fix

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      if self.client:
                          self._pendingWriteState = clientPendingState
                          self._pendingReadState = serverPendingState
                      else:
                          self._pendingWriteState = serverPendingState
              Severity: Minor
              Found in tlslite/recordlayer.py and 1 other location - About 30 mins to fix
              tlslite/recordlayer.py on lines 1180..1185

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 35.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Avoid too many return statements within this function.
              Open

                      return 256  # NIST SP 800-57
              Severity: Major
              Found in tlslite/mathtls.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return 192  # NIST SP 800-57
                Severity: Major
                Found in tlslite/mathtls.py - About 30 mins to fix

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                          if comp_cert_ext and not comp_cert_ext.algorithms:
                              for result in self._sendError(
                                      AlertDescription.decode_error,
                                      "Empty algorithm list in compress_certificate "
                                      "extension"):
                  Severity: Major
                  Found in tlslite/tlsconnection.py and 6 other locations - About 30 mins to fix
                  tlslite/tlsconnection.py on lines 1312..1317
                  tlslite/tlsconnection.py on lines 1341..1346
                  tlslite/tlsconnection.py on lines 1782..1787
                  tlslite/tlsconnection.py on lines 2751..2755
                  tlslite/tlsconnection.py on lines 4115..4119
                  tlslite/tlsrecordlayer.py on lines 715..720

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 35.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Avoid too many return statements within this function.
                  Open

                          return 152  # rounded RFC 3526
                  Severity: Major
                  Found in tlslite/mathtls.py - About 30 mins to fix

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                                S[i], S[j] = S[j], S[i]
                    Severity: Minor
                    Found in tlslite/utils/python_rc4.py and 1 other location - About 30 mins to fix
                    tlslite/utils/python_rc4.py on lines 33..33

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 35.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 7 locations. Consider refactoring.
                    Open

                            if comp_cert_ext and not comp_cert_ext.algorithms:
                                for result in self._sendError(
                                        AlertDescription.decode_error,
                                        "Empty algorithm list in compress_certificate extension"):
                                    yield result
                    Severity: Major
                    Found in tlslite/tlsconnection.py and 6 other locations - About 30 mins to fix
                    tlslite/tlsconnection.py on lines 1312..1317
                    tlslite/tlsconnection.py on lines 1341..1346
                    tlslite/tlsconnection.py on lines 1782..1787
                    tlslite/tlsconnection.py on lines 2751..2755
                    tlslite/tlsconnection.py on lines 4341..4346
                    tlslite/tlsrecordlayer.py on lines 715..720

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 35.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Avoid too many return statements within this function.
                    Open

                            return 168  # rounded RFC 3526
                    Severity: Major
                    Found in tlslite/mathtls.py - About 30 mins to fix

                      Similar blocks of code found in 7 locations. Consider refactoring.
                      Open

                              if size_limit_ext and not settings.record_size_limit:
                                  for result in self._sendError(
                                          AlertDescription.illegal_parameter,
                                          "Server sent record_size_limit extension despite us not "
                                          "advertising it"):
                      Severity: Major
                      Found in tlslite/tlsconnection.py and 6 other locations - About 30 mins to fix
                      tlslite/tlsconnection.py on lines 1341..1346
                      tlslite/tlsconnection.py on lines 1782..1787
                      tlslite/tlsconnection.py on lines 2751..2755
                      tlslite/tlsconnection.py on lines 4115..4119
                      tlslite/tlsconnection.py on lines 4341..4346
                      tlslite/tlsrecordlayer.py on lines 715..720

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 35.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 7 locations. Consider refactoring.
                      Open

                              if comp_cert_ext and not comp_cert_ext.algorithms:
                                  for result in self._sendError(
                                          AlertDescription.decode_error,
                                          "Empty algorithm list in compress_certificate "
                                          "extension"):
                      Severity: Major
                      Found in tlslite/tlsrecordlayer.py and 6 other locations - About 30 mins to fix
                      tlslite/tlsconnection.py on lines 1312..1317
                      tlslite/tlsconnection.py on lines 1341..1346
                      tlslite/tlsconnection.py on lines 1782..1787
                      tlslite/tlsconnection.py on lines 2751..2755
                      tlslite/tlsconnection.py on lines 4115..4119
                      tlslite/tlsconnection.py on lines 4341..4346

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 35.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 7 locations. Consider refactoring.
                      Open

                              if comp_cert_ext and not comp_cert_ext.algorithms:
                                  for result in self._sendError(
                                          AlertDescription.decode_error,
                                          "Empty algorithm list in compress_certificate "
                                          "extension"):
                      Severity: Major
                      Found in tlslite/tlsconnection.py and 6 other locations - About 30 mins to fix
                      tlslite/tlsconnection.py on lines 1312..1317
                      tlslite/tlsconnection.py on lines 1782..1787
                      tlslite/tlsconnection.py on lines 2751..2755
                      tlslite/tlsconnection.py on lines 4115..4119
                      tlslite/tlsconnection.py on lines 4341..4346
                      tlslite/tlsrecordlayer.py on lines 715..720

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 35.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 7 locations. Consider refactoring.
                      Open

                                  if comp_cert_ext and not comp_cert_ext.algorithms:
                                      for result in self._sendError(
                                              AlertDescription.decode_error,
                                              "Empty algorithm list in compress_certificate "
                                              "extension"):
                      Severity: Major
                      Found in tlslite/tlsconnection.py and 6 other locations - About 30 mins to fix
                      tlslite/tlsconnection.py on lines 1312..1317
                      tlslite/tlsconnection.py on lines 1341..1346
                      tlslite/tlsconnection.py on lines 2751..2755
                      tlslite/tlsconnection.py on lines 4115..4119
                      tlslite/tlsconnection.py on lines 4341..4346
                      tlslite/tlsrecordlayer.py on lines 715..720

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 35.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language