add allow wrong oid flag, short for trust anchors
This commit is contained in:
@@ -113,6 +113,7 @@ command = {
|
|||||||
name = "cms-verify-sd"
|
name = "cms-verify-sd"
|
||||||
option = {
|
option = {
|
||||||
long = "anchors"
|
long = "anchors"
|
||||||
|
short = "D"
|
||||||
type = "strings"
|
type = "strings"
|
||||||
argument = "certificate-store"
|
argument = "certificate-store"
|
||||||
help = "trust anchors"
|
help = "trust anchors"
|
||||||
@@ -150,6 +151,11 @@ command = {
|
|||||||
type = "-flag"
|
type = "-flag"
|
||||||
help = "allow no signer"
|
help = "allow no signer"
|
||||||
}
|
}
|
||||||
|
option = {
|
||||||
|
long = "allow-wrong-oid"
|
||||||
|
type = "flag"
|
||||||
|
help = "allow wrong oid flag"
|
||||||
|
}
|
||||||
option = {
|
option = {
|
||||||
long = "signed-content"
|
long = "signed-content"
|
||||||
type = "string"
|
type = "string"
|
||||||
|
@@ -282,6 +282,8 @@ cms_verify_sd(struct cms_verify_sd_options *opt, int argc, char **argv)
|
|||||||
|
|
||||||
if (!opt->signer_allowed_flag)
|
if (!opt->signer_allowed_flag)
|
||||||
flags |= HX509_CMS_VS_ALLOW_ZERO_SIGNER;
|
flags |= HX509_CMS_VS_ALLOW_ZERO_SIGNER;
|
||||||
|
if (opt->allow_wrong_oid_flag)
|
||||||
|
flags |= HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH;
|
||||||
|
|
||||||
ret = hx509_cms_verify_signed(context, ctx, flags, co.data, co.length, sd,
|
ret = hx509_cms_verify_signed(context, ctx, flags, co.data, co.length, sd,
|
||||||
store, &type, &c, &signers);
|
store, &type, &c, &signers);
|
||||||
|
Reference in New Issue
Block a user