thekuwayama/tttls1.3

View on GitHub
lib/tttls1.3/ech.rb

Summary

Maintainability
C
7 hrs
Test Coverage

File ech.rb has 294 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module TTTLS13
  using Refinements

  SUPPORTED_ECHCONFIG_VERSIONS = ["\xfe\x0d"].freeze
  private_constant :SUPPORTED_ECHCONFIG_VERSIONS
Severity: Minor
Found in lib/tttls1.3/ech.rb - About 3 hrs to fix

    Method offer_ech has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def self.offer_ech(inner, ech_config, hpke_cipher_suite_selector)
          return [new_greased_ch(inner, new_grease_ech), nil, nil] \
            if ech_config.nil? ||
               !SUPPORTED_ECHCONFIG_VERSIONS.include?(ech_config.version)
    
    
    Severity: Minor
    Found in lib/tttls1.3/ech.rb - About 1 hr to fix

      Method encrypted_ech_config has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def self.encrypted_ech_config(ech_config, hpke_cipher_suite_selector)
            public_name = ech_config.echconfig_contents.public_name
            key_config = ech_config.echconfig_contents.key_config
            public_key = key_config.public_key.opaque
            kem_id = key_config&.kem_id&.uint16
      Severity: Minor
      Found in lib/tttls1.3/ech.rb - About 1 hr to fix

        Method new_ch_outer_aad has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def self.new_ch_outer_aad(inner,
                                      cipher_suite,
                                      config_id,
                                      enc,
                                      payload_len,
        Severity: Minor
        Found in lib/tttls1.3/ech.rb - About 45 mins to fix

          Method new_ch_outer has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def self.new_ch_outer(aad, cipher_suite, config_id, enc, payload)
          Severity: Minor
          Found in lib/tttls1.3/ech.rb - About 35 mins to fix

            Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def initialize(maximum_name_length,
                               config_id,
                               cipher_suite,
                               public_name,
                               ctx)
            Severity: Minor
            Found in lib/tttls1.3/ech.rb - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status