freswa / dovecot-xaps-daemon

MIT License
50 stars 11 forks source link

Is there a mistake in VendorCerts usage? #33

Closed kjarex closed 1 year ago

kjarex commented 1 year ago

As far as I can see (and think to understand) only the first 9 of the 10 vendorCerts are being used (only here as Intn(9) would result in numbers from 0 to 8, ergo only the first 9 of the array)

This isn't an issue as in "it will/ might not work" but I assume it's not as it was intended (as I can't see the 10th cert being used anywhere else either)

freswa commented 1 year ago

Thanks for the report. Someone didn't read the docs correctly: Intn returns, as an int, a non-negative pseudo-random number in the half-open interval [0,n) from the default Source. It panics if n <= 0. Fix incoming.