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