tlsfuzzer/tlslite-ng

View on GitHub

Showing 1,708 of 1,708 total issues

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

            if not ver_func(signature, signature_context,
                            padType,
                            hashName,
                            saltLen):
                for result in self._sendError(
Severity: Minor
Found in tlslite/tlsconnection.py and 2 other locations - About 35 mins to fix
tlslite/tlsconnection.py on lines 1550..1557
tlslite/tlsrecordlayer.py on lines 779..786

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 36.

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 2 locations. Consider refactoring.
Open

        if len(plaintext) != self.block_size:
            raise ValueError('wrong block length, expected {0} got {1}'
                             .format(self.block_size, len(plaintext)))
Severity: Minor
Found in tlslite/utils/rijndael.py and 1 other location - About 35 mins to fix
tlslite/utils/rijndael.py on lines 1042..1044

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 36.

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 3 locations. Consider refactoring.
Open

                if not ver_func(signature, signature_context,
                                pad_type,
                                hash_name,
                                salt_len):
                    for result in self._sendError(
Severity: Minor
Found in tlslite/tlsconnection.py and 2 other locations - About 35 mins to fix
tlslite/tlsconnection.py on lines 3006..3013
tlslite/tlsrecordlayer.py on lines 779..786

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 36.

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 key
Severity: Major
Found in tlslite/utils/keyfactory.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return Python_Key._parse_public_key(bytes)
    Severity: Major
    Found in tlslite/utils/python_key.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return False
      Severity: Major
      Found in tlslite/utils/python_dsakey.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return True
        Severity: Major
        Found in tlslite/integration/clienthelper.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return None, None
          Severity: Major
          Found in tlslite/tlsconnection.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

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

              Avoid too many return statements within this function.
              Open

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

                Avoid too many return statements within this function.
                Open

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

                  Avoid too many return statements within this function.
                  Open

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

                    Avoid too many return statements within this function.
                    Open

                                return self._handshake_buffer
                    Severity: Major
                    Found in tlslite/handshakehashes.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

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

                        Avoid too many return statements within this function.
                        Open

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

                          Avoid too many return statements within this function.
                          Open

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

                            Avoid too many return statements within this function.
                            Open

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

                              Avoid too many return statements within this function.
                              Open

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

                                Avoid too many return statements within this function.
                                Open

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

                                  Avoid too many return statements within this function.
                                  Open

                                              return "aes256ccm_8"
                                  Severity: Major
                                  Found in tlslite/constants.py - About 30 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language