-/* $OpenBSD: cms.c,v 1.42 2024/02/01 15:11:38 tb Exp $ */
+/* $OpenBSD: cms.c,v 1.43 2024/04/21 09:03:22 job Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
extern ASN1_OBJECT *cnt_type_oid;
extern ASN1_OBJECT *msg_dgst_oid;
extern ASN1_OBJECT *sign_time_oid;
-extern ASN1_OBJECT *bin_sign_time_oid;
static int
cms_extract_econtent(const char *fn, CMS_ContentInfo *cms, unsigned char **res,
EVP_PKEY *pkey;
X509_ALGOR *pdig, *psig;
int i, nattrs, nid;
- int has_ct = 0, has_md = 0, has_st = 0,
- has_bst = 0;
+ int has_ct = 0, has_md = 0, has_st = 0;
time_t notafter;
int rc = 0;
}
if (!cms_get_signtime(fn, attr, signtime))
goto out;
- } else if (OBJ_cmp(obj, bin_sign_time_oid) == 0) {
- if (has_bst++ != 0) {
- warnx("%s: RFC 6488: duplicate "
- "signed attribute", fn);
- goto out;
- }
} else {
OBJ_obj2txt(buf, sizeof(buf), obj, 1);
warnx("%s: RFC 6488: "
goto out;
}
- if (has_bst)
- warnx("%s: unsupported CMS signing-time attribute", fn);
-
- if (!has_st)
+ if (!has_st) {
+ /* RFC-to-be draft-ietf-sidrops-cms-signing-time */
warnx("%s: missing CMS signing-time attribute", fn);
+ goto out;
+ }
if (CMS_unsigned_get_attr_count(si) != -1) {
warnx("%s: RFC 6488: CMS has unsignedAttrs", fn);
-/* $OpenBSD: x509.c,v 1.86 2024/04/03 04:20:13 tb Exp $ */
+/* $OpenBSD: x509.c,v 1.87 2024/04/21 09:03:22 job Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
ASN1_OBJECT *cnt_type_oid; /* pkcs-9 id-contentType */
ASN1_OBJECT *msg_dgst_oid; /* pkcs-9 id-messageDigest */
ASN1_OBJECT *sign_time_oid; /* pkcs-9 id-signingTime */
-ASN1_OBJECT *bin_sign_time_oid; /* pkcs-9 id-aa-binarySigningTime */
ASN1_OBJECT *rsc_oid; /* id-ct-signedChecklist */
ASN1_OBJECT *aspa_oid; /* id-ct-ASPA */
ASN1_OBJECT *tak_oid; /* id-ct-SignedTAL */
.oid = "1.2.840.113549.1.9.5",
.ptr = &sign_time_oid,
},
- {
- .oid = "1.2.840.113549.1.9.16.2.46",
- .ptr = &bin_sign_time_oid,
- },
{
.oid = "1.2.840.113549.1.9.16.1.47",
.ptr = &geofeed_oid,