OpenCoverage

tasn_prn.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/tasn_prn.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10static ASN1_PCTX default_pctx = {-
11 0x001,-
12 0,-
13 0,-
14 0,-
15 0-
16};-
17-
18ASN1_PCTX *ASN1_PCTX_new(void)-
19{-
20 ASN1_PCTX *ret;-
21-
22 ret = CRYPTO_zalloc(sizeof(*ret), __FILE__, 39);-
23 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1
24 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1
25 ) {-
26 ERR_put_error(13,(205),((1|64)),__FILE__,41);-
27 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
28 ((void *)0)
never executed: return ((void *)0) ;
0
29 ;
never executed: return ((void *)0) ;
0
30 }-
31 return
executed 1 time by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 1 time by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
1
32}-
33-
34void ASN1_PCTX_free(ASN1_PCTX *p)-
35{-
36 CRYPTO_free(p, __FILE__, 49);-
37}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
38-
39unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p)-
40{-
41 return
never executed: return p->flags;
p->flags;
never executed: return p->flags;
0
42}-
43-
44void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags)-
45{-
46 p->flags = flags;-
47}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
48-
49unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p)-
50{-
51 return
never executed: return p->nm_flags;
p->nm_flags;
never executed: return p->nm_flags;
0
52}-
53-
54void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags)-
55{-
56 p->nm_flags = flags;-
57}
never executed: end of block
0
58-
59unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p)-
60{-
61 return
never executed: return p->cert_flags;
p->cert_flags;
never executed: return p->cert_flags;
0
62}-
63-
64void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags)-
65{-
66 p->cert_flags = flags;-
67}
never executed: end of block
0
68-
69unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p)-
70{-
71 return
never executed: return p->oid_flags;
p->oid_flags;
never executed: return p->oid_flags;
0
72}-
73-
74void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags)-
75{-
76 p->oid_flags = flags;-
77}
never executed: end of block
0
78-
79unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p)-
80{-
81 return
never executed: return p->str_flags;
p->str_flags;
never executed: return p->str_flags;
0
82}-
83-
84void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags)-
85{-
86 p->str_flags = flags;-
87}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
88-
89-
90-
91static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
92 const ASN1_ITEM *it,-
93 const char *fname, const char *sname,-
94 int nohdr, const ASN1_PCTX *pctx);-
95-
96static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
97 const ASN1_TEMPLATE *tt, const ASN1_PCTX *pctx);-
98-
99static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,-
100 const ASN1_ITEM *it, int indent,-
101 const char *fname, const char *sname,-
102 const ASN1_PCTX *pctx);-
103-
104static int asn1_print_fsname(BIO *out, int indent,-
105 const char *fname, const char *sname,-
106 const ASN1_PCTX *pctx);-
107-
108int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,-
109 const ASN1_ITEM *it, const ASN1_PCTX *pctx)-
110{-
111 const char *sname;-
112 if (pctx ==
pctx == ((void *)0)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 10772 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
5-10772
113 ((void *)0)
pctx == ((void *)0)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 10772 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
5-10772
114 )-
115 pctx = &default_pctx;
executed 5 times by 1 test: pctx = &default_pctx;
Executed by:
  • libcrypto.so.1.1
5
116 if (pctx->flags & 0x100
pctx->flags & 0x100Description
TRUEnever evaluated
FALSEevaluated 10777 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-10777
117 sname =
never executed: sname = ((void *)0) ;
0
118 ((void *)0)
never executed: sname = ((void *)0) ;
0
119 ;
never executed: sname = ((void *)0) ;
0
120 else-
121 sname = it->sname;
executed 10777 times by 1 test: sname = it->sname;
Executed by:
  • libcrypto.so.1.1
10777
122 return
executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
asn1_item_print_ctx(out, &ifld, indent, it,
executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
10777
123 ((void *)0)
executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
10777
124 , sname, 0, pctx);
executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
10777
125}-
126-
127static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
128 const ASN1_ITEM *it,-
129 const char *fname, const char *sname,-
130 int nohdr, const ASN1_PCTX *pctx)-
131{-
132 const ASN1_TEMPLATE *tt;-
133 const ASN1_EXTERN_FUNCS *ef;-
134 ASN1_VALUE **tmpfld;-
135 const ASN1_AUX *aux = it->funcs;-
136 ASN1_aux_cb *asn1_cb;-
137 ASN1_PRINT_ARG parg;-
138 int i;-
139 if (aux
auxDescription
TRUEevaluated 16680 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 79041 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& aux->asn1_cb
aux->asn1_cbDescription
TRUEevaluated 15513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1167 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1167-79041
140 parg.out = out;-
141 parg.indent = indent;-
142 parg.pctx = pctx;-
143 asn1_cb = aux->asn1_cb;-
144 }
executed 15513 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
15513
145 asn1_cb = 0;
executed 80208 times by 1 test: asn1_cb = 0;
Executed by:
  • libcrypto.so.1.1
80208
146-
147 if (((
(it->itype != 0x0)Description
TRUEevaluated 27811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 67910 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
it->itype != 0x0)
(it->itype != 0x0)Description
TRUEevaluated 27811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 67910 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
27811-67910
148 || (
(it->utype != 1)Description
TRUEevaluated 65476 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2434 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
it->utype != 1)
(it->utype != 1)Description
TRUEevaluated 65476 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2434 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) && *
*fld == ((void *)0)Description
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 88442 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
fld ==
*fld == ((void *)0)Description
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 88442 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
2434-88442
149 ((void *)0)
*fld == ((void *)0)Description
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 88442 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4845-88442
150 ) {-
151 if (pctx->flags & 0x001
pctx->flags & 0x001Description
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-4845
152 if (!nohdr
!nohdrDescription
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !asn1_print_fsname(out, indent, fname, sname, pctx)
!asn1_print_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4845
153 return
never executed: return 0;
0;
never executed: return 0;
0
154 if (BIO_puts(out, "<ABSENT>\n") <= 0
BIO_puts(out, ...SENT>\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4845
155 return
never executed: return 0;
0;
never executed: return 0;
0
156 }
executed 4845 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
4845
157 return
executed 4845 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 4845 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
4845
158 }-
159-
160 switch (it->itype) {-
161 case
executed 64451 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
0x0:
executed 64451 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
64451
162 if (it->templates
it->templatesDescription
TRUEevaluated 2581 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 61870 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
2581-61870
163 if (!asn1_template_print_ctx(out, fld, indent,
!asn1_template...mplates, pctx)Description
TRUEevaluated 154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2427 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
154-2427
164 it->templates, pctx)
!asn1_template...mplates, pctx)Description
TRUEevaluated 154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2427 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
154-2427
165 return
executed 154 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 154 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
154
166 break;
executed 2427 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
2427
167 }-
168-
169 case
executed 3871 times by 1 test: case 0x5:
Executed by:
  • libcrypto.so.1.1
0x5:
executed 3871 times by 1 test: case 0x5:
Executed by:
  • libcrypto.so.1.1
code before this statement executed 61870 times by 1 test: case 0x5:
Executed by:
  • libcrypto.so.1.1
3871-61870
170 if (!asn1_primitive_print(out, fld, it, indent, fname, sname, pctx)
!asn1_primitiv..., sname, pctx)Description
TRUEevaluated 1211 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 64530 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1211-64530
171 return
executed 1211 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 1211 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1211
172 break;
executed 64530 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
64530
173-
174 case
executed 1163 times by 1 test: case 0x4:
Executed by:
  • libcrypto.so.1.1
0x4:
executed 1163 times by 1 test: case 0x4:
Executed by:
  • libcrypto.so.1.1
1163
175 if (!nohdr
!nohdrDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !asn1_print_fsname(out, indent, fname, sname, pctx)
!asn1_print_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1163
176 return
never executed: return 0;
0;
never executed: return 0;
0
177-
178 ef = it->funcs;-
179 if (ef
efDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& ef->asn1_ex_print
ef->asn1_ex_printDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-1163
180 i = ef->asn1_ex_print(out, fld, indent, "", pctx);-
181 if (!i
!iDescription
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1163
182 return
never executed: return 0;
0;
never executed: return 0;
0
183 if ((
(i == 2)Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
i == 2)
(i == 2)Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& (
(BIO_puts(out, "\n") <= 0)Description
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
BIO_puts(out, "\n") <= 0)
(BIO_puts(out, "\n") <= 0)Description
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1163
184 return
never executed: return 0;
0;
never executed: return 0;
0
185 return
executed 1163 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1163 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1163
186 } else if (sname
snameDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
187 BIO_printf(out, ":EXTERNAL TYPE %s\n", sname) <= 0
BIO_printf(out...", sname) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
188 return
never executed: return 0;
0;
never executed: return 0;
0
189 break;
never executed: break;
0
190-
191 case
executed 4292 times by 1 test: case 0x2:
Executed by:
  • libcrypto.so.1.1
0x2:
executed 4292 times by 1 test: case 0x2:
Executed by:
  • libcrypto.so.1.1
4292
192-
193 i = asn1_get_choice_selector(fld, it);-
194-
195 if ((
(i < 0)Description
TRUEnever evaluated
FALSEevaluated 4292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
i < 0)
(i < 0)Description
TRUEnever evaluated
FALSEevaluated 4292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (
(i >= it->tcount)Description
TRUEnever evaluated
FALSEevaluated 4292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
i >= it->tcount)
(i >= it->tcount)Description
TRUEnever evaluated
FALSEevaluated 4292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-4292
196 if (BIO_printf(out, "ERROR: selector [%d] invalid\n", i) <= 0
BIO_printf(out...id\n", i) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
197 return
never executed: return 0;
0;
never executed: return 0;
0
198 return
never executed: return 1;
1;
never executed: return 1;
0
199 }-
200 tt = it->templates + i;-
201 tmpfld = asn1_get_field_ptr(fld, tt);-
202 if (!asn1_template_print_ctx(out, tmpfld, indent, tt, pctx)
!asn1_template...ent, tt, pctx)Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4246 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
46-4246
203 return
executed 46 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 46 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
46
204 break;
executed 4246 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
4246
205-
206 case
executed 16219 times by 1 test: case 0x1:
Executed by:
  • libcrypto.so.1.1
0x1:
executed 16219 times by 1 test: case 0x1:
Executed by:
  • libcrypto.so.1.1
16219
207 case
executed 880 times by 1 test: case 0x6:
Executed by:
  • libcrypto.so.1.1
0x6:
executed 880 times by 1 test: case 0x6:
Executed by:
  • libcrypto.so.1.1
880
208 if (!nohdr
!nohdrDescription
TRUEevaluated 5715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11384 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !asn1_print_fsname(out, indent, fname, sname, pctx)
!asn1_print_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 5715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-11384
209 return
never executed: return 0;
0;
never executed: return 0;
0
210 if (fname
fnameDescription
TRUEevaluated 3641 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 13458 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| sname
snameDescription
TRUEevaluated 2074 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11384 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
2074-13458
211 if (pctx->flags & 0x002
pctx->flags & 0x002Description
TRUEevaluated 5710 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-5710
212 if (BIO_puts(out, " {\n") <= 0
BIO_puts(out, " {\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 5710 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5710
213 return
never executed: return 0;
0;
never executed: return 0;
0
214 }
executed 5710 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
5710
215 if (BIO_puts(out, "\n") <= 0
BIO_puts(out, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5
216 return
never executed: return 0;
0;
never executed: return 0;
0
217 }
executed 5 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5
218 }-
219-
220 if (asn1_cb
asn1_cbDescription
TRUEevaluated 1960 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 15139 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1960-15139
221 i = asn1_cb(8, fld, it, &parg);-
222 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1960
223 return
never executed: return 0;
0;
never executed: return 0;
0
224 if (i == 2
i == 2Description
TRUEnever evaluated
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1960
225 return
never executed: return 1;
1;
never executed: return 1;
0
226 }
executed 1960 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1960
227-
228-
229 for (i = 0, tt = it->templates; i < it->tcount
i < it->tcountDescription
TRUEevaluated 47984 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 16205 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++, tt++) {
16205-47984
230 const ASN1_TEMPLATE *seqtt;-
231 seqtt = asn1_do_adb(fld, tt, 1);-
232 if (!seqtt
!seqttDescription
TRUEnever evaluated
FALSEevaluated 47984 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-47984
233 return
never executed: return 0;
0;
never executed: return 0;
0
234 tmpfld = asn1_get_field_ptr(fld, seqtt);-
235 if (!asn1_template_print_ctx(out, tmpfld,
!asn1_template..., seqtt, pctx)Description
TRUEevaluated 894 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 47090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
894-47090
236 indent + 2, seqtt, pctx)
!asn1_template..., seqtt, pctx)Description
TRUEevaluated 894 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 47090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
894-47090
237 return
executed 894 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 894 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
894
238 }
executed 47090 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
47090
239 if (pctx->flags & 0x002
pctx->flags & 0x002Description
TRUEevaluated 16200 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-16200
240 if (BIO_printf(out, "%*s}\n", indent, "") < 0
BIO_printf(out...ndent, "") < 0Description
TRUEnever evaluated
FALSEevaluated 16200 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-16200
241 return
never executed: return 0;
0;
never executed: return 0;
0
242 }
executed 16200 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
16200
243-
244 if (asn1_cb
asn1_cbDescription
TRUEevaluated 1607 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 14598 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1607-14598
245 i = asn1_cb(9, fld, it, &parg);-
246 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEevaluated 1607 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1607
247 return
never executed: return 0;
0;
never executed: return 0;
0
248 }
executed 1607 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1607
249 break;
executed 16205 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
16205
250-
251 default
never executed: default:
:
never executed: default:
0
252 BIO_printf(out, "Unprocessed type %d\n", it->itype);-
253 return
never executed: return 0;
0;
never executed: return 0;
0
254 }-
255-
256 return
executed 87408 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 87408 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
87408
257}-
258-
259static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
260 const ASN1_TEMPLATE *tt, const ASN1_PCTX *pctx)-
261{-
262 int i, flags;-
263 const char *sname, *fname;-
264 ASN1_VALUE *tfld;-
265 flags = tt->flags;-
266 if (pctx->flags & 0x080
pctx->flags & 0x080Description
TRUEevaluated 54842 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 15 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
15-54842
267 sname = (tt->item)->sname;
executed 54842 times by 1 test: sname = (tt->item)->sname;
Executed by:
  • libcrypto.so.1.1
54842
268 else-
269 sname =
executed 15 times by 1 test: sname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
15
270 ((void *)0)
executed 15 times by 1 test: sname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
15
271 ;
executed 15 times by 1 test: sname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
15
272 if (pctx->flags & 0x040
pctx->flags & 0x040Description
TRUEnever evaluated
FALSEevaluated 54857 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-54857
273 fname =
never executed: fname = ((void *)0) ;
0
274 ((void *)0)
never executed: fname = ((void *)0) ;
0
275 ;
never executed: fname = ((void *)0) ;
0
276 else-
277 fname = tt->field_name;
executed 54857 times by 1 test: fname = tt->field_name;
Executed by:
  • libcrypto.so.1.1
54857
278-
279-
280-
281-
282-
283 if (flags & (0x1 << 12)
flags & (0x1 << 12)Description
TRUEevaluated 5380 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 49477 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5380-49477
284 tfld = (ASN1_VALUE *)fld;-
285 fld = &tfld;-
286 }
executed 5380 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5380
287-
288 if (flags & (0x3 << 1)
flags & (0x3 << 1)Description
TRUEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 46273 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
8584-46273
289 char *tname;-
290 ASN1_VALUE *skitem;-
291 struct stack_st_ASN1_VALUE *stack;-
292-
293-
294 if (fname
fnameDescription
TRUEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-8584
295 if (pctx->flags & 0x004
pctx->flags & 0x004Description
TRUEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-8584
296 if (flags & (0x1 << 1)
flags & (0x1 << 1)Description
TRUEevaluated 2049 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6535 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2049-6535
297 tname = "SET";
executed 2049 times by 1 test: tname = "SET";
Executed by:
  • libcrypto.so.1.1
2049
298 else-
299 tname = "SEQUENCE";
executed 6535 times by 1 test: tname = "SEQUENCE";
Executed by:
  • libcrypto.so.1.1
6535
300 if (BIO_printf(out, "%*s%s OF %s {\n",
BIO_printf(out...eld_name) <= 0Description
TRUEnever evaluated
FALSEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-8584
301 indent, "", tname, tt->field_name) <= 0
BIO_printf(out...eld_name) <= 0Description
TRUEnever evaluated
FALSEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-8584
302 return
never executed: return 0;
0;
never executed: return 0;
0
303 }
executed 8584 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (BIO_printf(out, "%*s%s:\n", indent, "", fname) <= 0
BIO_printf(out...", fname) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0-8584
304 return
never executed: return 0;
0;
never executed: return 0;
0
305 }
executed 8584 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8584
306 stack = (struct stack_st_ASN1_VALUE *)*fld;-
307 for (i = 0; i < sk_ASN1_VALUE_num(stack)
i < sk_ASN1_VALUE_num(stack)Description
TRUEevaluated 38671 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8326 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
8326-38671
308 if ((
(i > 0)Description
TRUEevaluated 35150 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
i > 0)
(i > 0)Description
TRUEevaluated 35150 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(BIO_puts(out, "\n") <= 0)Description
TRUEnever evaluated
FALSEevaluated 35150 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
BIO_puts(out, "\n") <= 0)
(BIO_puts(out, "\n") <= 0)Description
TRUEnever evaluated
FALSEevaluated 35150 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-35150
309 return
never executed: return 0;
0;
never executed: return 0;
0
310-
311 skitem = sk_ASN1_VALUE_value(stack, i);-
312 if (!asn1_item_print_ctx(out, &skitem, indent + 2,
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
258-38413
313 (tt->item),
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
258-38413
314 ((void *)0)
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
258-38413
315 ,
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
258-38413
316 ((void *)0)
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
258-38413
317 , 1,
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
258-38413
318 pctx)
!asn1_item_pri...)0) , 1, pctx)Description
TRUEevaluated 258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
258-38413
319 return
executed 258 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 258 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
258
320 }
executed 38413 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
38413
321 if (i == 0
i == 0Description
TRUEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3263 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& BIO_printf(out, "%*s<%s>\n", indent + 2, "",
BIO_printf(out... "EMPTY") <= 0Description
TRUEnever evaluated
FALSEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5063
322 stack ==
BIO_printf(out... "EMPTY") <= 0Description
TRUEnever evaluated
FALSEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5063
323 ((void *)0)
BIO_printf(out... "EMPTY") <= 0Description
TRUEnever evaluated
FALSEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5063
324 ? "ABSENT" : "EMPTY") <= 0
BIO_printf(out... "EMPTY") <= 0Description
TRUEnever evaluated
FALSEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5063
325 return
never executed: return 0;
0;
never executed: return 0;
0
326 if (pctx->flags & 0x002
pctx->flags & 0x002Description
TRUEevaluated 8326 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-8326
327 if (BIO_printf(out, "%*s}\n", indent, "") <= 0
BIO_printf(out...dent, "") <= 0Description
TRUEnever evaluated
FALSEevaluated 8326 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-8326
328 return
never executed: return 0;
0;
never executed: return 0;
0
329 }
executed 8326 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8326
330 return
executed 8326 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 8326 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
8326
331 }-
332 return
executed 46273 times by 1 test: return asn1_item_print_ctx(out, fld, indent, (tt->item), fname, sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
asn1_item_print_ctx(out, fld, indent, (tt->item),
executed 46273 times by 1 test: return asn1_item_print_ctx(out, fld, indent, (tt->item), fname, sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
46273
333 fname, sname, 0, pctx);
executed 46273 times by 1 test: return asn1_item_print_ctx(out, fld, indent, (tt->item), fname, sname, 0, pctx);
Executed by:
  • libcrypto.so.1.1
46273
334}-
335-
336static int asn1_print_fsname(BIO *out, int indent,-
337 const char *fname, const char *sname,-
338 const ASN1_PCTX *pctx)-
339{-
340 static const char spaces[] = " ";-
341 static const int nspaces = sizeof(spaces) - 1;-
342-
343 while (indent > nspaces
indent > nspacesDescription
TRUEevaluated 1017 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 77464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1017-77464
344 if (BIO_write(out, spaces, nspaces) != nspaces
BIO_write(out,...es) != nspacesDescription
TRUEnever evaluated
FALSEevaluated 1017 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1017
345 return
never executed: return 0;
0;
never executed: return 0;
0
346 indent -= nspaces;-
347 }
executed 1017 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1017
348 if (BIO_write(out, spaces, indent) != indent
BIO_write(out,...ent) != indentDescription
TRUEnever evaluated
FALSEevaluated 77464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-77464
349 return
never executed: return 0;
0;
never executed: return 0;
0
350 if (pctx->flags & 0x100
pctx->flags & 0x100Description
TRUEnever evaluated
FALSEevaluated 77464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-77464
351 sname =
never executed: sname = ((void *)0) ;
0
352 ((void *)0)
never executed: sname = ((void *)0) ;
0
353 ;
never executed: sname = ((void *)0) ;
0
354 if (pctx->flags & 0x040
pctx->flags & 0x040Description
TRUEnever evaluated
FALSEevaluated 77464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-77464
355 fname =
never executed: fname = ((void *)0) ;
0
356 ((void *)0)
never executed: fname = ((void *)0) ;
0
357 ;
never executed: fname = ((void *)0) ;
0
358 if (!sname
!snameDescription
TRUEevaluated 23841 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53623 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !fname
!fnameDescription
TRUEevaluated 23826 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 15 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
15-53623
359 return
executed 23826 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 23826 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
23826
360 if (fname
fnameDescription
TRUEevaluated 45208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8430 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
8430-45208
361 if (BIO_puts(out, fname) <= 0
BIO_puts(out, fname) <= 0Description
TRUEnever evaluated
FALSEevaluated 45208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-45208
362 return
never executed: return 0;
0;
never executed: return 0;
0
363 }
executed 45208 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
45208
364 if (sname
snameDescription
TRUEevaluated 53623 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 15 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
15-53623
365 if (fname
fnameDescription
TRUEevaluated 45193 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8430 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
8430-45193
366 if (BIO_printf(out, " (%s)", sname) <= 0
BIO_printf(out...", sname) <= 0Description
TRUEnever evaluated
FALSEevaluated 45193 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-45193
367 return
never executed: return 0;
0;
never executed: return 0;
0
368 }
executed 45193 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
45193
369 if (BIO_puts(out, sname) <= 0
BIO_puts(out, sname) <= 0Description
TRUEnever evaluated
FALSEevaluated 8430 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-8430
370 return
never executed: return 0;
0;
never executed: return 0;
0
371 }
executed 8430 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8430
372 }-
373 if (BIO_write(out, ": ", 2) != 2
BIO_write(out, ": ", 2) != 2Description
TRUEnever evaluated
FALSEevaluated 53638 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-53638
374 return
never executed: return 0;
0;
never executed: return 0;
0
375 return
executed 53638 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 53638 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
53638
376}-
377-
378static int asn1_print_boolean(BIO *out, int boolval)-
379{-
380 const char *str;-
381 switch (boolval) {-
382 case
executed 1062 times by 1 test: case -1:
Executed by:
  • libcrypto.so.1.1
-1:
executed 1062 times by 1 test: case -1:
Executed by:
  • libcrypto.so.1.1
1062
383 str = "BOOL ABSENT";-
384 break;
executed 1062 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1062
385-
386 case
executed 566 times by 1 test: case 0:
Executed by:
  • libcrypto.so.1.1
0:
executed 566 times by 1 test: case 0:
Executed by:
  • libcrypto.so.1.1
566
387 str = "FALSE";-
388 break;
executed 566 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
566
389-
390 default
executed 1063 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
:
executed 1063 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
1063
391 str = "TRUE";-
392 break;
executed 1063 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1063
393-
394 }-
395-
396 if (BIO_puts(out, str) <= 0
BIO_puts(out, str) <= 0Description
TRUEnever evaluated
FALSEevaluated 2691 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2691
397 return
never executed: return 0;
0;
never executed: return 0;
0
398 return
executed 2691 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 2691 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
2691
399-
400}-
401-
402static int asn1_print_integer(BIO *out, const ASN1_INTEGER *str)-
403{-
404 char *s;-
405 int ret = 1;-
406 s = i2s_ASN1_INTEGER(-
407 ((void *)0)-
408 , str);-
409 if (s ==
s == ((void *)0)Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7608 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
38-7608
410 ((void *)0)
s == ((void *)0)Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7608 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
38-7608
411 )-
412 return
executed 38 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 38 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
38
413 if (BIO_puts(out, s) <= 0
BIO_puts(out, s) <= 0Description
TRUEnever evaluated
FALSEevaluated 7608 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-7608
414 ret = 0;
never executed: ret = 0;
0
415 CRYPTO_free(s, __FILE__, 402);-
416 return
executed 7608 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 7608 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
7608
417}-
418-
419static int asn1_print_oid(BIO *out, const ASN1_OBJECT *oid)-
420{-
421 char objbuf[80];-
422 const char *ln;-
423 ln = OBJ_nid2ln(OBJ_obj2nid(oid));-
424 if (!ln
!lnDescription
TRUEnever evaluated
FALSEevaluated 8946 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-8946
425 ln = "";
never executed: ln = "";
0
426 OBJ_obj2txt(objbuf, sizeof(objbuf), oid, 1);-
427 if (BIO_printf(out, "%s (%s)", ln, objbuf) <= 0
BIO_printf(out..., objbuf) <= 0Description
TRUEnever evaluated
FALSEevaluated 8946 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-8946
428 return
never executed: return 0;
0;
never executed: return 0;
0
429 return
executed 8946 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 8946 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
8946
430}-
431-
432static int asn1_print_obstring(BIO *out, const ASN1_STRING *str, int indent)-
433{-
434 if (str->type == 3
str->type == 3Description
TRUEevaluated 1715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4230 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1715-4230
435 if (BIO_printf(out, " (%ld unused bits)\n", str->flags & 0x7) <= 0
BIO_printf(out...gs & 0x7) <= 0Description
TRUEnever evaluated
FALSEevaluated 1715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1715
436 return
never executed: return 0;
0;
never executed: return 0;
0
437 }
executed 1715 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (BIO_puts(out, "\n") <= 0
BIO_puts(out, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 4230 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4230
438 return
never executed: return 0;
0;
never executed: return 0;
0
439 if ((
(str->length > 0)Description
TRUEevaluated 4416 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1529 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
str->length > 0)
(str->length > 0)Description
TRUEevaluated 4416 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1529 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1529-4416
440 && BIO_dump_indent(out, (const char *)str->data, str->length,
BIO_dump_inden...dent + 2) <= 0Description
TRUEnever evaluated
FALSEevaluated 4416 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4416
441 indent + 2) <= 0
BIO_dump_inden...dent + 2) <= 0Description
TRUEnever evaluated
FALSEevaluated 4416 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4416
442 return
never executed: return 0;
0;
never executed: return 0;
0
443 return
executed 5945 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 5945 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
5945
444}-
445-
446static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,-
447 const ASN1_ITEM *it, int indent,-
448 const char *fname, const char *sname,-
449 const ASN1_PCTX *pctx)-
450{-
451 long utype;-
452 ASN1_STRING *str;-
453 int ret = 1, needlf = 1;-
454 const char *pname;-
455 const ASN1_PRIMITIVE_FUNCS *pf;-
456 pf = it->funcs;-
457 if (!asn1_print_fsname(out, indent, fname, sname, pctx)
!asn1_print_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 65741 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-65741
458 return
never executed: return 0;
0;
never executed: return 0;
0
459 if (pf
pfDescription
TRUEevaluated 12264 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53477 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& pf->prim_print
pf->prim_printDescription
TRUEevaluated 12264 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-53477
460 return
executed 12264 times by 1 test: return pf->prim_print(out, fld, it, indent, pctx);
Executed by:
  • libcrypto.so.1.1
pf->prim_print(out, fld, it, indent, pctx);
executed 12264 times by 1 test: return pf->prim_print(out, fld, it, indent, pctx);
Executed by:
  • libcrypto.so.1.1
12264
461 if (it->itype == 0x5
it->itype == 0x5Description
TRUEevaluated 3871 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 49606 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3871-49606
462 str = (ASN1_STRING *)*fld;-
463 utype = str->type & ~0x100;-
464 }
executed 3871 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
3871
465 utype = it->utype;-
466 if (utype == 1
utype == 1Description
TRUEevaluated 2434 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 47172 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2434-47172
467 str =
executed 2434 times by 1 test: str = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
2434
468 ((void *)0)
executed 2434 times by 1 test: str = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
2434
469 ;
executed 2434 times by 1 test: str = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
2434
470 else-
471 str = (ASN1_STRING *)*fld;
executed 47172 times by 1 test: str = (ASN1_STRING *)*fld;
Executed by:
  • libcrypto.so.1.1
47172
472 }-
473 if (utype == -4
utype == -4Description
TRUEevaluated 28294 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 25183 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
25183-28294
474 ASN1_TYPE *atype = (ASN1_TYPE *)*fld;-
475 utype = atype->type;-
476 fld = &atype->value.asn1_value;-
477 str = (ASN1_STRING *)*fld;-
478 if (pctx->flags & 0x010
pctx->flags & 0x010Description
TRUEnever evaluated
FALSEevaluated 28294 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-28294
479 pname =
never executed: pname = ((void *)0) ;
0
480 ((void *)0)
never executed: pname = ((void *)0) ;
0
481 ;
never executed: pname = ((void *)0) ;
0
482 else-
483 pname = ASN1_tag2str(utype);
executed 28294 times by 1 test: pname = ASN1_tag2str(utype);
Executed by:
  • libcrypto.so.1.1
28294
484 } else {-
485 if (pctx->flags & 0x008
pctx->flags & 0x008Description
TRUEevaluated 25178 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
5-25178
486 pname = ASN1_tag2str(utype);
executed 25178 times by 1 test: pname = ASN1_tag2str(utype);
Executed by:
  • libcrypto.so.1.1
25178
487 else-
488 pname =
executed 5 times by 1 test: pname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5
489 ((void *)0)
executed 5 times by 1 test: pname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5
490 ;
executed 5 times by 1 test: pname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5
491 }-
492-
493 if (utype == 5
utype == 5Description
TRUEevaluated 1694 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 51783 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1694-51783
494 if (BIO_puts(out, "NULL\n") <= 0
BIO_puts(out, "NULL\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 1694 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1694
495 return
never executed: return 0;
0;
never executed: return 0;
0
496 return
executed 1694 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1694 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1694
497 }-
498-
499 if (pname
pnameDescription
TRUEevaluated 51778 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-51778
500 if (BIO_puts(out, pname) <= 0
BIO_puts(out, pname) <= 0Description
TRUEnever evaluated
FALSEevaluated 51778 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-51778
501 return
never executed: return 0;
0;
never executed: return 0;
0
502 if (BIO_puts(out, ":") <= 0
BIO_puts(out, ":") <= 0Description
TRUEnever evaluated
FALSEevaluated 51778 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-51778
503 return
never executed: return 0;
0;
never executed: return 0;
0
504 }
executed 51778 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
51778
505-
506 switch (utype) {-
507 case
executed 2691 times by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
1:
executed 2691 times by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
2691
508 {-
509 int boolval = *(int *)fld;-
510 if (boolval == -1
boolval == -1Description
TRUEevaluated 1062 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1629 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1062-1629
511 boolval = it->size;
executed 1062 times by 1 test: boolval = it->size;
Executed by:
  • libcrypto.so.1.1
1062
512 ret = asn1_print_boolean(out, boolval);-
513 }-
514 break;
executed 2691 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
2691
515-
516 case
executed 7608 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
2:
executed 7608 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
7608
517 case
executed 38 times by 1 test: case 10:
Executed by:
  • libcrypto.so.1.1
10:
executed 38 times by 1 test: case 10:
Executed by:
  • libcrypto.so.1.1
38
518 ret = asn1_print_integer(out, str);-
519 break;
executed 7646 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
7646
520-
521 case
executed 1949 times by 1 test: case 23:
Executed by:
  • libcrypto.so.1.1
23:
executed 1949 times by 1 test: case 23:
Executed by:
  • libcrypto.so.1.1
1949
522 ret = ASN1_UTCTIME_print(out, str);-
523 break;
executed 1949 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1949
524-
525 case
executed 1304 times by 1 test: case 24:
Executed by:
  • libcrypto.so.1.1
24:
executed 1304 times by 1 test: case 24:
Executed by:
  • libcrypto.so.1.1
1304
526 ret = ASN1_GENERALIZEDTIME_print(out, str);-
527 break;
executed 1304 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1304
528-
529 case
executed 8946 times by 1 test: case 6:
Executed by:
  • libcrypto.so.1.1
6:
executed 8946 times by 1 test: case 6:
Executed by:
  • libcrypto.so.1.1
8946
530 ret = asn1_print_oid(out, (const ASN1_OBJECT *)*fld);-
531 break;
executed 8946 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
8946
532-
533 case
executed 4230 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
4:
executed 4230 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
4230
534 case
executed 1715 times by 1 test: case 3:
Executed by:
  • libcrypto.so.1.1
3:
executed 1715 times by 1 test: case 3:
Executed by:
  • libcrypto.so.1.1
1715
535 ret = asn1_print_obstring(out, str, indent);-
536 needlf = 0;-
537 break;
executed 5945 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
5945
538-
539 case
executed 11569 times by 1 test: case 16:
Executed by:
  • libcrypto.so.1.1
16:
executed 11569 times by 1 test: case 16:
Executed by:
  • libcrypto.so.1.1
11569
540 case
executed 764 times by 1 test: case 17:
Executed by:
  • libcrypto.so.1.1
17:
executed 764 times by 1 test: case 17:
Executed by:
  • libcrypto.so.1.1
764
541 case
executed 7955 times by 1 test: case -3:
Executed by:
  • libcrypto.so.1.1
-3:
executed 7955 times by 1 test: case -3:
Executed by:
  • libcrypto.so.1.1
7955
542 if (BIO_puts(out, "\n") <= 0
BIO_puts(out, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 20288 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20288
543 return
never executed: return 0;
0;
never executed: return 0;
0
544 if (ASN1_parse_dump(out, str->data, str->length, indent, 0) <= 0
ASN1_parse_dum...ndent, 0) <= 0Description
TRUEevaluated 830 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 19458 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
830-19458
545 ret = 0;
executed 830 times by 1 test: ret = 0;
Executed by:
  • libcrypto.so.1.1
830
546 needlf = 0;-
547 break;
executed 20288 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
20288
548-
549 default
executed 3014 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
:
executed 3014 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
3014
550 ret = ASN1_STRING_print_ex(out, str, pctx->str_flags);-
551-
552 }
executed 3014 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3014
553 if (!ret
!retDescription
TRUEevaluated 1211 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 50572 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1211-50572
554 return
executed 1211 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 1211 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1211
555 if (needlf
needlfDescription
TRUEevaluated 25169 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 25403 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& BIO_puts(out, "\n") <= 0
BIO_puts(out, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 25169 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-25403
556 return
never executed: return 0;
0;
never executed: return 0;
0
557 return
executed 50572 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 50572 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
50572
558}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2