CMS and PKCS7: fix handlling of EVP_PKEY_get_size() failure