mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-21 14:09:27 +00:00
feat(real-world-vfc-slice): add labeled OpenSSL/Firefox/Chromium/curl pair corpus
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.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/* Provenance: openssl/openssl pkey_sm2_decrypt (fixed).
|
||||
* repo: openssl/openssl
|
||||
* commit: 59f5e75f3bced8fc0e130d72a3f582cf7b480b46
|
||||
* parent: 8c74c9d1ade0fbdab5b815ddb747351b8b839641
|
||||
* commit_url: https://github.com/openssl/openssl/commit/59f5e75f3bced8fc0e130d72a3f582cf7b480b46
|
||||
* cve: CVE-2021-3711
|
||||
* license: OpenSSL License
|
||||
* function: pkey_sm2_decrypt
|
||||
* relpath: crypto/sm2/sm2_pmeth.c
|
||||
*/
|
||||
|
||||
static int pkey_sm2_decrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen)
|
||||
{
|
||||
EC_KEY *ec = ctx->pkey->pkey.ec;
|
||||
SM2_PKEY_CTX *dctx = ctx->data;
|
||||
const EVP_MD *md = (dctx->md == NULL) ? EVP_sm3() : dctx->md;
|
||||
|
||||
if (out == NULL) {
|
||||
if (!sm2_plaintext_size(in, inlen, outlen))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
return sm2_decrypt(ec, md, in, inlen, out, outlen);
|
||||
}
|
||||
Reference in New Issue
Block a user