OpenCoverage

cms_smime.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/cms/cms_smime.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static BIO *cms_get_text_bio(BIO *out, unsigned int flags)-
4{-
5 BIO *rbio;-
6 if (out ==
out == ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 55 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-55
7 ((void *)0)
out == ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 55 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-55
8 )-
9 rbio = BIO_new(BIO_s_null());
executed 1 time by 1 test: rbio = BIO_new(BIO_s_null());
Executed by:
  • libcrypto.so.1.1
1
10 else if (flags & 0x1
flags & 0x1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 54 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-54
11 rbio = BIO_new(BIO_s_mem());-
12 BIO_ctrl(rbio,130,0,-
13 ((void *)0)-
14 );-
15 }
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
1
16 rbio = out;
executed 54 times by 1 test: rbio = out;
Executed by:
  • libcrypto.so.1.1
54
17 return
executed 56 times by 1 test: return rbio;
Executed by:
  • libcrypto.so.1.1
rbio;
executed 56 times by 1 test: return rbio;
Executed by:
  • libcrypto.so.1.1
56
18}-
19-
20static int cms_copy_content(BIO *out, BIO *in, unsigned int flags)-
21{-
22 unsigned char buf[4096];-
23 int r = 0, i;-
24 BIO *tmpout;-
25-
26 tmpout = cms_get_text_bio(out, flags);-
27-
28 if (tmpout ==
tmpout == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
29 ((void *)0)
tmpout == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
30 ) {-
31 ERR_put_error(46,(107),((1|64)),__FILE__,41);-
32 goto
never executed: goto err;
err;
never executed: goto err;
0
33 }-
34-
35-
36 for (;;) {-
37 i = BIO_read(in, buf, sizeof(buf));-
38 if (i <= 0
i <= 0Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
46
39 if (BIO_method_type(in) == (10|0x0200)
BIO_method_typ...== (10|0x0200)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
22-24
40 if (!BIO_ctrl(in,113,0,
!BIO_ctrl(in,1... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24
41 ((void *)0)
!BIO_ctrl(in,1... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24
42 )
!BIO_ctrl(in,1... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-24
43 goto
never executed: goto err;
err;
never executed: goto err;
0
44 }
executed 24 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
24
45 if (i < 0
i < 0Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-46
46 goto
never executed: goto err;
err;
never executed: goto err;
0
47 break;
executed 46 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
46
48 }-
49-
50 if (tmpout
tmpoutDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& (
(BIO_write(tmp... buf, i) != i)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
BIO_write(tmpout, buf, i) != i)
(BIO_write(tmp... buf, i) != i)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-46
51 goto
never executed: goto err;
err;
never executed: goto err;
0
52 }
executed 46 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
46
53-
54 if (flags & 0x1
flags & 0x1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 45 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-45
55 if (!SMIME_text(tmpout, out)
!SMIME_text(tmpout, out)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1
56 ERR_put_error(46,(107),(140),__FILE__,64);-
57 goto
never executed: goto err;
err;
never executed: goto err;
0
58 }-
59 }
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
60-
61 r = 1;-
62-
63 err:
code before this statement executed 46 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
46
64 if (tmpout != out
tmpout != outDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2-44
65 BIO_free(tmpout);
executed 2 times by 1 test: BIO_free(tmpout);
Executed by:
  • libcrypto.so.1.1
2
66 return
executed 46 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
r;
executed 46 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
46
67-
68}-
69-
70static int check_content(CMS_ContentInfo *cms)-
71{-
72 ASN1_OCTET_STRING **pos = CMS_get0_content(cms);-
73 if (!pos
!posDescription
TRUEnever evaluated
FALSEevaluated 45 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !*pos
!*posDescription
TRUEnever evaluated
FALSEevaluated 45 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-45
74 ERR_put_error(46,(99),(127),__FILE__,82);-
75 return
never executed: return 0;
0;
never executed: return 0;
0
76 }-
77 return
executed 45 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 45 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
45
78}-
79-
80static void do_free_upto(BIO *f, BIO *upto)-
81{-
82 if (upto
uptoDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
10-38
83 BIO *tbio;-
84 do {-
85 tbio = BIO_pop(f);-
86 BIO_free(f);-
87 f = tbio;-
88 }
executed 10 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
10
89 while (f
fDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& f != upto
f != uptoDescription
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
);
0-10
90 }
executed 10 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
10
91 BIO_free_all(f);
executed 38 times by 1 test: BIO_free_all(f);
Executed by:
  • libcrypto.so.1.1
38
92}-
93-
94int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags)-
95{-
96 BIO *cont;-
97 int r;-
98 if (OBJ_obj2nid(CMS_get0_type(cms)) != 21
OBJ_obj2nid(CM...pe(cms)) != 21Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1
99 ERR_put_error(46,(109),(143),__FILE__,107);-
100 return
never executed: return 0;
0;
never executed: return 0;
0
101 }-
102 cont = CMS_dataInit(cms, -
103 ((void *)0)-
104 );-
105 if (!cont
!contDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
106 return
never executed: return 0;
0;
never executed: return 0;
0
107 r = cms_copy_content(out, cont, flags);-
108 BIO_free_all(cont);-
109 return
executed 1 time by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
r;
executed 1 time by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
1
110}-
111-
112CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags)-
113{-
114 CMS_ContentInfo *cms;-
115 cms = cms_Data_create();-
116 if (!cms
!cmsDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
117 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
118 ((void *)0)
never executed: return ((void *)0) ;
0
119 ;
never executed: return ((void *)0) ;
0
120-
121 if ((
(flags & 0x1000)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
flags & 0x1000)
(flags & 0x1000)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
|| CMS_final(cms, in,
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0-1
122 ((void *)0)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
123 , flags)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
124 return
executed 1 time by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
cms;
executed 1 time by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
1
125-
126 CMS_ContentInfo_free(cms);-
127-
128 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
129 ((void *)0)
never executed: return ((void *)0) ;
0
130 ;
never executed: return ((void *)0) ;
0
131}-
132-
133int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,-
134 unsigned int flags)-
135{-
136 BIO *cont;-
137 int r;-
138 if (OBJ_obj2nid(CMS_get0_type(cms)) != 25
OBJ_obj2nid(CM...pe(cms)) != 25Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
139 ERR_put_error(46,(118),(144),__FILE__,139);-
140 return
never executed: return 0;
0;
never executed: return 0;
0
141 }-
142-
143 if (!dcont
!dcontDescription
TRUEnever evaluated
FALSEnever evaluated
&& !check_content(cms)
!check_content(cms)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
144 return
never executed: return 0;
0;
never executed: return 0;
0
145-
146 cont = CMS_dataInit(cms, dcont);-
147 if (!cont
!contDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
148 return
never executed: return 0;
0;
never executed: return 0;
0
149 r = cms_copy_content(out, cont, flags);-
150 if (r
rDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
151 r = cms_DigestedData_do_final(cms, cont, 1);
never executed: r = cms_DigestedData_do_final(cms, cont, 1);
0
152 do_free_upto(cont, dcont);-
153 return
never executed: return r;
r;
never executed: return r;
0
154}-
155-
156CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,-
157 unsigned int flags)-
158{-
159 CMS_ContentInfo *cms;-
160 if (!md
!mdDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
161 md = EVP_sha1();
never executed: md = EVP_sha1();
0
162 cms = cms_DigestedData_create(md);-
163 if (!cms
!cmsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
164 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
165 ((void *)0)
never executed: return ((void *)0) ;
0
166 ;
never executed: return ((void *)0) ;
0
167-
168 if (!(flags & 0x40)
!(flags & 0x40)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
169 CMS_set_detached(cms, 0);
never executed: CMS_set_detached(cms, 0);
0
170-
171 if ((
(flags & 0x1000)Description
TRUEnever evaluated
FALSEnever evaluated
flags & 0x1000)
(flags & 0x1000)Description
TRUEnever evaluated
FALSEnever evaluated
|| CMS_final(cms, in,
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
172 ((void *)0)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
173 , flags)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
174 return
never executed: return cms;
cms;
never executed: return cms;
0
175-
176 CMS_ContentInfo_free(cms);-
177 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
178 ((void *)0)
never executed: return ((void *)0) ;
0
179 ;
never executed: return ((void *)0) ;
0
180}-
181-
182int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,-
183 const unsigned char *key, size_t keylen,-
184 BIO *dcont, BIO *out, unsigned int flags)-
185{-
186 BIO *cont;-
187 int r;-
188 if (OBJ_obj2nid(CMS_get0_type(cms)) != 26
OBJ_obj2nid(CM...pe(cms)) != 26Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-4
189 ERR_put_error(46,(121),(145),__FILE__,184)-
190 ;-
191 return
never executed: return 0;
0;
never executed: return 0;
0
192 }-
193-
194 if (!dcont
!dcontDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !check_content(cms)
!check_content(cms)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
195 return
never executed: return 0;
0;
never executed: return 0;
0
196-
197 if (CMS_EncryptedData_set1_key(cms,
CMS_EncryptedD..., keylen) <= 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4
198 ((void *)0)
CMS_EncryptedD..., keylen) <= 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4
199 , key, keylen) <= 0
CMS_EncryptedD..., keylen) <= 0Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
200 return
never executed: return 0;
0;
never executed: return 0;
0
201 cont = CMS_dataInit(cms, dcont);-
202 if (!cont
!contDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
203 return
never executed: return 0;
0;
never executed: return 0;
0
204 r = cms_copy_content(out, cont, flags);-
205 do_free_upto(cont, dcont);-
206 return
executed 4 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
r;
executed 4 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
4
207}-
208-
209CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,-
210 const unsigned char *key,-
211 size_t keylen, unsigned int flags)-
212{-
213 CMS_ContentInfo *cms;-
214 if (!cipher
!cipherDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-4
215 ERR_put_error(46,(122),(126),__FILE__,207);-
216 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
217 ((void *)0)
never executed: return ((void *)0) ;
0
218 ;
never executed: return ((void *)0) ;
0
219 }-
220 cms = CMS_ContentInfo_new();-
221 if (cms ==
cms == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4
222 ((void *)0)
cms == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4
223 )-
224 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
225 ((void *)0)
never executed: return ((void *)0) ;
0
226 ;
never executed: return ((void *)0) ;
0
227 if (!CMS_EncryptedData_set1_key(cms, cipher, key, keylen)
!CMS_Encrypted..., key, keylen)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
228 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
229 ((void *)0)
never executed: return ((void *)0) ;
0
230 ;
never executed: return ((void *)0) ;
0
231-
232 if (!(flags & 0x40)
!(flags & 0x40)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-4
233 CMS_set_detached(cms, 0);
executed 4 times by 1 test: CMS_set_detached(cms, 0);
Executed by:
  • libcrypto.so.1.1
4
234-
235 if ((
(flags & (0x1000 | 0x4000))Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
flags & (0x1000 | 0x4000))
(flags & (0x1000 | 0x4000))Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-4
236 || CMS_final(cms, in,
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
237 ((void *)0)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
238 , flags)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
239 return
executed 4 times by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
cms;
executed 4 times by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
4
240-
241 CMS_ContentInfo_free(cms);-
242 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
243 ((void *)0)
never executed: return ((void *)0) ;
0
244 ;
never executed: return ((void *)0) ;
0
245}-
246-
247static int cms_signerinfo_verify_cert(CMS_SignerInfo *si,-
248 X509_STORE *store,-
249 struct stack_st_X509 *certs,-
250 struct stack_st_X509_CRL *crls)-
251{-
252 X509_STORE_CTX *ctx = X509_STORE_CTX_new();-
253 X509 *signer;-
254 int i, j, r = 0;-
255-
256 if (ctx ==
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-63
257 ((void *)0)
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-63
258 ) {-
259 ERR_put_error(46,(153),((1|64)),__FILE__,237);-
260 goto
never executed: goto err;
err;
never executed: goto err;
0
261 }-
262 CMS_SignerInfo_get0_algs(si, -
263 ((void *)0)-
264 , &signer, -
265 ((void *)0)-
266 , -
267 ((void *)0)-
268 );-
269 if (!X509_STORE_CTX_init(ctx, store, signer, certs)
!X509_STORE_CT...signer, certs)Description
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-63
270 ERR_put_error(46,(153),(141),__FILE__,242);-
271 goto
never executed: goto err;
err;
never executed: goto err;
0
272 }-
273 X509_STORE_CTX_set_default(ctx, "smime_sign");-
274 if (crls
crlsDescription
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-63
275 X509_STORE_CTX_set0_crls(ctx, crls);
never executed: X509_STORE_CTX_set0_crls(ctx, crls);
0
276-
277 i = X509_verify_cert(ctx);-
278 if (i <= 0
i <= 0Description
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-63
279 j = X509_STORE_CTX_get_error(ctx);-
280 ERR_put_error(46,(153),(100),__FILE__,253)-
281 ;-
282 ERR_add_error_data(2, "Verify error:",-
283 X509_verify_cert_error_string(j));-
284 goto
never executed: goto err;
err;
never executed: goto err;
0
285 }-
286 r = 1;-
287 err:
code before this statement executed 63 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
63
288 X509_STORE_CTX_free(ctx);-
289 return
executed 63 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
r;
executed 63 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
63
290-
291}-
292-
293int CMS_verify(CMS_ContentInfo *cms, struct stack_st_X509 *certs,-
294 X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags)-
295{-
296 CMS_SignerInfo *si;-
297 struct stack_st_CMS_SignerInfo *sinfos;-
298 struct stack_st_X509 *cms_certs = -
299 ((void *)0)-
300 ;-
301 struct stack_st_X509_CRL *crls = -
302 ((void *)0)-
303 ;-
304 X509 *signer;-
305 int i, scount = 0, ret = 0;-
306 BIO *cmsbio = -
307 ((void *)0)-
308 , *tmpin = -
309 ((void *)0)-
310 , *tmpout = -
311 ((void *)0)-
312 ;-
313-
314 if (!dcont
!dcontDescription
TRUEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !check_content(cms)
!check_content(cms)Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21
315 return
never executed: return 0;
0;
never executed: return 0;
0
316 if (dcont
dcontDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !(flags & 0x80)
!(flags & 0x80)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-21
317 const ASN1_OBJECT *coid = CMS_get0_eContentType(cms);-
318 if (OBJ_obj2nid(coid) == 787
OBJ_obj2nid(coid) == 787Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-10
319 flags |= 0x80000;
never executed: flags |= 0x80000;
0
320 }
executed 10 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
10
321-
322-
323-
324 sinfos = CMS_get0_SignerInfos(cms);-
325-
326 if (sk_CMS_SignerInfo_num(sinfos) <= 0
sk_CMS_SignerI...m(sinfos) <= 0Description
TRUEnever evaluated
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-31
327 ERR_put_error(46,(157),(135),__FILE__,289);-
328 goto
never executed: goto err;
err;
never executed: goto err;
0
329 }-
330-
331 for (i = 0; i < sk_CMS_SignerInfo_num(sinfos)
i < sk_CMS_Sig...fo_num(sinfos)Description
TRUEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
31-63
332 si = sk_CMS_SignerInfo_value(sinfos, i);-
333 CMS_SignerInfo_get0_algs(si, -
334 ((void *)0)-
335 , &signer, -
336 ((void *)0)-
337 , -
338 ((void *)0)-
339 );-
340 if (signer
signerDescription
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-63
341 scount++;
never executed: scount++;
0
342 }
executed 63 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
63
343-
344 if (scount != sk_CMS_SignerInfo_num(sinfos)
scount != sk_C...fo_num(sinfos)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-31
345 scount += CMS_set1_signers_certs(cms, certs, flags);
executed 31 times by 1 test: scount += CMS_set1_signers_certs(cms, certs, flags);
Executed by:
  • libcrypto.so.1.1
31
346-
347 if (scount != sk_CMS_SignerInfo_num(sinfos)
scount != sk_C...fo_num(sinfos)Description
TRUEnever evaluated
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-31
348 ERR_put_error(46,(157),(138),__FILE__,304);-
349 goto
never executed: goto err;
err;
never executed: goto err;
0
350 }-
351-
352-
353-
354 if (!(flags & 0x20)
!(flags & 0x20)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-31
355 cms_certs = CMS_get1_certs(cms);-
356 if (!(flags & 0x2000)
!(flags & 0x2000)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-31
357 crls = CMS_get1_crls(cms);
executed 31 times by 1 test: crls = CMS_get1_crls(cms);
Executed by:
  • libcrypto.so.1.1
31
358 for (i = 0; i < sk_CMS_SignerInfo_num(sinfos)
i < sk_CMS_Sig...fo_num(sinfos)Description
TRUEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
31-63
359 si = sk_CMS_SignerInfo_value(sinfos, i);-
360 if (!cms_signerinfo_verify_cert(si, store, cms_certs, crls)
!cms_signerinf...s_certs, crls)Description
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-63
361 goto
never executed: goto err;
err;
never executed: goto err;
0
362 }
executed 63 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
63
363 }
executed 31 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
31
364-
365-
366-
367 if (!(flags & 0x8)
!(flags & 0x8)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-31
368 for (i = 0; i < sk_CMS_SignerInfo_num(sinfos)
i < sk_CMS_Sig...fo_num(sinfos)Description
TRUEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
31-63
369 si = sk_CMS_SignerInfo_value(sinfos, i);-
370 if (CMS_signed_get_attr_count(si) < 0
CMS_signed_get..._count(si) < 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 54 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
9-54
371 continue;
executed 9 times by 1 test: continue;
Executed by:
  • libcrypto.so.1.1
9
372 if (CMS_SignerInfo_verify(si) <= 0
CMS_SignerInfo_verify(si) <= 0Description
TRUEnever evaluated
FALSEevaluated 54 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-54
373 goto
never executed: goto err;
err;
never executed: goto err;
0
374 }
executed 54 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
54
375 }
executed 31 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
31
376 if (dcont
dcontDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(BIO_method_ty...= ( 1|0x0400))Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
BIO_method_type(dcont) == ( 1|0x0400))
(BIO_method_ty...= ( 1|0x0400))Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4-21
377 char *ptr;-
378 long len;-
379 len = BIO_ctrl(dcont,3,0,(char *)(&ptr));-
380 tmpin = BIO_new_mem_buf(ptr, len);-
381 if (tmpin ==
tmpin == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4
382 ((void *)0)
tmpin == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4
383 ) {-
384 ERR_put_error(46,(157),((1|64)),__FILE__,346);-
385 goto
never executed: goto err2;
err2;
never executed: goto err2;
0
386 }-
387 }
executed 4 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
4
388 tmpin = dcont;
executed 27 times by 1 test: tmpin = dcont;
Executed by:
  • libcrypto.so.1.1
27
389-
390-
391-
392-
393 if (!(flags & 0x80)
!(flags & 0x80)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& dcont
dcontDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-31
394-
395-
396-
397-
398 tmpout = cms_get_text_bio(out, flags);-
399 if (!tmpout
!tmpoutDescription
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-10
400 ERR_put_error(46,(157),((1|64)),__FILE__,362);-
401 goto
never executed: goto err;
err;
never executed: goto err;
0
402 }-
403 cmsbio = CMS_dataInit(cms, tmpout);-
404 if (!cmsbio
!cmsbioDescription
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-10
405 goto
never executed: goto err;
err;
never executed: goto err;
0
406-
407-
408-
409-
410 SMIME_crlf_copy(dcont, cmsbio, flags & ~0x1);-
411-
412 if (flags & 0x1
flags & 0x1Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-10
413 if (!SMIME_text(tmpout, out)
!SMIME_text(tmpout, out)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
414 ERR_put_error(46,(157),(140),__FILE__,376);-
415 goto
never executed: goto err;
err;
never executed: goto err;
0
416 }-
417 }
never executed: end of block
0
418 }
executed 10 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
10
419 cmsbio = CMS_dataInit(cms, tmpin);-
420 if (!cmsbio
!cmsbioDescription
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21
421 goto
never executed: goto err;
err;
never executed: goto err;
0
422-
423 if (!cms_copy_content(out, cmsbio, flags)
!cms_copy_cont...cmsbio, flags)Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21
424 goto
never executed: goto err;
err;
never executed: goto err;
0
425-
426 }
executed 21 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
21
427 if (!(flags & 0x4)
!(flags & 0x4)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-31
428 for (i = 0; i < sk_CMS_SignerInfo_num(sinfos)
i < sk_CMS_Sig...fo_num(sinfos)Description
TRUEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
31-63
429 si = sk_CMS_SignerInfo_value(sinfos, i);-
430 if (CMS_SignerInfo_verify_content(si, cmsbio) <= 0
CMS_SignerInfo..., cmsbio) <= 0Description
TRUEnever evaluated
FALSEevaluated 63 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-63
431 ERR_put_error(46,(157),(109),__FILE__,393);-
432 goto
never executed: goto err;
err;
never executed: goto err;
0
433 }-
434 }
executed 63 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
63
435 }
executed 31 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
31
436-
437 ret = 1;-
438-
439 err:
code before this statement executed 31 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
31
440 if (!(flags & 0x80)
!(flags & 0x80)Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& dcont
dcontDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-31
441 do_free_upto(cmsbio, tmpout);-
442 if (tmpin != dcont
tmpin != dcontDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4-6
443 BIO_free(tmpin);
executed 4 times by 1 test: BIO_free(tmpin);
Executed by:
  • libcrypto.so.1.1
4
444 }
executed 10 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
10
445 if (dcont
dcontDescription
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(tmpin == dcont)Description
TRUEnever evaluated
FALSEnever evaluated
tmpin == dcont)
(tmpin == dcont)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-21
446 do_free_upto(cmsbio, dcont);
never executed: do_free_upto(cmsbio, dcont);
0
447 else-
448 BIO_free_all(cmsbio);
executed 21 times by 1 test: BIO_free_all(cmsbio);
Executed by:
  • libcrypto.so.1.1
21
449 }-
450-
451 if (out != tmpout
out != tmpoutDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
11-20
452 BIO_free_all(tmpout);
executed 20 times by 1 test: BIO_free_all(tmpout);
Executed by:
  • libcrypto.so.1.1
20
453-
454 err2:
code before this statement executed 31 times by 1 test: err2:
Executed by:
  • libcrypto.so.1.1
31
455 sk_X509_pop_free(cms_certs, X509_free);-
456 sk_X509_CRL_pop_free(crls, X509_CRL_free);-
457-
458 return
executed 31 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 31 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
31
459}-
460-
461int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,-
462 struct stack_st_X509 *certs,-
463 X509_STORE *store, unsigned int flags)-
464{-
465 int r;-
466 flags &= ~(0x40 | 0x1);-
467 r = CMS_verify(rcms, certs, store, -
468 ((void *)0)-
469 , -
470 ((void *)0)-
471 , flags);-
472 if (r <= 0
r <= 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
473 return
never executed: return r;
r;
never executed: return r;
0
474 return
executed 1 time by 1 test: return cms_Receipt_verify(rcms, ocms);
Executed by:
  • libcrypto.so.1.1
cms_Receipt_verify(rcms, ocms);
executed 1 time by 1 test: return cms_Receipt_verify(rcms, ocms);
Executed by:
  • libcrypto.so.1.1
1
475}-
476-
477CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,-
478 struct stack_st_X509 *certs, BIO *data,-
479 unsigned int flags)-
480{-
481 CMS_ContentInfo *cms;-
482 int i;-
483-
484 cms = CMS_ContentInfo_new();-
485 if (cms ==
cms == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-29
486 ((void *)0)
cms == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-29
487 || !CMS_SignedData_init(cms)
!CMS_SignedData_init(cms)Description
TRUEnever evaluated
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-29
488 goto
never executed: goto merr;
merr;
never executed: goto merr;
0
489 if (flags & 0x80000
flags & 0x80000Description
TRUEnever evaluated
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-29
490 && !CMS_set1_eContentType(cms,
!CMS_set1_eCon..._nid2obj(787))Description
TRUEnever evaluated
FALSEnever evaluated
0
491 OBJ_nid2obj(787))
!CMS_set1_eCon..._nid2obj(787))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
492 goto
never executed: goto err;
err;
never executed: goto err;
0
493-
494 if (pkey
pkeyDescription
TRUEnever evaluated
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !CMS_add1_signer(cms, signcert, pkey,
!CMS_add1_sign... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0-29
495 ((void *)0)
!CMS_add1_sign... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
496 , flags)
!CMS_add1_sign... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
497 ERR_put_error(46,(148),(99),__FILE__,451);-
498 goto
never executed: goto err;
err;
never executed: goto err;
0
499 }-
500-
501 for (i = 0; i < sk_X509_num(certs)
i < sk_X509_num(certs)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
4-29
502 X509 *x = sk_X509_value(certs, i);-
503 if (!CMS_add1_cert(cms, x)
!CMS_add1_cert(cms, x)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
504 goto
never executed: goto merr;
merr;
never executed: goto merr;
0
505 }
executed 4 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
4
506-
507 if (!(flags & 0x40)
!(flags & 0x40)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
9-20
508 CMS_set_detached(cms, 0);
executed 20 times by 1 test: CMS_set_detached(cms, 0);
Executed by:
  • libcrypto.so.1.1
20
509-
510 if ((
(flags & (0x1000 | 0x4000))Description
TRUEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
flags & (0x1000 | 0x4000))
(flags & (0x1000 | 0x4000))Description
TRUEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-29
511 || CMS_final(cms, data,
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
512 ((void *)0)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
0
513 , flags)
CMS_final(cms,... *)0) , flags)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
514 return
executed 29 times by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
cms;
executed 29 times by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
29
515 else-
516 goto
never executed: goto err;
err;
never executed: goto err;
0
517-
518 merr:-
519 ERR_put_error(46,(148),((1|64)),__FILE__,471);-
520-
521 err:
code before this statement never executed: err:
0
522 CMS_ContentInfo_free(cms);-
523 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
524 ((void *)0)
never executed: return ((void *)0) ;
0
525 ;
never executed: return ((void *)0) ;
0
526}-
527-
528CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,-
529 X509 *signcert, EVP_PKEY *pkey,-
530 struct stack_st_X509 *certs, unsigned int flags)-
531{-
532 CMS_SignerInfo *rct_si;-
533 CMS_ContentInfo *cms = -
534 ((void *)0)-
535 ;-
536 ASN1_OCTET_STRING **pos, *os;-
537 BIO *rct_cont = -
538 ((void *)0)-
539 ;-
540 int r = 0;-
541-
542 flags &= ~(0x1000 | 0x1);-
543-
544 flags |= 0x4000 | 0x80 | 0x40;-
545 if (!pkey
!pkeyDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !signcert
!signcertDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1
546 ERR_put_error(46,(163),(174),__FILE__,492);-
547 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
548 ((void *)0)
never executed: return ((void *)0) ;
0
549 ;
never executed: return ((void *)0) ;
0
550 }-
551-
552-
553-
554 cms = CMS_sign(-
555 ((void *)0)-
556 , -
557 ((void *)0)-
558 , certs, -
559 ((void *)0)-
560 , flags);-
561 if (!cms
!cmsDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
562 goto
never executed: goto err;
err;
never executed: goto err;
0
563-
564-
565 if (!CMS_set1_eContentType(cms, OBJ_nid2obj(204))
!CMS_set1_eCon..._nid2obj(204))Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
566 goto
never executed: goto err;
err;
never executed: goto err;
0
567-
568 rct_si = CMS_add1_signer(cms, signcert, pkey, -
569 ((void *)0)-
570 , flags);-
571 if (!rct_si
!rct_siDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1
572 ERR_put_error(46,(163),(99),__FILE__,508);-
573 goto
never executed: goto err;
err;
never executed: goto err;
0
574 }-
575-
576 os = cms_encode_Receipt(si);-
577-
578 if (!os
!osDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
579 goto
never executed: goto err;
err;
never executed: goto err;
0
580-
581-
582 rct_cont = BIO_new_mem_buf(os->data, os->length);-
583 if (!rct_cont
!rct_contDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
584 goto
never executed: goto err;
err;
never executed: goto err;
0
585-
586-
587-
588 if (!cms_msgSigDigest_add1(rct_si, si)
!cms_msgSigDig...d1(rct_si, si)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
589 goto
never executed: goto err;
err;
never executed: goto err;
0
590-
591-
592 if (!CMS_final(cms, rct_cont,
!CMS_final(cms... *)0) , flags)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1
593 ((void *)0)
!CMS_final(cms... *)0) , flags)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1
594 , flags)
!CMS_final(cms... *)0) , flags)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
595 goto
never executed: goto err;
err;
never executed: goto err;
0
596-
597-
598 pos = CMS_get0_content(cms);-
599 *pos = os;-
600-
601 r = 1;-
602-
603 err:
code before this statement executed 1 time by 1 test: err:
Executed by:
  • libcrypto.so.1.1
1
604 BIO_free(rct_cont);-
605 if (r
rDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-1
606 return
executed 1 time by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
cms;
executed 1 time by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
1
607 CMS_ContentInfo_free(cms);-
608 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
609 ((void *)0)
never executed: return ((void *)0) ;
0
610 ;
never executed: return ((void *)0) ;
0
611-
612}-
613-
614CMS_ContentInfo *CMS_encrypt(struct stack_st_X509 *certs, BIO *data,-
615 const EVP_CIPHER *cipher, unsigned int flags)-
616{-
617 CMS_ContentInfo *cms;-
618 int i;-
619 X509 *recip;-
620 cms = CMS_EnvelopedData_create(cipher);-
621 if (!cms
!cmsDescription
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
622 goto
never executed: goto merr;
merr;
never executed: goto merr;
0
623 for (i = 0; i < sk_X509_num(certs)
i < sk_X509_num(certs)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
1-20
624 recip = sk_X509_value(certs, i);-
625 if (!CMS_add1_recipient_cert(cms, recip, flags)
!CMS_add1_reci... recip, flags)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1
626 ERR_put_error(46,(119),(137),__FILE__,558);-
627 goto
never executed: goto err;
err;
never executed: goto err;
0
628 }-
629 }
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
630-
631 if (!(flags & 0x40)
!(flags & 0x40)Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-20
632 CMS_set_detached(cms, 0);
executed 20 times by 1 test: CMS_set_detached(cms, 0);
Executed by:
  • libcrypto.so.1.1
20
633-
634 if ((
(flags & (0x1000 | 0x4000))Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
flags & (0x1000 | 0x4000))
(flags & (0x1000 | 0x4000))Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-19
635 || CMS_final(cms, data,
CMS_final(cms,... *)0) , flags)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1
636 ((void *)0)
CMS_final(cms,... *)0) , flags)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1
637 , flags)
CMS_final(cms,... *)0) , flags)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-1
638 return
executed 20 times by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
cms;
executed 20 times by 1 test: return cms;
Executed by:
  • libcrypto.so.1.1
20
639 else-
640 goto
never executed: goto err;
err;
never executed: goto err;
0
641-
642 merr:-
643 ERR_put_error(46,(119),((1|64)),__FILE__,573);-
644 err:
code before this statement never executed: err:
0
645 CMS_ContentInfo_free(cms);-
646 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
647 ((void *)0)
never executed: return ((void *)0) ;
0
648 ;
never executed: return ((void *)0) ;
0
649}-
650-
651static int cms_kari_set1_pkey(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,-
652 EVP_PKEY *pk, X509 *cert)-
653{-
654 int i;-
655 struct stack_st_CMS_RecipientEncryptedKey *reks;-
656 CMS_RecipientEncryptedKey *rek;-
657 reks = CMS_RecipientInfo_kari_get0_reks(ri);-
658 for (i = 0; i < sk_CMS_RecipientEncryptedKey_num(reks)
i < sk_CMS_Rec...dKey_num(reks)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
; i++) {
0-6
659 int rv;-
660 rek = sk_CMS_RecipientEncryptedKey_value(reks, i);-
661 if (cert !=
cert != ((void *)0)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-5
662 ((void *)0)
cert != ((void *)0)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-5
663 && CMS_RecipientEncryptedKey_cert_cmp(rek, cert)
CMS_RecipientE...cmp(rek, cert)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5
664 continue;
never executed: continue;
0
665 CMS_RecipientInfo_kari_set0_pkey(ri, pk);-
666 rv = CMS_RecipientInfo_kari_decrypt(cms, ri, rek);-
667 CMS_RecipientInfo_kari_set0_pkey(ri, -
668 ((void *)0)-
669 );-
670 if (rv > 0
rv > 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-6
671 return
executed 6 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 6 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
6
672 return
never executed: return cert == ((void *)0) ? 0 : -1;
cert ==
cert == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: return cert == ((void *)0) ? 0 : -1;
0
673 ((void *)0)
cert == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: return cert == ((void *)0) ? 0 : -1;
0
674 ? 0 : -1;
never executed: return cert == ((void *)0) ? 0 : -1;
0
675 }-
676 return
never executed: return 0;
0;
never executed: return 0;
0
677}-
678-
679int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert)-
680{-
681 struct stack_st_CMS_RecipientInfo *ris;-
682 CMS_RecipientInfo *ri;-
683 int i, r, ri_type;-
684 int debug = 0, match_ri = 0;-
685 ris = CMS_get0_RecipientInfos(cms);-
686 if (ris
risDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-18
687 debug = cms->d.envelopedData->encryptedContentInfo->debug;
executed 18 times by 1 test: debug = cms->d.envelopedData->encryptedContentInfo->debug;
Executed by:
  • libcrypto.so.1.1
18
688 ri_type = cms_pkey_get_ri_type(pk);-
689 if (ri_type == -1
ri_type == -1Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-18
690 ERR_put_error(46,(114),(125),__FILE__,613)-
691 ;-
692 return
never executed: return 0;
0;
never executed: return 0;
0
693 }-
694-
695 for (i = 0; i < sk_CMS_RecipientInfo_num(ris)
i < sk_CMS_Rec...tInfo_num(ris)Description
TRUEevaluated 27 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
2-27
696 ri = sk_CMS_RecipientInfo_value(ris, i);-
697 if (CMS_RecipientInfo_type(ri) != ri_type
CMS_RecipientI...ri) != ri_typeDescription
TRUEnever evaluated
FALSEevaluated 27 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-27
698 continue;
never executed: continue;
0
699 match_ri = 1;-
700 if (ri_type == 1
ri_type == 1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
6-21
701 r = cms_kari_set1_pkey(cms, ri, pk, cert);-
702 if (r > 0
r > 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-6
703 return
executed 6 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 6 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
6
704 if (r < 0
r < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
705 return
never executed: return 0;
0;
never executed: return 0;
0
706 }
never executed: end of block
0
707-
708-
709-
710-
711 else if (!cert
!certDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 15 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !CMS_RecipientInfo_ktri_cert_cmp(ri, cert)
!CMS_Recipient..._cmp(ri, cert)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-15
712 EVP_PKEY_up_ref(pk);-
713 CMS_RecipientInfo_set0_pkey(ri, pk);-
714 r = CMS_RecipientInfo_decrypt(cms, ri);-
715 CMS_RecipientInfo_set0_pkey(ri, -
716 ((void *)0)-
717 );-
718 if (cert
certDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
6-10
719-
720-
721-
722-
723 if (!debug
!debugDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-10
724 ERR_clear_error();-
725 return
executed 10 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 10 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
10
726 }-
727 if (r > 0
r > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
728 return
never executed: return 1;
1;
never executed: return 1;
0
729 ERR_put_error(46,(114),(112),__FILE__,649);-
730 return
never executed: return 0;
0;
never executed: return 0;
0
731 }-
732-
733-
734-
735-
736-
737 else if (r > 0
r > 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& debug
debugDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
738 return
never executed: return 1;
1;
never executed: return 1;
0
739 }
executed 6 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
6
740 }
executed 11 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
11
741-
742 if (cert ==
cert == ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-2
743 ((void *)0)
cert == ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-2
744 && ri_type == 0
ri_type == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& match_ri
match_riDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !debug
!debugDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-2
745 ERR_clear_error();-
746 return
executed 2 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 2 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
2
747 }-
748-
749 ERR_put_error(46,(114),(132),__FILE__,667);-
750 return
never executed: return 0;
0;
never executed: return 0;
0
751-
752}-
753-
754int CMS_decrypt_set1_key(CMS_ContentInfo *cms,-
755 unsigned char *key, size_t keylen,-
756 const unsigned char *id, size_t idlen)-
757{-
758 struct stack_st_CMS_RecipientInfo *ris;-
759 CMS_RecipientInfo *ri;-
760 int i, r;-
761 ris = CMS_get0_RecipientInfos(cms);-
762 for (i = 0; i < sk_CMS_RecipientInfo_num(ris)
i < sk_CMS_Rec...tInfo_num(ris)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
; i++) {
0-2
763 ri = sk_CMS_RecipientInfo_value(ris, i);-
764 if (CMS_RecipientInfo_type(ri) != 2
CMS_RecipientI..._type(ri) != 2Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2
765 continue;
never executed: continue;
0
766-
767-
768-
769-
770-
771 if (!id
!idDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (
(CMS_Recipient..., idlen) == 0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
CMS_RecipientInfo_kekri_id_cmp(ri, id, idlen) == 0)
(CMS_Recipient..., idlen) == 0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-1
772 CMS_RecipientInfo_set0_key(ri, key, keylen);-
773 r = CMS_RecipientInfo_decrypt(cms, ri);-
774 CMS_RecipientInfo_set0_key(ri, -
775 ((void *)0)-
776 , 0);-
777 if (r > 0
r > 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-2
778 return
executed 2 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 2 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
2
779 if (id
idDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
780 ERR_put_error(46,(113),(112),__FILE__,696);-
781 return
never executed: return 0;
0;
never executed: return 0;
0
782 }-
783 ERR_clear_error();-
784 }
never executed: end of block
0
785 }
never executed: end of block
0
786-
787 ERR_put_error(46,(113),(132),__FILE__,703);-
788 return
never executed: return 0;
0;
never executed: return 0;
0
789-
790}-
791-
792int CMS_decrypt_set1_password(CMS_ContentInfo *cms,-
793 unsigned char *pass, ssize_t passlen)-
794{-
795 struct stack_st_CMS_RecipientInfo *ris;-
796 CMS_RecipientInfo *ri;-
797 int i, r;-
798 ris = CMS_get0_RecipientInfos(cms);-
799 for (i = 0; i < sk_CMS_RecipientInfo_num(ris)
i < sk_CMS_Rec...tInfo_num(ris)Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
800 ri = sk_CMS_RecipientInfo_value(ris, i);-
801 if (CMS_RecipientInfo_type(ri) != 3
CMS_RecipientI..._type(ri) != 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
802 continue;
never executed: continue;
0
803 CMS_RecipientInfo_set0_password(ri, pass, passlen);-
804 r = CMS_RecipientInfo_decrypt(cms, ri);-
805 CMS_RecipientInfo_set0_password(ri, -
806 ((void *)0)-
807 , 0);-
808 if (r > 0
r > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
809 return
never executed: return 1;
1;
never executed: return 1;
0
810 }
never executed: end of block
0
811-
812 ERR_put_error(46,(166),(132),__FILE__,726);-
813 return
never executed: return 0;
0;
never executed: return 0;
0
814-
815}-
816-
817int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert,-
818 BIO *dcont, BIO *out, unsigned int flags)-
819{-
820 int r;-
821 BIO *cont;-
822 if (OBJ_obj2nid(CMS_get0_type(cms)) != 23
OBJ_obj2nid(CM...pe(cms)) != 23Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-20
823 ERR_put_error(46,(112),(146),__FILE__,737);-
824 return
never executed: return 0;
0;
never executed: return 0;
0
825 }-
826 if (!dcont
!dcontDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !check_content(cms)
!check_content(cms)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
827 return
never executed: return 0;
0;
never executed: return 0;
0
828 if (flags & 0x20000
flags & 0x20000Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
829 cms->d.envelopedData->encryptedContentInfo->debug = 1;
never executed: cms->d.envelopedData->encryptedContentInfo->debug = 1;
0
830 else-
831 cms->d.envelopedData->encryptedContentInfo->debug = 0;
executed 20 times by 1 test: cms->d.envelopedData->encryptedContentInfo->debug = 0;
Executed by:
  • libcrypto.so.1.1
20
832 if (!pk
!pkDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !cert
!certDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !dcont
!dcontDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !out
!outDescription
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-19
833 return
never executed: return 1;
1;
never executed: return 1;
0
834 if (pk
pkDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !CMS_decrypt_set1_pkey(cms, pk, cert)
!CMS_decrypt_s...cms, pk, cert)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-19
835 return
never executed: return 0;
0;
never executed: return 0;
0
836 cont = CMS_dataInit(cms, dcont);-
837 if (!cont
!contDescription
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
838 return
never executed: return 0;
0;
never executed: return 0;
0
839 r = cms_copy_content(out, cont, flags);-
840 do_free_upto(cont, dcont);-
841 return
executed 20 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
r;
executed 20 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
20
842}-
843-
844int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags)-
845{-
846 BIO *cmsbio;-
847 int ret = 0;-
848-
849 if ((
(cmsbio = CMS_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
cmsbio = CMS_dataInit(cms, dcont)) ==
(cmsbio = CMS_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-14
850 ((void *)0)
(cmsbio = CMS_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-14
851 ) {-
852 ERR_put_error(46,(127),(104),__FILE__,764);-
853 return
never executed: return 0;
0;
never executed: return 0;
0
854 }-
855-
856 SMIME_crlf_copy(data, cmsbio, flags);-
857-
858 (void)(int)BIO_ctrl(cmsbio,11,0,-
859 ((void *)0)-
860 );-
861-
862 if (!CMS_dataFinal(cms, cmsbio)
!CMS_dataFinal(cms, cmsbio)Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-14
863 ERR_put_error(46,(127),(103),__FILE__,773);-
864 goto
never executed: goto err;
err;
never executed: goto err;
0
865 }-
866-
867 ret = 1;-
868-
869 err:
code before this statement executed 14 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
14
870 do_free_upto(cmsbio, dcont);-
871-
872 return
executed 14 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 14 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
14
873-
874}-
875int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,-
876 unsigned int flags)-
877{-
878 ERR_put_error(46,(156),(151),__FILE__,833);-
879 return
never executed: return 0;
0;
never executed: return 0;
0
880}-
881-
882CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags)-
883{-
884 ERR_put_error(46,(104),(151),__FILE__,839);-
885 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
886 ((void *)0)
never executed: return ((void *)0) ;
0
887 ;
never executed: return ((void *)0) ;
0
888}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2