CGI-SE-Trusted-Services / c2c-common

http://pvendil.github.io/c2c-common/
GNU Affero General Public License v3.0
46 stars 18 forks source link

CountryIds are validated incorrectly in CountryOnlyRegionValidator.java #17

Open turabek-cc opened 2 years ago

turabek-cc commented 2 years ago

Hello, I suppose that the following line:

https://github.com/pvendil/c2c-common/blob/987d78f451ebf5e81a6e807482967845d78cf9b8/src/main/java/org/certificateservices/custom/c2x/ieee1609dot2/validator/CountryOnlyRegionValidator.java#L105

should be checked the other way around like this:

if(!certCountryIds.containsAll(checkedCountryIds))...

as the certCountryIds must contain all the checkedCountryIds.