add options to skipping KeyUsage check

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24197 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-15 04:31:41 +00:00
parent 6d2fc59777
commit 61d49ed472

View File

@@ -567,9 +567,11 @@ hx509_cms_envelope_1(hx509_context context,
if (encryption_type == NULL)
encryption_type = oid_id_aes_256_cbc();
ret = _hx509_check_key_usage(context, cert, 1 << 2, TRUE);
if (ret)
goto out;
if ((flags & HX509_CMS_EV_NO_KU_CHECK) == 0) {
ret = _hx509_check_key_usage(context, cert, 1 << 2, TRUE);
if (ret)
goto out;
}
ret = hx509_crypto_init(context, NULL, encryption_type, &crypto);
if (ret)