OpenCoverage

tasn_enc.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/asn1/tasn_enc.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static int asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out,-
4 const ASN1_ITEM *it, int tag, int aclass);-
5static int asn1_set_seq_out(struct stack_st_ASN1_VALUE *sk, unsigned char **out,-
6 int skcontlen, const ASN1_ITEM *item, int do_sort, int iclass);-
7static int asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,-
8 const ASN1_TEMPLATE *tt, int tag, int aclass);-
9static int asn1_item_flags_i2d(ASN1_VALUE *val, unsigned char **out,-
10 const ASN1_ITEM *it, int flags);-
11static int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,-
12 const ASN1_ITEM *it);-
13-
14-
15-
16-
17-
18int-
19ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it)-
20{-
21 return
never executed: return asn1_item_flags_i2d(val, out, it, (0x1<<11));
asn1_item_flags_i2d(val, out, it, (0x1<<11));
never executed: return asn1_item_flags_i2d(val, out, it, (0x1<<11));
0
22}-
23-
24int-
25ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it)-
26{-
27 return
executed 1585 times by 12 tests: return asn1_item_flags_i2d(val, out, it, 0);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
asn1_item_flags_i2d(val, out, it, 0);
executed 1585 times by 12 tests: return asn1_item_flags_i2d(val, out, it, 0);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
1585
28}-
29static int-
30asn1_item_flags_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it,-
31 int flags)-
32{-
33 if (out
outDescription
TRUEevaluated 1392 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
FALSEevaluated 193 times by 7 tests
Evaluated by:
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
&& !*out
!*outDescription
TRUEevaluated 1047 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 345 times by 8 tests
Evaluated by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
) {
193-1392
34 unsigned char *p, *buf;-
35 int len;-
36 len = ASN1_item_ex_i2d(&val, -
37 ((void *)0)-
38 , it, -1, flags);-
39 if (len <= 0
len <= 0Description
TRUEnever evaluated
FALSEevaluated 1047 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-1047
40 return
never executed: return len;
len;
never executed: return len;
0
41 buf = malloc(len);-
42 if (!buf
!bufDescription
TRUEnever evaluated
FALSEevaluated 1047 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-1047
43 return
never executed: return -1;
-1;
never executed: return -1;
0
44 p = buf;-
45 ASN1_item_ex_i2d(&val, &p, it, -1, flags);-
46 *out = buf;-
47 return
executed 1047 times by 11 tests: return len;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
len;
executed 1047 times by 11 tests: return len;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
1047
48 }-
49-
50 return
executed 538 times by 8 tests: return ASN1_item_ex_i2d(&val, out, it, -1, flags);
Executed by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
ASN1_item_ex_i2d(&val, out, it, -1, flags);
executed 538 times by 8 tests: return ASN1_item_ex_i2d(&val, out, it, -1, flags);
Executed by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
538
51}-
52-
53-
54-
55-
56-
57-
58int-
59ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it,-
60 int tag, int aclass)-
61{-
62 const ASN1_TEMPLATE *tt = -
63 ((void *)0)-
64 ;-
65 int i, seqcontlen, seqlen, ndef = 1;-
66 const ASN1_EXTERN_FUNCS *ef;-
67 const ASN1_AUX *aux = it->funcs;-
68 ASN1_aux_cb *asn1_cb = -
69 ((void *)0)-
70 ;-
71-
72 if ((
(it->itype != 0x0)Description
TRUEevaluated 18792 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 22209 times by 13 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
it->itype != 0x0)
(it->itype != 0x0)Description
TRUEevaluated 18792 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 22209 times by 13 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
&& !*pval
!*pvalDescription
TRUEnever evaluated
FALSEevaluated 18792 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-22209
73 return
never executed: return 0;
0;
never executed: return 0;
0
74-
75 if (aux
auxDescription
TRUEevaluated 6775 times by 9 tests
Evaluated by:
  • asn1test
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 34226 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
&& aux->asn1_cb
aux->asn1_cbDescription
TRUEevaluated 5545 times by 8 tests
Evaluated by:
  • asn1test
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
FALSEevaluated 1230 times by 7 tests
Evaluated by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
1230-34226
76 asn1_cb = aux->asn1_cb;
executed 5545 times by 8 tests: asn1_cb = aux->asn1_cb;
Executed by:
  • asn1test
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
5545
77-
78 switch (it->itype) {-
79-
80 case
executed 22209 times by 13 tests: case 0x0:
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
0x0:
executed 22209 times by 13 tests: case 0x0:
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
22209
81 if (it->templates
it->templatesDescription
TRUEevaluated 3877 times by 9 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
FALSEevaluated 18332 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
3877-18332
82 return
executed 3877 times by 9 tests: return asn1_template_ex_i2d(pval, out, it->templates, tag, aclass);
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
asn1_template_ex_i2d(pval, out, it->templates,
executed 3877 times by 9 tests: return asn1_template_ex_i2d(pval, out, it->templates, tag, aclass);
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
3877
83 tag, aclass);
executed 3877 times by 9 tests: return asn1_template_ex_i2d(pval, out, it->templates, tag, aclass);
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
3877
84 return
executed 18332 times by 12 tests: return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
executed 18332 times by 12 tests: return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
18332
85 break;
dead code: break;
-
86-
87 case
executed 7652 times by 8 tests: case 0x5:
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
0x5:
executed 7652 times by 8 tests: case 0x5:
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
7652
88 return
executed 7652 times by 8 tests: return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
executed 7652 times by 8 tests: return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
7652
89-
90 case
executed 212 times by 3 tests: case 0x2:
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
0x2:
executed 212 times by 3 tests: case 0x2:
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
212
91 if (asn1_cb
asn1_cbDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 208 times by 2 tests
Evaluated by:
  • pkcs7test
  • verifytest
&& !asn1_cb(6, pval, it,
!asn1_cb(6, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
0-208
92 ((void *)0)
!asn1_cb(6, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
0-4
93 )
!asn1_cb(6, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
0-4
94 return
never executed: return 0;
0;
never executed: return 0;
0
95 i = asn1_get_choice_selector(pval, it);-
96 if ((
(i >= 0)Description
TRUEevaluated 212 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
FALSEnever evaluated
i >= 0)
(i >= 0)Description
TRUEevaluated 212 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
FALSEnever evaluated
&& (
(i < it->tcount)Description
TRUEevaluated 212 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
FALSEnever evaluated
i < it->tcount)
(i < it->tcount)Description
TRUEevaluated 212 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
FALSEnever evaluated
) {
0-212
97 ASN1_VALUE **pchval;-
98 const ASN1_TEMPLATE *chtt;-
99 chtt = it->templates + i;-
100 pchval = asn1_get_field_ptr(pval, chtt);-
101 return
executed 212 times by 3 tests: return asn1_template_ex_i2d(pchval, out, chtt, -1, aclass);
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
asn1_template_ex_i2d(pchval, out, chtt,
executed 212 times by 3 tests: return asn1_template_ex_i2d(pchval, out, chtt, -1, aclass);
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
212
102 -1, aclass);
executed 212 times by 3 tests: return asn1_template_ex_i2d(pchval, out, chtt, -1, aclass);
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
212
103 }-
104-
105 if (asn1_cb
asn1_cbDescription
TRUEnever evaluated
FALSEnever evaluated
&& !asn1_cb(7, pval, it,
!asn1_cb(7, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
0
106 ((void *)0)
!asn1_cb(7, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
0
107 )
!asn1_cb(7, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEnever evaluated
)
0
108 return
never executed: return 0;
0;
never executed: return 0;
0
109 break;
never executed: break;
0
110-
111 case
executed 116 times by 3 tests: case 0x4:
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
0x4:
executed 116 times by 3 tests: case 0x4:
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
116
112-
113 ef = it->funcs;-
114 return
executed 116 times by 3 tests: return ef->asn1_ex_i2d(pval, out, it, tag, aclass);
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
ef->asn1_ex_i2d(pval, out, it, tag, aclass);
executed 116 times by 3 tests: return ef->asn1_ex_i2d(pval, out, it, tag, aclass);
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
116
115-
116 case
executed 33 times by 1 test: case 0x6:
Executed by:
  • pkcs7test
0x6:
executed 33 times by 1 test: case 0x6:
Executed by:
  • pkcs7test
33
117-
118 if (aclass & (0x1<<11)
aclass & (0x1<<11)Description
TRUEnever evaluated
FALSEevaluated 33 times by 1 test
Evaluated by:
  • pkcs7test
)
0-33
119 ndef = 2;
never executed: ndef = 2;
0
120-
121-
122 case
executed 10779 times by 11 tests: case 0x1:
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
0x1:
executed 10779 times by 11 tests: case 0x1:
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
code before this statement executed 33 times by 1 test: case 0x1:
Executed by:
  • pkcs7test
33-10779
123 i = asn1_enc_restore(&seqcontlen, out, pval, it);-
124-
125 if (i < 0
i < 0Description
TRUEnever evaluated
FALSEevaluated 10812 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-10812
126 return
never executed: return 0;
0;
never executed: return 0;
0
127-
128 if (i > 0
i > 0Description
TRUEevaluated 1104 times by 6 tests
Evaluated by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
FALSEevaluated 9708 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
1104-9708
129 return
executed 1104 times by 6 tests: return seqcontlen;
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
seqcontlen;
executed 1104 times by 6 tests: return seqcontlen;
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
1104
130-
131 seqcontlen = 0;-
132-
133 if (tag == -1
tag == -1Description
TRUEevaluated 9708 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEnever evaluated
) {
0-9708
134 tag = 16;-
135-
136 aclass = (aclass & ~(0x3<<6)) |-
137 0x00;-
138 }
executed 9708 times by 11 tests: end of block
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
9708
139 if (asn1_cb
asn1_cbDescription
TRUEevaluated 996 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
FALSEevaluated 8712 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
&& !asn1_cb(6, pval, it,
!asn1_cb(6, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 996 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
0-8712
140 ((void *)0)
!asn1_cb(6, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 996 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
0-996
141 )
!asn1_cb(6, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 996 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
)
0-996
142 return
never executed: return 0;
0;
never executed: return 0;
0
143-
144 for (i = 0, tt = it->templates; i < it->tcount
i < it->tcountDescription
TRUEevaluated 20563 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 9708 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
; tt++, i++) {
9708-20563
145 const ASN1_TEMPLATE *seqtt;-
146 ASN1_VALUE **pseqval;-
147 seqtt = asn1_do_adb(pval, tt, 1);-
148 if (!seqtt
!seqttDescription
TRUEnever evaluated
FALSEevaluated 20563 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-20563
149 return
never executed: return 0;
0;
never executed: return 0;
0
150 pseqval = asn1_get_field_ptr(pval, seqtt);-
151-
152 seqcontlen += asn1_template_ex_i2d(pseqval, -
153 ((void *)0)-
154 , seqtt,-
155 -1, aclass);-
156 }
executed 20563 times by 11 tests: end of block
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
20563
157-
158 seqlen = ASN1_object_size(ndef, seqcontlen, tag);-
159 if (!out
!outDescription
TRUEevaluated 6032 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 3676 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
3676-6032
160 return
executed 6032 times by 11 tests: return seqlen;
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
seqlen;
executed 6032 times by 11 tests: return seqlen;
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
6032
161-
162 ASN1_put_object(out, ndef, seqcontlen, tag, aclass);-
163 for (i = 0, tt = it->templates; i < it->tcount
i < it->tcountDescription
TRUEevaluated 7877 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 3676 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
; tt++, i++) {
3676-7877
164 const ASN1_TEMPLATE *seqtt;-
165 ASN1_VALUE **pseqval;-
166 seqtt = asn1_do_adb(pval, tt, 1);-
167 if (!seqtt
!seqttDescription
TRUEnever evaluated
FALSEevaluated 7877 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-7877
168 return
never executed: return 0;
0;
never executed: return 0;
0
169 pseqval = asn1_get_field_ptr(pval, seqtt);-
170-
171 asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);-
172 }
executed 7877 times by 11 tests: end of block
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
7877
173 if (ndef == 2
ndef == 2Description
TRUEnever evaluated
FALSEevaluated 3676 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-3676
174 ASN1_put_eoc(out);
never executed: ASN1_put_eoc(out);
0
175 if (asn1_cb
asn1_cbDescription
TRUEevaluated 481 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
FALSEevaluated 3195 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
&& !asn1_cb(7, pval, it,
!asn1_cb(7, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 481 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
0-3195
176 ((void *)0)
!asn1_cb(7, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 481 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
0-481
177 )
!asn1_cb(7, pv... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 481 times by 7 tests
Evaluated by:
  • asn1test
  • dsatest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
)
0-481
178 return
never executed: return 0;
0;
never executed: return 0;
0
179 return
executed 3676 times by 11 tests: return seqlen;
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
seqlen;
executed 3676 times by 11 tests: return seqlen;
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
3676
180-
181 default
never executed: default:
:
never executed: default:
0
182 return
never executed: return 0;
0;
never executed: return 0;
0
183-
184 }-
185 return
never executed: return 0;
0;
never executed: return 0;
0
186}-
187-
188int-
189ASN1_template_i2d(ASN1_VALUE **pval, unsigned char **out,-
190 const ASN1_TEMPLATE *tt)-
191{-
192 return
never executed: return asn1_template_ex_i2d(pval, out, tt, -1, 0);
asn1_template_ex_i2d(pval, out, tt, -1, 0);
never executed: return asn1_template_ex_i2d(pval, out, tt, -1, 0);
0
193}-
194-
195static int-
196asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,-
197 const ASN1_TEMPLATE *tt, int tag, int iclass)-
198{-
199 int i, ret, flags, ttag, tclass, ndef;-
200 flags = tt->flags;-
201-
202-
203-
204-
205-
206-
207 if (flags & (0x3 << 3)
flags & (0x3 << 3)Description
TRUEevaluated 210 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
FALSEevaluated 32319 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
) {
210-32319
208-
209 if (tag != -1
tag != -1Description
TRUEnever evaluated
FALSEevaluated 210 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
)
0-210
210-
211 return
never executed: return -1;
-1;
never executed: return -1;
0
212-
213 ttag = tt->tag;-
214 tclass = flags & (0x3<<6);-
215 }
executed 210 times by 3 tests: end of block
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
else if (tag != -1
tag != -1Description
TRUEnever evaluated
FALSEevaluated 32319 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
) {
0-32319
216-
217 ttag = tag;-
218 tclass = iclass & (0x3<<6);-
219 }
never executed: end of block
else {
0
220 ttag = -1;-
221 tclass = 0;-
222 }
executed 32319 times by 12 tests: end of block
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
32319
223-
224-
225-
226 iclass &= ~(0x3<<6);-
227-
228-
229-
230-
231-
232-
233-
234 if ((
(flags & (0x1<<11))Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 32508 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
flags & (0x1<<11))
(flags & (0x1<<11))Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 32508 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
&& (
(iclass & (0x1<<11))Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • pkcs7test
iclass & (0x1<<11))
(iclass & (0x1<<11))Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • pkcs7test
)
0-32508
235 ndef = 2;
never executed: ndef = 2;
0
236 else-
237 ndef = 1;
executed 32529 times by 12 tests: ndef = 1;
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
32529
238-
239 if (flags & (0x3 << 1)
flags & (0x3 << 1)Description
TRUEevaluated 4103 times by 9 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlsexttest
  • tlstest
  • verifytest
FALSEevaluated 28426 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
4103-28426
240-
241 struct stack_st_ASN1_VALUE *sk = (struct stack_st_ASN1_VALUE *)*pval;-
242 int isset, sktag, skaclass;-
243 int skcontlen, sklen;-
244 ASN1_VALUE *skitem;-
245-
246 if (!*pval
!*pvalDescription
TRUEevaluated 51 times by 4 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • tlsexttest
  • tlstest
FALSEevaluated 4052 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
51-4052
247 return
executed 51 times by 4 tests: return 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • tlsexttest
  • tlstest
0;
executed 51 times by 4 tests: return 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • tlsexttest
  • tlstest
51
248-
249 if (flags & (0x1 << 1)
flags & (0x1 << 1)Description
TRUEevaluated 3940 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 112 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
) {
112-3940
250 isset = 1;-
251-
252 if (flags & (0x2 << 1)
flags & (0x2 << 1)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 3936 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
4-3936
253 isset = 2;
executed 4 times by 1 test: isset = 2;
Executed by:
  • pkcs7test
4
254 }
executed 3940 times by 8 tests: end of block
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
else
3940
255 isset = 0;
executed 112 times by 3 tests: isset = 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
112
256-
257-
258-
259-
260 if ((
(ttag != -1)Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 4024 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
ttag != -1)
(ttag != -1)Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 4024 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
&& !(flags & (0x2 << 3))
!(flags & (0x2 << 3))Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • pkcs7test
FALSEnever evaluated
) {
0-4024
261 sktag = ttag;-
262 skaclass = tclass;-
263 }
executed 28 times by 1 test: end of block
Executed by:
  • pkcs7test
else {
28
264 skaclass = 0x00;-
265 if (isset
issetDescription
TRUEevaluated 3940 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 84 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
)
84-3940
266 sktag = 17;
executed 3940 times by 8 tests: sktag = 17;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
3940
267 else-
268 sktag = 16;
executed 84 times by 3 tests: sktag = 16;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
84
269 }-
270-
271-
272 skcontlen = 0;-
273 for (i = 0; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)))
i < sk_num(((_...N1_VALUE*)0)))Description
TRUEevaluated 4201 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 4052 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
; i++) {
4052-4201
274 skitem = ((ASN1_VALUE *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)), (i)));-
275 skcontlen += ASN1_item_ex_i2d(&skitem, -
276 ((void *)0)-
277 ,-
278 tt->item, -1, iclass);-
279 }
executed 4201 times by 8 tests: end of block
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
4201
280 sklen = ASN1_object_size(ndef, skcontlen, sktag);-
281-
282 if (flags & (0x2 << 3)
flags & (0x2 << 3)Description
TRUEnever evaluated
FALSEevaluated 4052 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-4052
283 ret = ASN1_object_size(ndef, sklen, ttag);
never executed: ret = ASN1_object_size(ndef, sklen, ttag);
0
284 else-
285 ret = sklen;
executed 4052 times by 8 tests: ret = sklen;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
4052
286-
287 if (!out
!outDescription
TRUEevaluated 2102 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 1950 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
1950-2102
288 return
executed 2102 times by 8 tests: return ret;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
ret;
executed 2102 times by 8 tests: return ret;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
2102
289-
290-
291-
292 if (flags & (0x2 << 3)
flags & (0x2 << 3)Description
TRUEnever evaluated
FALSEevaluated 1950 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-1950
293 ASN1_put_object(out, ndef, sklen, ttag, tclass);
never executed: ASN1_put_object(out, ndef, sklen, ttag, tclass);
0
294-
295 ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);-
296-
297 asn1_set_seq_out(sk, out, skcontlen, tt->item,-
298 isset, iclass);-
299 if (ndef == 2
ndef == 2Description
TRUEnever evaluated
FALSEevaluated 1950 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
0-1950
300 ASN1_put_eoc(out);-
301 if (flags & (0x2 << 3)
flags & (0x2 << 3)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
302 ASN1_put_eoc(out);
never executed: ASN1_put_eoc(out);
0
303 }
never executed: end of block
0
304-
305 return
executed 1950 times by 8 tests: return ret;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
ret;
executed 1950 times by 8 tests: return ret;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
1950
306 }-
307-
308 if (flags & (0x2 << 3)
flags & (0x2 << 3)Description
TRUEevaluated 35 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
FALSEevaluated 28391 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
35-28391
309-
310-
311 i = ASN1_item_ex_i2d(pval, -
312 ((void *)0)-
313 , tt->item,-
314 -1, iclass);-
315 if (!i
!iDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
FALSEevaluated 15 times by 1 test
Evaluated by:
  • pkcs7test
)
15-20
316 return
executed 20 times by 2 tests: return 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
0;
executed 20 times by 2 tests: return 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
20
317-
318 ret = ASN1_object_size(ndef, i, ttag);-
319 if (out
outDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 11 times by 1 test
Evaluated by:
  • pkcs7test
) {
4-11
320-
321 ASN1_put_object(out, ndef, i, ttag, tclass);-
322 ASN1_item_ex_i2d(pval, out, tt->item,-
323 -1, iclass);-
324 if (ndef == 2
ndef == 2Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • pkcs7test
)
0-4
325 ASN1_put_eoc(out);
never executed: ASN1_put_eoc(out);
0
326 }
executed 4 times by 1 test: end of block
Executed by:
  • pkcs7test
4
327 return
executed 15 times by 1 test: return ret;
Executed by:
  • pkcs7test
ret;
executed 15 times by 1 test: return ret;
Executed by:
  • pkcs7test
15
328 }-
329-
330-
331 return
executed 28391 times by 11 tests: return ASN1_item_ex_i2d(pval, out, tt->item, ttag, tclass | iclass);
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
ASN1_item_ex_i2d(pval, out, tt->item,
executed 28391 times by 11 tests: return ASN1_item_ex_i2d(pval, out, tt->item, ttag, tclass | iclass);
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
28391
332 ttag, tclass | iclass);
executed 28391 times by 11 tests: return ASN1_item_ex_i2d(pval, out, tt->item, ttag, tclass | iclass);
Executed by:
  • asn1evp
  • asn1test
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
28391
333}-
334-
335-
336-
337typedef struct {-
338 unsigned char *data;-
339 int length;-
340 ASN1_VALUE *field;-
341} DER_ENC;-
342-
343static int-
344der_cmp(const void *a, const void *b)-
345{-
346 const DER_ENC *d1 = a, *d2 = b;-
347 int cmplen, i;-
348-
349 cmplen = (
(d1->length < d2->length)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 4 times by 1 test
Evaluated by:
  • pkcs7test
d1->length < d2->length)
(d1->length < d2->length)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 4 times by 1 test
Evaluated by:
  • pkcs7test
? d1->length : d2->length;
4-6
350 i = memcmp(d1->data, d2->data, cmplen);-
351 if (i
iDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • pkcs7test
FALSEnever evaluated
)
0-10
352 return
executed 10 times by 1 test: return i;
Executed by:
  • pkcs7test
i;
executed 10 times by 1 test: return i;
Executed by:
  • pkcs7test
10
353 return
never executed: return d1->length - d2->length;
d1->length - d2->length;
never executed: return d1->length - d2->length;
0
354}-
355-
356-
357-
358static int-
359asn1_set_seq_out(struct stack_st_ASN1_VALUE *sk, unsigned char **out, int skcontlen,-
360 const ASN1_ITEM *item, int do_sort, int iclass)-
361{-
362 int i;-
363 ASN1_VALUE *skitem;-
364 unsigned char *tmpdat = -
365 ((void *)0)-
366 , *p = -
367 ((void *)0)-
368 ;-
369 DER_ENC *derlst = -
370 ((void *)0)-
371 , *tder;-
372-
373 if (do_sort
do_sortDescription
TRUEevaluated 1902 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • verifytest
) {
48-1902
374-
375 if (sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0))) < 2
sk_num(((_STAC...ALUE*)0))) < 2Description
TRUEevaluated 1900 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
)
2-1900
376 do_sort = 0;
executed 1900 times by 8 tests: do_sort = 0;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
1900
377 else {-
378 derlst = reallocarray(-
379 ((void *)0)-
380 , sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0))),-
381 sizeof(*derlst));-
382 tmpdat = malloc(skcontlen);-
383 if (!derlst
!derlstDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
|| !tmpdat
!tmpdatDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
) {
0-2
384 free(derlst);-
385 free(tmpdat);-
386 return
never executed: return 0;
0;
never executed: return 0;
0
387 }-
388 }
executed 2 times by 1 test: end of block
Executed by:
  • pkcs7test
2
389 }-
390-
391 if (!do_sort
!do_sortDescription
TRUEevaluated 1948 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
) {
2-1948
392 for (i = 0; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)))
i < sk_num(((_...N1_VALUE*)0)))Description
TRUEevaluated 2000 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 1948 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
; i++) {
1948-2000
393 skitem = ((ASN1_VALUE *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)), (i)));-
394 ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);-
395 }
executed 2000 times by 8 tests: end of block
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
2000
396 return
executed 1948 times by 8 tests: return 1;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
1;
executed 1948 times by 8 tests: return 1;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
1948
397 }-
398 p = tmpdat;-
399-
400-
401 for (i = 0, tder = derlst; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)))
i < sk_num(((_...N1_VALUE*)0)))Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
; i++, tder++) {
2-8
402 skitem = ((ASN1_VALUE *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)), (i)));-
403 tder->data = p;-
404 tder->length = ASN1_item_ex_i2d(&skitem, &p, item, -1, iclass);-
405 tder->field = skitem;-
406 }
executed 8 times by 1 test: end of block
Executed by:
  • pkcs7test
8
407-
408-
409 qsort(derlst, sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0))), sizeof(*derlst), der_cmp);-
410-
411 p = *out;-
412 for (i = 0, tder = derlst; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)))
i < sk_num(((_...N1_VALUE*)0)))Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
; i++, tder++) {
2-8
413 memcpy(p, tder->data, tder->length);-
414 p += tder->length;-
415 }
executed 8 times by 1 test: end of block
Executed by:
  • pkcs7test
