Fix InternalError when loading malformed PKCS#8 DSA private key (#15062)

Loading a DER PKCS#8 DSA private key with malformed parameters (e.g. a
zero modulus p) caused the modular exponentiation used to recompute the
public key to fail inside OpenSSL, propagating the raw error stack as an
InternalError. Map this failure to InvalidKey so callers get a ValueError.

Fixes #15061


Claude-Session: https://claude.ai/code/session_01VgbyMpHukw3e39YnJcRzc3

Co-authored-by: Claude <noreply@anthropic.com>
2 files changed