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