-
Notifications
You must be signed in to change notification settings - Fork 325
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
Fix agent downloader with new signing key for 1.46.0 #3513
Conversation
|
||
private static byte[] toByteArray(InputStream inputStream, int size) throws IOException { | ||
byte[] result = new byte[size]; | ||
if (size == 0 || size != inputStream.read(result) || inputStream.read() >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] we can get away without a loop here as the content has known size and is rather small (less than 1kb).
@@ -36,6 +41,7 @@ | |||
|
|||
class AgentDownloaderTest { | |||
|
|||
// valid key stored in valid_key.asc, but not the one used to sign agent artifacts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[for reviewer] here we need to have a valid GPG key.
What does this PR do?
The signing key for deployed artifacts in maven central has changed, so we need to update the Key ID and public key used for validation.
Apart from breaking unit tests, this only impacts the agent downloader that attemps to validate the downloaded agent with an embedded copy of the public key and key ID.
So the 1.46.0 agent won't be able to download itself.
This fix adds support for multiple keys and embeds the new key.
Checklist