8
416 *out = p;-
417-
418 if (do_sort == 2
do_sort == 2Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
FALSEnever evaluated
) {
0-2
419 for (i = 0, tder = derlst; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)))
i < sk_num(((_...N1_VALUE*)0)))Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • pkcs7test
; i++, tder++)
2-8
420 (
executed 8 times by 1 test: (void)sk_set(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)), (i), ((void*) (1 ? (tder->field) : (ASN1_VALUE*)0)));
Executed by:
  • pkcs7test
void)sk_set(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)), (i), ((void*) (1 ? (tder->field) : (ASN1_VALUE*)0)));
executed 8 times by 1 test: (void)sk_set(((_STACK*) (1 ? (sk) : (struct stack_st_ASN1_VALUE*)0)), (i), ((void*) (1 ? (tder->field) : (ASN1_VALUE*)0)));
Executed by:
  • pkcs7test
8
421 }
executed 2 times by 1 test: end of block
Executed by:
  • pkcs7test
2
422 free(derlst);-
423 free(tmpdat);-
424 return
executed 2 times by 1 test: return 1;
Executed by:
  • pkcs7test
1;
executed 2 times by 1 test: return 1;
Executed by:
  • pkcs7test
2
425}-
426-
427static int-
428asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out,-
429 const ASN1_ITEM *it, int tag, int aclass)-
430{-
431 int len;-
432 int utype;-
433 int usetag;-
434 int ndef = 0;-
435-
436 utype = it->utype;-
437-
438-
439-
440-
441-
442 len = asn1_ex_i2c(pval, -
443 ((void *)0)-
444 , &utype, it);-
445-
446-
447-
448-
449-
450-
451-
452 if ((
(utype == 16)Description
TRUEevaluated 55 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
FALSEevaluated 25929 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
utype == 16)
(utype == 16)Description
TRUEevaluated 55 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
FALSEevaluated 25929 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
|| (
(utype == 17)Description
TRUEnever evaluated
FALSEevaluated 25929 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
utype == 17)
(utype == 17)Description
TRUEnever evaluated
FALSEevaluated 25929 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
||
0-25929
453 (
(utype == -3)Description
TRUEnever evaluated
FALSEevaluated 25929 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
utype == -3)
(utype == -3)Description
TRUEnever evaluated
FALSEevaluated 25929 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-25929
454 usetag = 0;
executed 55 times by 2 tests: usetag = 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
55
455 else-
456 usetag = 1;
executed 25929 times by 12 tests: usetag = 1;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
25929
457-
458-
459 if (len == -1
len == -1Description
TRUEevaluated 515 times by 3 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • ssltest
FALSEevaluated 25469 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
515-25469
460 return
executed 515 times by 3 tests: return 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • ssltest
0;
executed 515 times by 3 tests: return 0;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
  • ssltest
515
461-
462-
463 if (len == -2
len == -2Description
TRUEnever evaluated
FALSEevaluated 25469 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
0-25469
464 ndef = 2;-
465 len = 0;-
466 }
never executed: end of block
0
467-
468-
469 if (tag == -1
tag == -1Description
TRUEevaluated 25391 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 78 times by 2 tests
Evaluated by:
  • pkcs7test
  • verifytest
)
78-25391
470 tag = utype;
executed 25391 times by 12 tests: tag = utype;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
25391
471-
472-
473 if (out
outDescription
TRUEevaluated 6910 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 18559 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
6910-18559
474 if (usetag
usetagDescription
TRUEevaluated 6901 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
)
9-6901
475 ASN1_put_object(out, ndef, len, tag, aclass);
executed 6901 times by 12 tests: ASN1_put_object(out, ndef, len, tag, aclass);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
6901
476 asn1_ex_i2c(pval, *out, &utype, it);-
477 if (ndef
ndefDescription
TRUEnever evaluated
FALSEevaluated 6910 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
0-6910
478 ASN1_put_eoc(out);
never executed: ASN1_put_eoc(out);
0
479 else-
480 *
executed 6910 times by 12 tests: *out += len;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
out += len;
executed 6910 times by 12 tests: *out += len;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
6910
481 }-
482-
483 if (usetag
usetagDescription
TRUEevaluated 25414 times by 12 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 55 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
)
55-25414
484 return
executed 25414 times by 12 tests: return ASN1_object_size(ndef, len, tag);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
ASN1_object_size(ndef, len, tag);
executed 25414 times by 12 tests: return ASN1_object_size(ndef, len, tag);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • dsatest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
25414
485 return
executed 55 times by 2 tests: return len;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
len;
executed 55 times by 2 tests: return len;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
55
486}-
487-
488-
489-
490static int-
491asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,-
492 const ASN1_ITEM *it)-
493{-
494 ASN1_BOOLEAN *tbool = -
495 ((void *)0)-
496 ;-
497 ASN1_STRING *strtmp;-
498 ASN1_OBJECT *otmp;-
499 int utype;-
500 const unsigned char *cont;-
501 unsigned char c;-
502 int len;-
503 const ASN1_PRIMITIVE_FUNCS *pf;-
504-
505 pf = it->funcs;-
506 if (pf
pfDescription
TRUEevaluated 6088 times by 4 tests
Evaluated by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • ssltest
FALSEevaluated 26806 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
&& pf->prim_i2c
pf->prim_i2cDescription
TRUEevaluated 6088 times by 4 tests
Evaluated by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • ssltest
FALSEnever evaluated
)
0-26806
507 return
executed 6088 times by 4 tests: return pf->prim_i2c(pval, cout, putype, it);
Executed by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • ssltest
pf->prim_i2c(pval, cout, putype, it);
executed 6088 times by 4 tests: return pf->prim_i2c(pval, cout, putype, it);
Executed by:
  • dsatest
  • ecdsatest
  • libcrypto.so.44.0.1
  • ssltest
6088
508-
509-
510 if ((
(it->itype != 0x0)Description
TRUEevaluated 9564 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 17242 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
it->itype != 0x0)
(it->itype != 0x0)Description
TRUEevaluated 9564 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 17242 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
||
9564-17242
511 (
(it->utype != 1)Description
TRUEevaluated 17242 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEnever evaluated
it->utype != 1)
(it->utype != 1)Description
TRUEevaluated 17242 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEnever evaluated
) {
0-17242
512 if (!*pval
!*pvalDescription
TRUEevaluated 137 times by 2 tests
Evaluated by:
  • libcrypto.so.44.0.1
  • pkcs7test
FALSEevaluated 26669 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
)
137-26669
513 return
executed 137 times by 2 tests: return -1;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
-1;
executed 137 times by 2 tests: return -1;
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
137
514 }
executed 26669 times by 11 tests: end of block
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
26669
515-
516 if (it->itype == 0x5
it->itype == 0x5Description
TRUEevaluated 9564 times by 8 tests
Evaluated by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 17105 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
9564-17105
517-
518 strtmp = (ASN1_STRING *)*pval;-
519 utype = strtmp->type;-
520 *putype = utype;-
521 }
executed 9564 times by 8 tests: end of block
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
else if (it->utype == -4
it->utype == -4Description
TRUEevaluated 2627 times by 6 tests
Evaluated by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
FALSEevaluated 14478 times by 11 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
) {
2627-14478
522-
523 ASN1_TYPE *typ;-
524 typ = (ASN1_TYPE *)*pval;-
525 utype = typ->type;-
526 *putype = utype;-
527 pval = &typ->value.asn1_value;-
528 }
executed 2627 times by 6 tests: end of block
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
else
2627
529 utype = *putype;
executed 14478 times by 11 tests: utype = *putype;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
14478
530-
531 switch (utype) {-
532 case
executed 12313 times by 8 tests: case 6:
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
6:
executed 12313 times by 8 tests: case 6:
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
12313
533 otmp = (ASN1_OBJECT *)*pval;-
534 cont = otmp->data;-
535 len = otmp->length;-
536 break;
executed 12313 times by 8 tests: break;
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
12313
537-
538 case
executed 2387 times by 6 tests: case 5:
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
5:
executed 2387 times by 6 tests: case 5:
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
2387
539 cont = -
540 ((void *)0)-
541 ;-
542 len = 0;-
543 break;
executed 2387 times by 6 tests: break;
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
2387
544-
545 case
never executed: case 1:
1:
never executed: case 1:
0
546 tbool = (ASN1_BOOLEAN *)pval;-
547 if (*
*tbool == -1Description
TRUEnever evaluated
FALSEnever evaluated
tbool == -1
*tbool == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
548 return
never executed: return -1;
-1;
never executed: return -1;
0
549 if (it->utype != -4
it->utype != -4Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
550-
551 if (*
*tboolDescription
TRUEnever evaluated
FALSEnever evaluated
tbool
*tboolDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(it->size > 0)Description
TRUEnever evaluated
FALSEnever evaluated
it->size > 0)
(it->size > 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
552 return
never executed: return -1;
-1;
never executed: return -1;
0
553 if (!*tbool
!*tboolDescription
TRUEnever evaluated
FALSEnever evaluated
&& !it->size
!it->sizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
554 return
never executed: return -1;
-1;
never executed: return -1;
0
555 }
never executed: end of block
0
556 c = (unsigned char)*tbool;-
557 cont = &c;-
558 len = 1;-
559 break;
never executed: break;
0
560-
561 case
executed 1306 times by 6 tests: case 3:
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
3:
executed 1306 times by 6 tests: case 3:
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
1306
562 return
executed 1306 times by 6 tests: return i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval,
executed 1306 times by 6 tests: return i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
1306
563 cout ? &cout :
executed 1306 times by 6 tests: return i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
1306
564 ((void *)0)
executed 1306 times by 6 tests: return i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
1306
565 );
executed 1306 times by 6 tests: return i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
1306
566 break;
dead code: break;
-
567-
568 case
executed 206 times by 4 tests: case 2:
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
2:
executed 206 times by 4 tests: case 2:
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
206
569 case
never executed: case 10:
10:
never executed: case 10:
0
570-
571-
572-
573 return
executed 206 times by 4 tests: return i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval,
executed 206 times by 4 tests: return i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
206
574 cout ? &cout :
executed 206 times by 4 tests: return i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
206
575 ((void *)0)
executed 206 times by 4 tests: return i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
206
576 );
executed 206 times by 4 tests: return i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : ((void *)0) );
Executed by:
  • asn1evp
  • ecdsatest
  • libcrypto.so.44.0.1
  • pkcs7test
206
577 break;
dead code: break;
-
578-
579 case
executed 677 times by 7 tests: case 4:
Executed by:
  • asn1evp
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
4:
executed 677 times by 7 tests: case 4:
Executed by:
  • asn1evp
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
677
580 case
never executed: case 18:
18:
never executed: case 18:
0
581 case
executed 20 times by 1 test: case 19:
Executed by:
  • libcrypto.so.44.0.1
19:
executed 20 times by 1 test: case 19:
Executed by:
  • libcrypto.so.44.0.1
20
582 case
never executed: case 20:
20:
never executed: case 20:
0
583 case
never executed: case 21:
21:
never executed: case 21:
0
584 case
executed 88 times by 1 test: case 22:
Executed by:
  • verifytest
22:
executed 88 times by 1 test: case 22:
Executed by:
  • verifytest
88
585 case
executed 102 times by 3 tests: case 23:
Executed by:
  • asn1time
  • libcrypto.so.44.0.1
  • pkcs7test
23:
executed 102 times by 3 tests: case 23:
Executed by:
  • asn1time
  • libcrypto.so.44.0.1
  • pkcs7test
102
586 case
executed 6 times by 1 test: case 24:
Executed by:
  • asn1time
24:
executed 6 times by 1 test: case 24:
Executed by:
  • asn1time
6
587 case
never executed: case 25:
25:
never executed: case 25:
0
588 case
never executed: case 26:
26:
never executed: case 26:
0
589 case
never executed: case 27:
27:
never executed: case 27:
0
590 case
never executed: case 28:
28:
never executed: case 28:
0
591 case
never executed: case 30:
30:
never executed: case 30:
0
592 case
executed 9500 times by 8 tests: case 12:
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
12:
executed 9500 times by 8 tests: case 12:
Executed by:
  • asn1test
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
9500
593 case
executed 64 times by 2 tests: case 16:
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
16:
executed 64 times by 2 tests: case 16:
Executed by:
  • libcrypto.so.44.0.1
  • pkcs7test
64
594 case
never executed: case 17:
17:
never executed: case 17:
0
595 default
never executed: default:
:
never executed: default:
0
596-
597 strtmp = (ASN1_STRING *)*pval;-
598-
599 if ((
(it->size == (0x1<<11))Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 10442 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
it->size == (0x1<<11))
(it->size == (0x1<<11))Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • pkcs7test
FALSEevaluated 10442 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
&&
15-10442
600 (
(strtmp->flags & 0x010)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • pkcs7test
strtmp->flags & 0x010)
(strtmp->flags & 0x010)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • pkcs7test
) {
0-15
601 if (cout
coutDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
602 strtmp->data = cout;-
603 strtmp->length = 0;-
604 }
never executed: end of block
0
605-
606 return
never executed: return -2;
-2;
never executed: return -2;
0
607 }-
608 cont = strtmp->data;-
609 len = strtmp->length;-
610-
611 break;
executed 10457 times by 10 tests: break;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
10457
612-
613 }-
614 if (cout
coutDescription
TRUEevaluated 5023 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 20134 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
&& len
lenDescription
TRUEevaluated 4554 times by 10 tests
Evaluated by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
FALSEevaluated 469 times by 6 tests
Evaluated by:
  • asn1test
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
)
469-20134
615 memcpy(cout, cont, len);
executed 4554 times by 10 tests: memcpy(cout, cont, len);
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
4554
616 return
executed 25157 times by 10 tests: return len;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
len;
executed 25157 times by 10 tests: return len;
Executed by:
  • asn1evp
  • asn1test
  • asn1time
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssltest
  • tlstest
  • verifytest
25157
617}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2