Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/evp/p_verify.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | int | - | ||||||
5 | EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, | - | ||||||
6 | unsigned int siglen, EVP_PKEY *pkey) | - | ||||||
7 | { | - | ||||||
8 | unsigned char m[64]; | - | ||||||
9 | unsigned int m_len; | - | ||||||
10 | int i = 0, ok = 0, v; | - | ||||||
11 | EVP_MD_CTX tmp_ctx; | - | ||||||
12 | EVP_PKEY_CTX *pkctx = | - | ||||||
13 | ((void *)0) | - | ||||||
14 | ; | - | ||||||
15 | - | |||||||
16 | EVP_MD_CTX_init(&tmp_ctx); | - | ||||||
17 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)
| 0-46 | ||||||
18 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||
19 | if (!EVP_DigestFinal_ex(&tmp_ctx, &(m[0]), &m_len)
| 0-46 | ||||||
20 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||
21 | EVP_MD_CTX_cleanup(&tmp_ctx); | - | ||||||
22 | - | |||||||
23 | if (ctx->digest->flags & 0x0004
| 12-34 | ||||||
24 | i = -1; | - | ||||||
25 | pkctx = EVP_PKEY_CTX_new(pkey, | - | ||||||
26 | ((void *)0) | - | ||||||
27 | ); | - | ||||||
28 | if (!pkctx
| 0-34 | ||||||
29 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||
30 | if (EVP_PKEY_verify_init(pkctx) <= 0
| 0-34 | ||||||
31 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||
32 | if (EVP_PKEY_CTX_ctrl(pkctx, -1, ((1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7)), 1, 0, (void *)ctx->digest) <= 0
| 0-34 | ||||||
33 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||
34 | i = EVP_PKEY_verify(pkctx, sigbuf, siglen, m, m_len); | - | ||||||
35 | err: code before this statement executed 34 times by 3 tests: err: Executed by:
| 34 | ||||||
36 | EVP_PKEY_CTX_free(pkctx); | - | ||||||
37 | return executed 34 times by 3 tests: i;return i; Executed by:
executed 34 times by 3 tests: return i; Executed by:
| 34 | ||||||
38 | } | - | ||||||
39 | - | |||||||
40 | for (i = 0; i < 4
| 0-12 | ||||||
41 | v = ctx->digest->required_pkey_type[i]; | - | ||||||
42 | if (v == 0
| 0-12 | ||||||
43 | break; never executed: break; | 0 | ||||||
44 | if (pkey->type == v
| 0-12 | ||||||
45 | ok = 1; | - | ||||||
46 | break; executed 12 times by 1 test: break; Executed by:
| 12 | ||||||
47 | } | - | ||||||
48 | } never executed: end of block | 0 | ||||||
49 | if (!ok
| 0-12 | ||||||
50 | ERR_put_error(6,(0xfff),(110),__FILE__,108); | - | ||||||
51 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||
52 | } | - | ||||||
53 | if (ctx->digest->verify ==
| 0-12 | ||||||
54 | ((void *)0)
| 0-12 | ||||||
55 | ) { | - | ||||||
56 | ERR_put_error(6,(0xfff),(105),__FILE__,112); | - | ||||||
57 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||
58 | } | - | ||||||
59 | - | |||||||
60 | return executed 12 times by 1 test: (ctx->digest->verify(ctx->digest->type, m, m_len,return(ctx->digest->verify(ctx->digest->type, m, m_len, sigbuf, siglen, pkey->pkey.ptr)); Executed by:
executed 12 times by 1 test: return(ctx->digest->verify(ctx->digest->type, m, m_len, sigbuf, siglen, pkey->pkey.ptr)); Executed by:
| 12 | ||||||
61 | sigbuf, siglen, pkey->pkey.ptr)); executed 12 times by 1 test: return(ctx->digest->verify(ctx->digest->type, m, m_len, sigbuf, siglen, pkey->pkey.ptr)); Executed by:
| 12 | ||||||
62 | } | - | ||||||
Switch to Source code | Preprocessed file |