req: fix Coverity 1485137 Explicit null dereference
req: fix Coverity 1485137 Explicit null dereference

Add a check for a non-existent file name when specifying params via file.
Add a check for a failure to determine key type.

Reviewed-by: Tomas Mraz <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15534)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl