mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-18 12:39:28 +00:00
Harvest 176 isolated vuln-vs-fix functions (109 CVEs, 352 training rows) into benchmarks/pairs/vfc with provenance and a JSONL training manifest. Score the slice as an honesty dashboard (ousast pairs --slice vfc); keep the pair gate on the local fixtures only.
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
/* Provenance: openssl/openssl SMIME_write_PKCS7 (fixed).
|
|
* repo: openssl/openssl
|
|
* commit: 09df4395b5071217b76dc7d3d2e630eb8c5a79c2
|
|
* parent: 6c70934a46eaa1734c2efbe9d7baac51c607062e
|
|
* commit_url: https://github.com/openssl/openssl/commit/09df4395b5071217b76dc7d3d2e630eb8c5a79c2
|
|
* cve: CVE-2024-0727
|
|
* license: Apache-2.0
|
|
* function: SMIME_write_PKCS7
|
|
* relpath: crypto/pkcs7/pk7_mime.c
|
|
*/
|
|
|
|
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
|
|
{
|
|
STACK_OF(X509_ALGOR) *mdalgs;
|
|
int ctype_nid = OBJ_obj2nid(p7->type);
|
|
const PKCS7_CTX *ctx = ossl_pkcs7_get0_ctx(p7);
|
|
|
|
if (ctype_nid == NID_pkcs7_signed) {
|
|
if (p7->d.sign == NULL)
|
|
return 0;
|
|
mdalgs = p7->d.sign->md_algs;
|
|
} else {
|
|
mdalgs = NULL;
|
|
}
|
|
|
|
flags ^= SMIME_OLDMIME;
|
|
|
|
return SMIME_write_ASN1_ex(bio, (ASN1_VALUE *)p7, data, flags, ctype_nid,
|
|
NID_undef, mdalgs, ASN1_ITEM_rptr(PKCS7),
|
|
ossl_pkcs7_ctx_get0_libctx(ctx),
|
|
ossl_pkcs7_ctx_get0_propq(ctx));
|
|
}
|