RTradeLtd/libp2px-core

View on GitHub

Showing 5 of 24 total issues

Function KeyStretcher has 57 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedKeys, StretchedKeys) {
    var cipherKeySize int
    var ivSize int
    switch cipherType {
    case "AES-128":
Severity: Minor
Found in crypto/key.go - About 1 hr to fix

    Method sweeper.update has 53 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (sw *sweeper) update() {
        sw.snapshotMu.Lock()
        defer sw.snapshotMu.Unlock()
    
        now := time.Now()
    Severity: Minor
    Found in metrics/flow/sweeper.go - About 1 hr to fix

      Method Conn.runHandshakeSync has 7 return statements (exceeds 4 allowed).
      Open

      func (ic *Conn) runHandshakeSync() error {
          // If we were initialized without keys, behave as in plaintext/1.0.0 (do nothing)
          if ic.localPrivKey == nil {
              return nil
          }
      Severity: Major
      Found in sec/insecure/insecure.go - About 45 mins to fix

        Function GenerateEKeyPair has 5 return statements (exceeds 4 allowed).
        Open

        func GenerateEKeyPair(curveName string) ([]byte, GenSharedKey, error) {
            var curve elliptic.Curve
        
            switch curveName {
            case "P-256":
        Severity: Major
        Found in crypto/key.go - About 35 mins to fix

          Function KeyPairFromStdKey has 5 return statements (exceeds 4 allowed).
          Open

          func KeyPairFromStdKey(priv crypto.PrivateKey) (PrivKey, PubKey, error) {
              if priv == nil {
                  return nil, nil, ErrNilPrivateKey
              }
          
          
          Severity: Major
          Found in crypto/key_openssl.go - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language