Raise ValueError if the password doesn't fit

Fixes #1235. OpenSSL only allows password up to 1024 bytes.
I think this should be in `_handle_key_loading_error` possibly? What do you think?