verify that signing key name matches
This commit is contained in:
@ -682,6 +682,23 @@ D8usM7Dxp5yrDrCYZ5AIijc=
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies the DSA signature of a signed update file.
|
||||
*
|
||||
* @param signedFile The signed update file to check.
|
||||
*
|
||||
* @return signer (could be empty string) or null if invalid
|
||||
* @since 0.7.12
|
||||
*/
|
||||
public String verifyAndGetSigner(File signedFile) {
|
||||
for (SigningPublicKey signingPublicKey : _trustedKeys.keySet()) {
|
||||
boolean isValidSignature = verify(signedFile, signingPublicKey);
|
||||
if (isValidSignature)
|
||||
return _trustedKeys.get(signingPublicKey);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies the DSA signature of a signed update file.
|
||||
*
|
||||
|
Reference in New Issue
Block a user