elharo opened a new pull request, #162: URL: https://github.com/apache/maven-jarsigner-plugin/pull/162
Fixes #149 When neither `tsa` nor `tsacert` are configured and the user has set `tsapolicyid`, the validation check at `JarsignerSignMojo.java:290` produces a misleading warning: ``` Too many (1) number of OIDs given, but only 0 and 0 TSA URL and TSA certificate alias, respectively ``` The real problem is that no TSA servers are configured at all, so all OIDs will be silently ignored regardless. **Fix:** Guard the count comparison with a check that at least one TSA source is configured before emitting the warning. **Tests added:** - `testTsapolicyidWarningNotEmittedWhenNoTsaConfigured` - verifies no misleading warning when tsapolicyid is set but no TSA servers are configured - `testTsapolicyidWarningEmittedWhenMoreOidsThanTsaServers` - verifies the warning IS emitted when there are more OIDs than TSA servers and TSA is configured -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
