Showing 84 of 95 total issues
Method softfail_check_certificate_status
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def self.softfail_check_certificate_status(res, cert, chain)
ocsp_response = res
cid = OpenSSL::OCSP::CertificateId.new(cert, chain.first)
# When NOT received OCSPResponse in TLS handshake, this method will
- Read upRead up
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
Method initialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def initialize(socket, **settings)
@connection = Connection.new(socket, :server)
@settings = DEFAULT_SERVER_SETTINGS.merge(settings)
logger.level = @settings[:loglevel]
- Read upRead up
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
Method deserialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def self.deserialize(binary)
raise Error::ErrorAlerts, :internal_error if binary.nil?
raise Error::ErrorAlerts, :decode_error if binary.length < 39
raise Error::ErrorAlerts, :internal_error \
unless binary[0] == HandshakeType::SERVER_HELLO
- Read upRead up
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
Method gen_certificate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def gen_certificate(crt, ch, chain = [], ocsp_response = nil)
exs = Message::Extensions.new
# status_request
exs << Message::Extension::OCSPResponse.new(ocsp_response) \
unless ocsp_response.nil?
- Read upRead up
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
Method deserialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.deserialize(binary, msg_type)
raise Error::ErrorAlerts, :internal_error if binary.nil?
case msg_type
when HandshakeType::CLIENT_HELLO, HandshakeType::ENCRYPTED_EXTENSIONS
- Read upRead up
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
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(msg_type:, key_share_entry: [])
@extension_type = ExtensionType::KEY_SHARE
@msg_type = msg_type
@key_share_entry = key_share_entry || []
raise Error::ErrorAlerts, :internal_error \
- Read upRead up
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
Method deserialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.deserialize(binary)
raise Error::ErrorAlerts, :internal_error if binary.nil?
return nil if binary.length < 2
- Read upRead up
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
Method deserialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.deserialize(binary)
raise Error::ErrorAlerts, :internal_error if binary.nil?
return nil if binary.length < 5 ||
binary[0] != CertificateStatusType::OCSP
- Read upRead up
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
Method messages_type
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def messages_type
types = @messages.map do |m|
if [Message::ClientHello,
Message::ServerHello,
Message::EncryptedExtensions,
- Read upRead up
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
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(msg_type:, versions: DEFAULT_VERSIONS)
@extension_type = ExtensionType::SUPPORTED_VERSIONS
@msg_type = msg_type
@versions = versions || []
case @msg_type
- Read upRead up
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
Method deserialize_certificate_list
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def deserialize_certificate_list(binary)
raise Error::ErrorAlerts, :internal_error if binary.nil?
i = 0
certificate_list = []
- Read upRead up
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
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,
Method deserialize_extension
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def deserialize_extension(binary, extension_type, msg_type)
raise Error::ErrorAlerts, :internal_error if binary.nil?
case extension_type
when ExtensionType::SERVER_NAME
- Read upRead up
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
Method exporter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.exporter(label, context, key_length, exporter_secret, cipher_suite)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(maximum_name_length,
config_id,
cipher_suite,
public_name,
ctx)
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)
Method send_new_client_hello
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def send_new_client_hello(ch1,
hrr,
extensions,
binder_key = nil,
ech_state = nil)
Method do_exporter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_exporter(secret, digest, label, context, key_length)
Method hkdf_expand_label
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.hkdf_expand_label(secret, label, context, length, digest)
Method deserialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.deserialize(binary)
raise Error::ErrorAlerts, :internal_error if binary.nil?
raise Error::ErrorAlerts, :decode_error if binary.length < 39
raise Error::ErrorAlerts, :internal_error \
unless binary[0] == HandshakeType::CLIENT_HELLO
- Read upRead up
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"