| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/cms/cms_io.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms) | - | ||||||||||||
| 3 | { | - | ||||||||||||
| 4 | ASN1_OCTET_STRING **pos; | - | ||||||||||||
| 5 | pos = CMS_get0_content(cms); | - | ||||||||||||
| 6 | if (pos ==
| 0-36 | ||||||||||||
| 7 | ((void *)0)
| 0-36 | ||||||||||||
| 8 | ) | - | ||||||||||||
| 9 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 10 | if (*
| 0-36 | ||||||||||||
| 11 | ((void *)0)
| 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 (*
| 0-36 | ||||||||||||
| 15 | ((void *)0)
| 0-36 | ||||||||||||
| 16 | ) { | - | ||||||||||||
| 17 | (*pos)->flags |= 0x010; | - | ||||||||||||
| 18 | (*pos)->flags &= ~0x020; | - | ||||||||||||
| 19 | *boundary = &(*pos)->data; | - | ||||||||||||
| 20 | return executed 36 times by 1 test: 1;return 1;Executed by:
executed 36 times by 1 test: return 1;Executed by:
| 36 | ||||||||||||
| 21 | } | - | ||||||||||||
| 22 | ERR_put_error(46,(155),((1|64)),__FILE__,31); | - | ||||||||||||
| 23 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 24 | } | - | ||||||||||||
| 25 | - | |||||||||||||
| 26 | CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms) | - | ||||||||||||
| 27 | { | - | ||||||||||||
| 28 | return executed 1409 times by 1 test: ASN1_item_d2i_bio((&(CMS_ContentInfo_it)), bp, cms);return ASN1_item_d2i_bio((&(CMS_ContentInfo_it)), bp, cms);Executed by:
executed 1409 times by 1 test: return ASN1_item_d2i_bio((&(CMS_ContentInfo_it)), bp, cms);Executed by:
| 1409 | ||||||||||||
| 29 | } | - | ||||||||||||
| 30 | - | |||||||||||||
| 31 | int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) | - | ||||||||||||
| 32 | { | - | ||||||||||||
| 33 | return executed 280 times by 1 test: ASN1_item_i2d_bio((&(CMS_ContentInfo_it)), bp, cms);return ASN1_item_i2d_bio((&(CMS_ContentInfo_it)), bp, cms);Executed by:
executed 280 times by 1 test: return ASN1_item_i2d_bio((&(CMS_ContentInfo_it)), bp, cms);Executed by:
| 280 | ||||||||||||
| 34 | } | - | ||||||||||||
| 35 | - | |||||||||||||
| 36 | CMS_ContentInfo *PEM_read_bio_CMS(BIO *bp, CMS_ContentInfo **x, pem_password_cb *cb, void *u){ return executed 11 times by 1 test: PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",bp,(void **)x,cb,u);return PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",bp,(void **)x,cb,u);Executed by:
executed 11 times by 1 test: } CMS_ContentInfo *PEM_read_CMS(FILE *fp, CMS_ContentInfo **x, pem_password_cb *cb, void *u){ returnreturn PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",bp,(void **)x,cb,u);Executed by:
never executed: PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",fp,(void **)x,cb,u);return PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",fp,(void **)x,cb,u);never executed: } int PEM_write_bio_CMS(BIO *bp, const CMS_ContentInfo *x) { returnreturn PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, "CMS",fp,(void **)x,cb,u);never executed: PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",bp,(void *)x,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-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: void *)0)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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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: 0,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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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: } int PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x) { returnreturn 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: PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo,"CMS",fp,(void *)x,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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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: 0,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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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: void *)0)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 | ||||||||||||
| 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 | - | |||||||||||||
| 54 | BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) | - | ||||||||||||
| 55 | { | - | ||||||||||||
| 56 | return never executed: BIO_new_NDEF(out, (ASN1_VALUE *)cms,return BIO_new_NDEF(out, (ASN1_VALUE *)cms, (&(CMS_ContentInfo_it)));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 | - | |||||||||||||
| 62 | int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) | - | ||||||||||||
| 63 | { | - | ||||||||||||
| 64 | return executed 19 times by 1 test: i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags,return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, (&(CMS_ContentInfo_it)));Executed by:
executed 19 times by 1 test: return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)cms, in, flags, (&(CMS_ContentInfo_it)));Executed by:
| 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:
| 19 | ||||||||||||
| 66 | } | - | ||||||||||||
| 67 | - | |||||||||||||
| 68 | int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, | - | ||||||||||||
| 69 | int flags) | - | ||||||||||||
| 70 | { | - | ||||||||||||
| 71 | return executed 11 times by 1 test: PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags,return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, "CMS", (&(CMS_ContentInfo_it)));Executed by:
executed 11 times by 1 test: return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *)cms, in, flags, "CMS", (&(CMS_ContentInfo_it)));Executed by:
| 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:
| 11 | ||||||||||||
| 73 | } | - | ||||||||||||
| 74 | - | |||||||||||||
| 75 | int 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
| 8-17 | ||||||||||||
| 81 | mdalgs = cms->d.signedData->digestAlgorithms; executed 8 times by 1 test: mdalgs = cms->d.signedData->digestAlgorithms;Executed by:
| 8 | ||||||||||||
| 82 | else | - | ||||||||||||
| 83 | mdalgs = executed 17 times by 1 test: mdalgs = ((void *)0) ;Executed by:
| 17 | ||||||||||||
| 84 | ((void *)0) executed 17 times by 1 test: mdalgs = ((void *)0) ;Executed by:
| 17 | ||||||||||||
| 85 | ; executed 17 times by 1 test: mdalgs = ((void *)0) ;Executed by:
| 17 | ||||||||||||
| 86 | - | |||||||||||||
| 87 | return executed 25 times by 1 test: SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags,return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, econt_nid, mdalgs, (&(CMS_ContentInfo_it)));Executed by:
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:
| 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:
| 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:
| 25 | ||||||||||||
| 90 | } | - | ||||||||||||
| 91 | - | |||||||||||||
| 92 | CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont) | - | ||||||||||||
| 93 | { | - | ||||||||||||
| 94 | return executed 27 times by 1 test: (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont,return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );Executed by:
executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );Executed by:
| 27 | ||||||||||||
| 95 | (&(CMS_ContentInfo_it)) executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );Executed by:
| 27 | ||||||||||||
| 96 | ); executed 27 times by 1 test: return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, (&(CMS_ContentInfo_it)) );Executed by:
| 27 | ||||||||||||
| 97 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |