Extend check for encrypted private keys: with OpenSSL versions prior to 1.0.0, inf->x_pkey->dec_pkey is always non-NULL, so also look at inf->enc_data. PR 54698.