Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/evp/m_sha1.c |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | - | |
5 | - | |
6 | - | |
7 | - | |
8 | - | |
9 | - | |
10 | static int | - |
11 | init(EVP_MD_CTX *ctx) | - |
12 | { | - |
13 | return executed 9772 times by 14 tests: SHA1_Init(ctx->md_data);return SHA1_Init(ctx->md_data); Executed by:
executed 9772 times by 14 tests: return SHA1_Init(ctx->md_data); Executed by:
| 9772 |
14 | } | - |
15 | - | |
16 | static int | - |
17 | update(EVP_MD_CTX *ctx, const void *data, size_t count) | - |
18 | { | - |
19 | return executed 57061 times by 14 tests: SHA1_Update(ctx->md_data, data, count);return SHA1_Update(ctx->md_data, data, count); Executed by:
executed 57061 times by 14 tests: return SHA1_Update(ctx->md_data, data, count); Executed by:
| 57061 |
20 | } | - |
21 | - | |
22 | static int | - |
23 | final(EVP_MD_CTX *ctx, unsigned char *md) | - |
24 | { | - |
25 | return executed 42768 times by 14 tests: SHA1_Final(md, ctx->md_data);return SHA1_Final(md, ctx->md_data); Executed by:
executed 42768 times by 14 tests: return SHA1_Final(md, ctx->md_data); Executed by:
| 42768 |
26 | } | - |
27 | - | |
28 | static const EVP_MD sha1_md = { | - |
29 | .type = 64, | - |
30 | .pkey_type = 65, | - |
31 | .md_size = 20, | - |
32 | .flags = 0x0004|0x0008, | - |
33 | .init = init, | - |
34 | .update = update, | - |
35 | .final = final, | - |
36 | .copy = | - |
37 | ((void *)0) | - |
38 | , | - |
39 | .cleanup = | - |
40 | ((void *)0) | - |
41 | , | - |
42 | - | |
43 | .sign = (evp_sign_method *)RSA_sign, | - |
44 | .verify = (evp_verify_method *)RSA_verify, | - |
45 | .required_pkey_type = { | - |
46 | 6, 19, 0, 0, | - |
47 | }, | - |
48 | - | |
49 | .block_size = (16*4), | - |
50 | .ctx_size = sizeof(EVP_MD *) + sizeof(SHA_CTX), | - |
51 | }; | - |
52 | - | |
53 | const EVP_MD * | - |
54 | EVP_sha1(void) | - |
55 | { | - |
56 | return executed 3974 times by 35 tests: (&sha1_md);return (&sha1_md); Executed by:
executed 3974 times by 35 tests: return (&sha1_md); Executed by:
| 3974 |
57 | } | - |
58 | - | |
59 | - | |
60 | - | |
61 | static int | - |
62 | init224(EVP_MD_CTX *ctx) | - |
63 | { | - |
64 | return executed 3 times by 1 test: SHA224_Init(ctx->md_data);return SHA224_Init(ctx->md_data); Executed by:
executed 3 times by 1 test: return SHA224_Init(ctx->md_data); Executed by:
| 3 |
65 | } | - |
66 | - | |
67 | static int | - |
68 | init256(EVP_MD_CTX *ctx) | - |
69 | { | - |
70 | return executed 3726 times by 9 tests: SHA256_Init(ctx->md_data);return SHA256_Init(ctx->md_data); Executed by:
executed 3726 times by 9 tests: return SHA256_Init(ctx->md_data); Executed by:
| 3726 |
71 | } | - |
72 | - | |
73 | - | |
74 | - | |
75 | - | |
76 | - | |
77 | static int | - |
78 | update256(EVP_MD_CTX *ctx, const void *data, size_t count) | - |
79 | { | - |
80 | return executed 66490 times by 9 tests: SHA256_Update(ctx->md_data, data, count);return SHA256_Update(ctx->md_data, data, count); Executed by:
executed 66490 times by 9 tests: return SHA256_Update(ctx->md_data, data, count); Executed by:
| 66490 |
81 | } | - |
82 | - | |
83 | static int | - |
84 | final256(EVP_MD_CTX *ctx, unsigned char *md) | - |
85 | { | - |
86 | return executed 36677 times by 9 tests: SHA256_Final(md, ctx->md_data);return SHA256_Final(md, ctx->md_data); Executed by:
executed 36677 times by 9 tests: return SHA256_Final(md, ctx->md_data); Executed by:
| 36677 |
87 | } | - |
88 | - | |
89 | static const EVP_MD sha224_md = { | - |
90 | .type = 675, | - |
91 | .pkey_type = 671, | - |
92 | .md_size = 28, | - |
93 | .flags = 0x0004|0x0008, | - |
94 | .init = init224, | - |
95 | .update = update256, | - |
96 | .final = final256, | - |
97 | .copy = | - |
98 | ((void *)0) | - |
99 | , | - |
100 | .cleanup = | - |
101 | ((void *)0) | - |
102 | , | - |
103 | - | |
104 | .sign = (evp_sign_method *)RSA_sign, | - |
105 | .verify = (evp_verify_method *)RSA_verify, | - |
106 | .required_pkey_type = { | - |
107 | 6, 19, 0, 0, | - |
108 | }, | - |
109 | - | |
110 | .block_size = (16*4), | - |
111 | .ctx_size = sizeof(EVP_MD *) + sizeof(SHA256_CTX), | - |
112 | }; | - |
113 | - | |
114 | const EVP_MD * | - |
115 | EVP_sha224(void) | - |
116 | { | - |
117 | return executed 628 times by 34 tests: (&sha224_md);return (&sha224_md); Executed by:
executed 628 times by 34 tests: return (&sha224_md); Executed by:
| 628 |
118 | } | - |
119 | - | |
120 | static const EVP_MD sha256_md = { | - |
121 | .type = 672, | - |
122 | .pkey_type = 668, | - |
123 | .md_size = 32, | - |
124 | .flags = 0x0004|0x0008, | - |
125 | .init = init256, | - |
126 | .update = update256, | - |
127 | .final = final256, | - |
128 | .copy = | - |
129 | ((void *)0) | - |
130 | , | - |
131 | .cleanup = | - |
132 | ((void *)0) | - |
133 | , | - |
134 | - | |
135 | .sign = (evp_sign_method *)RSA_sign, | - |
136 | .verify = (evp_verify_method *)RSA_verify, | - |
137 | .required_pkey_type = { | - |
138 | 6, 19, 0, 0, | - |
139 | }, | - |
140 | - | |
141 | .block_size = (16*4), | - |
142 | .ctx_size = sizeof(EVP_MD *) + sizeof(SHA256_CTX), | - |
143 | }; | - |
144 | - | |
145 | const EVP_MD * | - |
146 | EVP_sha256(void) | - |
147 | { | - |
148 | return executed 1255 times by 35 tests: (&sha256_md);return (&sha256_md); Executed by:
executed 1255 times by 35 tests: return (&sha256_md); Executed by:
| 1255 |
149 | } | - |
150 | - | |
151 | - | |
152 | - | |
153 | static int | - |
154 | init384(EVP_MD_CTX *ctx) | - |
155 | { | - |
156 | return executed 1192 times by 4 tests: SHA384_Init(ctx->md_data);return SHA384_Init(ctx->md_data); Executed by:
executed 1192 times by 4 tests: return SHA384_Init(ctx->md_data); Executed by:
| 1192 |
157 | } | - |
158 | - | |
159 | static int | - |
160 | init512(EVP_MD_CTX *ctx) | - |
161 | { | - |
162 | return executed 77 times by 4 tests: SHA512_Init(ctx->md_data);return SHA512_Init(ctx->md_data); Executed by:
executed 77 times by 4 tests: return SHA512_Init(ctx->md_data); Executed by:
| 77 |
163 | } | - |
164 | - | |
165 | static int | - |
166 | update512(EVP_MD_CTX *ctx, const void *data, size_t count) | - |
167 | { | - |
168 | return executed 48212 times by 6 tests: SHA512_Update(ctx->md_data, data, count);return SHA512_Update(ctx->md_data, data, count); Executed by:
executed 48212 times by 6 tests: return SHA512_Update(ctx->md_data, data, count); Executed by:
| 48212 |
169 | } | - |
170 | - | |
171 | static int | - |
172 | final512(EVP_MD_CTX *ctx, unsigned char *md) | - |
173 | { | - |
174 | return executed 25860 times by 5 tests: SHA512_Final(md, ctx->md_data);return SHA512_Final(md, ctx->md_data); Executed by:
executed 25860 times by 5 tests: return SHA512_Final(md, ctx->md_data); Executed by:
| 25860 |
175 | } | - |
176 | - | |
177 | static const EVP_MD sha384_md = { | - |
178 | .type = 673, | - |
179 | .pkey_type = 669, | - |
180 | .md_size = 48, | - |
181 | .flags = 0x0004|0x0008, | - |
182 | .init = init384, | - |
183 | .update = update512, | - |
184 | .final = final512, | - |
185 | .copy = | - |
186 | ((void *)0) | - |
187 | , | - |
188 | .cleanup = | - |
189 | ((void *)0) | - |
190 | , | - |
191 | - | |
192 | .sign = (evp_sign_method *)RSA_sign, | - |
193 | .verify = (evp_verify_method *)RSA_verify, | - |
194 | .required_pkey_type = { | - |
195 | 6, 19, 0, 0, | - |
196 | }, | - |
197 | - | |
198 | .block_size = (16*8), | - |
199 | .ctx_size = sizeof(EVP_MD *) + sizeof(SHA512_CTX), | - |
200 | }; | - |
201 | - | |
202 | const EVP_MD * | - |
203 | EVP_sha384(void) | - |
204 | { | - |
205 | return executed 805 times by 34 tests: (&sha384_md);return (&sha384_md); Executed by:
executed 805 times by 34 tests: return (&sha384_md); Executed by:
| 805 |
206 | } | - |
207 | - | |
208 | static const EVP_MD sha512_md = { | - |
209 | .type = 674, | - |
210 | .pkey_type = 670, | - |
211 | .md_size = 64, | - |
212 | .flags = 0x0004|0x0008, | - |
213 | .init = init512, | - |
214 | .update = update512, | - |
215 | .final = final512, | - |
216 | .copy = | - |
217 | ((void *)0) | - |
218 | , | - |
219 | .cleanup = | - |
220 | ((void *)0) | - |
221 | , | - |
222 | - | |
223 | .sign = (evp_sign_method *)RSA_sign, | - |
224 | .verify = (evp_verify_method *)RSA_verify, | - |
225 | .required_pkey_type = { | - |
226 | 6, 19, 0, 0, | - |
227 | }, | - |
228 | - | |
229 | .block_size = (16*8), | - |
230 | .ctx_size = sizeof(EVP_MD *) + sizeof(SHA512_CTX), | - |
231 | }; | - |
232 | - | |
233 | const EVP_MD * | - |
234 | EVP_sha512(void) | - |
235 | { | - |
236 | return executed 743 times by 34 tests: (&sha512_md);return (&sha512_md); Executed by:
executed 743 times by 34 tests: return (&sha512_md); Executed by:
| 743 |
237 | } | - |
Switch to Source code | Preprocessed file |