OpenCoverage

cms_io.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/cms/cms_io.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms)-
3{-
4 ASN1_OCTET_STRING **pos;-
5 pos = CMS_get0_content(cms);-
6 if (pos ==
pos == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36
7 ((void *)0)
pos == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36
8 )-
9 return
never executed: return 0;
0;
never executed: return 0;
0
10 if (*
*pos == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
pos ==
*pos == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36
11 ((void *)0)
*pos == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36
12 )-
13 *
never executed: *pos = ASN1_OCTET_STRING_new();
pos = ASN1_OCTET_STRING_new();
never executed: *pos = ASN1_OCTET_STRING_new();
0
14 if (*
*pos != ((void *)0)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
pos !=
*pos != ((void *)0)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-36
15 ((void *)0)
*pos != ((void *)0)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-36
16 ) {-
17 (*pos)->flags |= 0x010;-
18 (*pos)->flags &= ~0x020;-
19 *boundary = &(*pos)->data;-
20 return
executed 36 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 36 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
36
21 }-
22 ERR_put_error(46,(155),((1|64)),__FILE__,31);-
23 return
never executed: return 0;
0;
never executed: return 0;
0
24}-
25-
26CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms)-
27{-
28 return
executed 1409 times by 1 test: return ASN1_item_d2i_bio((&(CMS_ContentInfo_it)), bp, cms);
Executed by:
  • libcrypto.so.1.1
ASN1_item_d2i_bio((&(CMS_ContentInfo_it)), bp, cms);
executed 1409 times by 1 test: return ASN1_item_d2i_bio((&(CMS_ContentInfo_it)), bp, cms);
Executed by:
  • libcrypto.so.1.1
1409
29}-
30-
31int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms)-
32{-
33 return
executed 280 times by 1 test: return ASN1_item_i2d_bio((&(CMS_ContentInfo_it)), bp, cms);
Executed by:
  • libcrypto.so.1.1
ASN1_item_i2d_bio((&(CMS_ContentInfo_it)), bp, cms);
executed 280 times by 1 test: return ASN1_item_i2d_bio((&(CMS_ContentInfo_it)), bp, cms);
Executed by:
  • libcrypto.so.1.1
280
34}-
35-
36CMS_ContentInfo *PEM_read_bio_CMS(BIO *bp, CMS_ContentInfo **x, pem_password_cb *cb, void *u){ return
executed 11 times by 1 test: return PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",bp,(void **)x,cb,u);
Executed by:
  • libcrypto.so.1.1
PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",bp,(void **)x,cb,u);
executed 11 times by 1 test: return PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",bp,(void **)x,cb,u);
Executed by:
  • libcrypto.so.1.1
} CMS_ContentInfo *PEM_read_CMS(FILE *fp, CMS_ContentInfo **x, pem_password_cb *cb, void *u){ return
never executed: return PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",fp,(void **)x,cb,u);
PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",fp,(void **)x,cb,u);
never executed: return PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",fp,(void **)x,cb,u);
} int PEM_write_bio_CMS(BIO *bp, const CMS_ContentInfo *x) { return
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x,
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0-11
37((
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
38,
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
39((
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
40,
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0,
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
41((
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
42,
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
43((
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
44)
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
;
never executed: return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
} int PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x) { return
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x,
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
45((
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
46,
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
47((
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
48,
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0,
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
49((
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
50,
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
51((
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
void *)0)
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
0
52)
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
;
never executed: return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );
}
0
53-
54BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms)-
55{-
56 return
never executed: return BIO_new_NDEF(out, (ASN1_VALUE *)cms, (&(CMS_ContentInfo_it)));
BIO_new_NDEF(out, (ASN1_VALUE *)cms,
never executed: return BIO_new_NDEF(out, (ASN1_VALUE *)cms, (&(CMS_ContentInfo_it)));
0
57 (&(CMS_ContentInfo_it)));
never executed: return BIO_new_NDEF(out, (ASN1_VALUE *)cms, (&(CMS_ContentInfo_it)));
0
58}-
59-
60-
61-
62int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags)-
63{-
64 return
executed 19 times by 1 test: return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags,
executed 19 times by 1 test: return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
19
65 (&(CMS_ContentInfo_it)));
executed 19 times by 1 test: return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
19
66}-
67-
68int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,-
69 int flags)-
70{-
71 return
executed 11 times by 1 test: return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, "CMS", (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags,
executed 11 times by 1 test: return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, "CMS", (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
11
72 "CMS", (&(CMS_ContentInfo_it)));
executed 11 times by 1 test: return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, "CMS", (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
11
73}-
74-
75int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags)-
76{-
77 struct stack_st_X509_ALGOR *mdalgs;-
78 int ctype_nid = OBJ_obj2nid(cms->contentType);-
79 int econt_nid = OBJ_obj2nid(CMS_get0_eContentType(cms));-
80 if (ctype_nid == 22
ctype_nid == 22Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 17 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
8-17
81 mdalgs = cms->d.signedData->digestAlgorithms;
executed 8 times by 1 test: mdalgs = cms->d.signedData->digestAlgorithms;
Executed by:
  • libcrypto.so.1.1
8
82 else-
83 mdalgs =
executed 17 times by 1 test: mdalgs = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
17
84 ((void *)0)
executed 17 times by 1 test: mdalgs = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
17
85 ;
executed 17 times by 1 test: mdalgs = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
17
86-
87 return
executed 25 times by 1 test: return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, econt_nid, mdalgs, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags,
executed 25 times by 1 test: return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, econt_nid, mdalgs, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
25
88 ctype_nid, econt_nid, mdalgs,
executed 25 times by 1 test: return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, econt_nid, mdalgs, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
25
89 (&(CMS_ContentInfo_it)));
executed 25 times by 1 test: return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, econt_nid, mdalgs, (&(CMS_ContentInfo_it)));
Executed by:
  • libcrypto.so.1.1
25
90}-
91-
92CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont)-
93{-
94 return
executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );
Executed by:
  • libcrypto.so.1.1
(CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont,
executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );
Executed by:
  • libcrypto.so.1.1
27
95 (&(CMS_ContentInfo_it))
executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );
Executed by:
  • libcrypto.so.1.1
27
96 );
executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );
Executed by:
  • libcrypto.so.1.1
27
97}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2