[tor-commits] [tor/maint-0.4.1] Extract key length check into a new function, and check more fields.