Skip to content

fix: allow to specify custom signatureKey in the config.ini #1024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 27, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update utilities/utilities.go
Co-authored-by: Luca Rinaldi <lucarin@protonmail.com>
  • Loading branch information
dido18 and lucarin91 authored Mar 26, 2025
commit d9348ca12f4562c7b4898e35e523482feb271328
6 changes: 5 additions & 1 deletion utilities/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,16 @@
return nil, errors.New("invalid key")
}

parsedKey, err := x509.ParsePKIXPublicKey(block.Bytes)

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, -amd64)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - macos-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - ubuntu-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - macos-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, -amd64)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - ubuntu-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / build (macos-13, -amd64)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / check-errors (./)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / check-errors (./)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - windows-latest)

declared and not used: parsedKey

Check failure on line 150 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - windows-latest)

declared and not used: parsedKey
if err != nil {
return nil, err
}

return parsedKey.(*rsa.PublicKey), nil
publicKey, ok := value.(*rsa.PublicKey)

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, -amd64)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - macos-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - ubuntu-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - macos-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, -amd64)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - ubuntu-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / build (macos-13, -amd64)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / check-errors (./)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / check-errors (./)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - windows-latest)

undefined: value

Check failure on line 155 in utilities/utilities.go

View workflow job for this annotation

GitHub Actions / test (./ - windows-latest)

undefined: value
if !ok {
return nil,fmt.Errorf("not an rsa key")
}
return publicKey, nil
}

// MustParseRsaPublicKey parses a public key in PEM format and returns the rsa.PublicKey object.
Expand Down
Loading