diff --git a/.github/workflows/common-performance.yml b/.github/workflows/common-performance.yml index b6749366..b48b575c 100644 --- a/.github/workflows/common-performance.yml +++ b/.github/workflows/common-performance.yml @@ -112,8 +112,8 @@ jobs: if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }} shell: powershell run: | - New-Item -Path . -Name "build" -ItemType "directory" -Force - New-Item -Path . -Name "build/config" -ItemType "directory" -Force + New-Item -Path . -Name "build" -ItemType "directory" -Force | Out-Null + New-Item -Path . -Name "build/config" -ItemType "directory" -Force | Out-Null $config = Get-Content -Path ./docker/client-env/qpep.yml.tpl $config = $config.replace('','${{ inputs.server_public_address }}') $config = $config.replace('','${{ inputs.client_listen_address }}') diff --git a/backend/backend_quicgo.go b/backend/backend_quicgo.go index 45c2a6ef..1be99da3 100644 --- a/backend/backend_quicgo.go +++ b/backend/backend_quicgo.go @@ -233,6 +233,7 @@ func loadTLSConfig(certPEM, keyPEM string) *tls.Config { dataKey, err2 := ioutil.ReadFile(keyPEM) if err1 != nil { + logger.Error("Could not find certificate file %s", certPEM) return nil } @@ -252,11 +253,13 @@ func loadTLSConfig(certPEM, keyPEM string) *tls.Config { } if len(cert.Certificate) == 0 { + logger.Error("Certificate file %s does not contain valid certificates", certPEM) return nil } x509Cert, err := x509.ParseCertificate(cert.Certificate[0]) if err != nil { + logger.Error("Certificate parsing in file %s failed: %v", certPEM, err) return nil } @@ -268,9 +271,11 @@ func loadTLSConfig(certPEM, keyPEM string) *tls.Config { for { keyDERBlock, dataKey = pem.Decode(dataKey) if keyDERBlock == nil { + logger.Error("Certificate key parsing in file %s failed", dataKey) return nil } if keyDERBlock.Type == "PRIVATE KEY" || strings.HasSuffix(keyDERBlock.Type, " PRIVATE KEY") { + logger.Error("Certificate PEM key parsing in file %s failed", dataKey) break } skippedBlockTypes = append(skippedBlockTypes, keyDERBlock.Type) @@ -278,6 +283,7 @@ func loadTLSConfig(certPEM, keyPEM string) *tls.Config { cert.PrivateKey, err = parsePrivateKey(keyDERBlock.Bytes) if err != nil { + logger.Error("Error loading private key from file %s: %v", dataKey, err) return nil } @@ -285,28 +291,35 @@ func loadTLSConfig(certPEM, keyPEM string) *tls.Config { case *rsa.PublicKey: priv, ok := cert.PrivateKey.(*rsa.PrivateKey) if !ok { + logger.Error("Error loading private key from file %s: Not a valid RSA key", dataKey) return nil } if pub.N.Cmp(priv.N) != 0 { + logger.Error("Error loading private key from file %s: internal error", dataKey, err) return nil } case *ecdsa.PublicKey: priv, ok := cert.PrivateKey.(*ecdsa.PrivateKey) if !ok { + logger.Error("Error loading private key from file %s: Not a valid ECDSA key", dataKey, err) return nil } if pub.X.Cmp(priv.X) != 0 || pub.Y.Cmp(priv.Y) != 0 { + logger.Error("Error loading private key from file %s: internal error", dataKey, err) return nil } case ed25519.PublicKey: priv, ok := cert.PrivateKey.(ed25519.PrivateKey) if !ok { + logger.Error("Error loading private key from file %s: Not a valida ED25519 key", dataKey, err) return nil } if !bytes.Equal(priv.Public().(ed25519.PublicKey), pub) { + logger.Error("Error loading private key from file %s: internal error", dataKey, err) return nil } default: + logger.Error("Error loading private key from file %s: unsupported key type %v", dataKey, pub) return nil } } diff --git a/docker/build-linux/docker-compose.yml b/docker/build-linux/docker-compose.yml deleted file mode 100644 index 7fa2a134..00000000 --- a/docker/build-linux/docker-compose.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: "3" - -services: - linux-build: - image: project-faster/qpep_linux - build: - context: . - environment: - - QPEP_REPO=https://github.com/Project-Faster/qpep.git - - QPEP_BRANCH=issue-22-performance-testing - - QPEP_REV=HEAD - volumes: - - ./build:/build