OpenCoverage

tasn_prn.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/tasn_prn.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.-
3 *-
4 * Licensed under the OpenSSL license (the "License"). You may not use-
5 * this file except in compliance with the License. You can obtain a copy-
6 * in the file LICENSE in the source distribution or at-
7 * https://www.openssl.org/source/license.html-
8 */-
9-
10#include <stddef.h>-
11#include "internal/cryptlib.h"-
12#include <openssl/asn1.h>-
13#include <openssl/asn1t.h>-
14#include <openssl/objects.h>-
15#include <openssl/buffer.h>-
16#include <openssl/err.h>-
17#include <openssl/x509v3.h>-
18#include "internal/asn1_int.h"-
19#include "asn1_locl.h"-
20-
21/*-
22 * Print routines.-
23 */-
24-
25/* ASN1_PCTX routines */-
26-
27static ASN1_PCTX default_pctx = {-
28 ASN1_PCTX_FLAGS_SHOW_ABSENT, /* flags */-
29 0, /* nm_flags */-
30 0, /* cert_flags */-
31 0, /* oid_flags */-
32 0 /* str_flags */-
33};-
34-
35ASN1_PCTX *ASN1_PCTX_new(void)-
36{-
37 ASN1_PCTX *ret;-
38-
39 ret = OPENSSL_zalloc(sizeof(*ret));-
40 if (ret == NULL) {
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1
41 ASN1err(ASN1_F_ASN1_PCTX_NEW, ERR_R_MALLOC_FAILURE);-
42 return NULL;
never executed: return ((void *)0) ;
0
43 }-
44 return ret;
executed 1 time by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
1
45}-
46-
47void ASN1_PCTX_free(ASN1_PCTX *p)-
48{-
49 OPENSSL_free(p);-
50}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
51-
52unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p)-
53{-
54 return p->flags;
never executed: return p->flags;
0
55}-
56-
57void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags)-
58{-
59 p->flags = flags;-
60}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
61-
62unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p)-
63{-
64 return p->nm_flags;
never executed: return p->nm_flags;
0
65}-
66-
67void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags)-
68{-
69 p->nm_flags = flags;-
70}
never executed: end of block
0
71-
72unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p)-
73{-
74 return p->cert_flags;
never executed: return p->cert_flags;
0
75}-
76-
77void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags)-
78{-
79 p->cert_flags = flags;-
80}
never executed: end of block
0
81-
82unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p)-
83{-
84 return p->oid_flags;
never executed: return p->oid_flags;
0
85}-
86-
87void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags)-
88{-
89 p->oid_flags = flags;-
90}
never executed: end of block
0
91-
92unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p)-
93{-
94 return p->str_flags;
never executed: return p->str_flags;
0
95}-
96-
97void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags)-
98{-
99 p->str_flags = flags;-
100}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1
101-
102/* Main print routines */-
103-
104static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
105 const ASN1_ITEM *it,-
106 const char *fname, const char *sname,-
107 int nohdr, const ASN1_PCTX *pctx);-
108-
109static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
110 const ASN1_TEMPLATE *tt, const ASN1_PCTX *pctx);-
111-
112static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,-
113 const ASN1_ITEM *it, int indent,-
114 const char *fname, const char *sname,-
115 const ASN1_PCTX *pctx);-
116-
117static int asn1_print_fsname(BIO *out, int indent,-
118 const char *fname, const char *sname,-
119 const ASN1_PCTX *pctx);-
120-
121int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,-
122 const ASN1_ITEM *it, const ASN1_PCTX *pctx)-
123{-
124 const char *sname;-
125 if (pctx == NULL)
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
126 pctx = &default_pctx;
executed 5 times by 1 test: pctx = &default_pctx;
Executed by:
  • libcrypto.so.1.1
5
127 if (pctx->flags & ASN1_PCTX_FLAGS_NO_STRUCT_NAME)
pctx->flags & 0x100Description
TRUEnever evaluated
FALSEevaluated 10777 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-10777
128 sname = NULL;
never executed: sname = ((void *)0) ;
0
129 else-
130 sname = it->sname;
executed 10777 times by 1 test: sname = it->sname;
Executed by:
  • libcrypto.so.1.1
10777
131 return asn1_item_print_ctx(out, &ifld, indent, it, NULL, 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
132}-
133-
134static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
135 const ASN1_ITEM *it,-
136 const char *fname, const char *sname,-
137 int nohdr, const ASN1_PCTX *pctx)-
138{-
139 const ASN1_TEMPLATE *tt;-
140 const ASN1_EXTERN_FUNCS *ef;-
141 ASN1_VALUE **tmpfld;-
142 const ASN1_AUX *aux = it->funcs;-
143 ASN1_aux_cb *asn1_cb;-
144 ASN1_PRINT_ARG parg;-
145 int i;-
146 if (aux && aux->asn1_cb) {
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_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
147 parg.out = out;-
148 parg.indent = indent;-
149 parg.pctx = pctx;-
150 asn1_cb = aux->asn1_cb;-
151 } else
executed 15513 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
15513
152 asn1_cb = 0;
executed 80208 times by 1 test: asn1_cb = 0;
Executed by:
  • libcrypto.so.1.1
80208
153-
154 if (((it->itype != ASN1_ITYPE_PRIMITIVE)
(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
155 || (it->utype != V_ASN1_BOOLEAN)) && *fld == NULL) {
(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
2434-88442
156 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_ABSENT) {
pctx->flags & 0x001Description
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-4845
157 if (!nohdr && !asn1_print_fsname(out, indent, fname, sname, pctx))
!nohdrDescription
TRUEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
!asn1_print_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 4845 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4845
158 return 0;
never executed: return 0;
0
159 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
160 return 0;
never executed: return 0;
0
161 }
executed 4845 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
4845
162 return 1;
executed 4845 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
4845
163 }-
164-
165 switch (it->itype) {-
166 case ASN1_ITYPE_PRIMITIVE:
executed 64451 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
64451
167 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
168 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
169 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
170 return 0;
executed 154 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
154
171 break;
executed 2427 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
2427
172 }-
173 /* fall through */-
174 case ASN1_ITYPE_MSTRING:
code before this statement executed 61870 times by 1 test: case 0x5:
Executed by:
  • libcrypto.so.1.1
executed 3871 times by 1 test: case 0x5:
Executed by:
  • libcrypto.so.1.1
3871-61870
175 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
176 return 0;
executed 1211 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1211
177 break;
executed 64530 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
64530
178-
179 case ASN1_ITYPE_EXTERN:
executed 1163 times by 1 test: case 0x4:
Executed by:
  • libcrypto.so.1.1
1163
180 if (!nohdr && !asn1_print_fsname(out, indent, fname, sname, pctx))
!nohdrDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
!asn1_print_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1163
181 return 0;
never executed: return 0;
0
182 /* Use new style print routine if possible */-
183 ef = it->funcs;-
184 if (ef && ef->asn1_ex_print) {
efDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
ef->asn1_ex_printDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1163
185 i = ef->asn1_ex_print(out, fld, indent, "", pctx);-
186 if (!i)
!iDescription
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1163
187 return 0;
never executed: return 0;
0
188 if ((i == 2) && (BIO_puts(out, "\n") <= 0))
(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
0-1163
189 return 0;
never executed: return 0;
0
190 return 1;
executed 1163 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1163
191 } else if (sname &&
snameDescription
TRUEnever evaluated
FALSEnever evaluated
0
192 BIO_printf(out, ":EXTERNAL TYPE %s\n", sname) <= 0)
BIO_printf(out...", sname) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
193 return 0;
never executed: return 0;
0
194 break;
never executed: break;
0
195-
196 case ASN1_ITYPE_CHOICE:
executed 4292 times by 1 test: case 0x2:
Executed by:
  • libcrypto.so.1.1
4292
197 /* CHOICE type, get selector */-
198 i = asn1_get_choice_selector(fld, it);-
199 /* This should never happen... */-
200 if ((i < 0) || (i >= it->tcount)) {
(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
0-4292
201 if (BIO_printf(out, "ERROR: selector [%d] invalid\n", i) <= 0)
BIO_printf(out...id\n", i) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
202 return 0;
never executed: return 0;
0
203 return 1;
never executed: return 1;
0
204 }-
205 tt = it->templates + i;-
206 tmpfld = asn1_get_field_ptr(fld, tt);-
207 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
208 return 0;
executed 46 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
46
209 break;
executed 4246 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
4246
210-
211 case ASN1_ITYPE_SEQUENCE:
executed 16219 times by 1 test: case 0x1:
Executed by:
  • libcrypto.so.1.1
16219
212 case ASN1_ITYPE_NDEF_SEQUENCE:
executed 880 times by 1 test: case 0x6:
Executed by:
  • libcrypto.so.1.1
880
213 if (!nohdr && !asn1_print_fsname(out, indent, fname, sname, pctx))
!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_fs..., sname, pctx)Description
TRUEnever evaluated
FALSEevaluated 5715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-11384
214 return 0;
never executed: return 0;
0
215 if (fname || sname) {
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
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
216 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_SEQUENCE) {
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
217 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
218 return 0;
never executed: return 0;
0
219 } else {
executed 5710 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5710
220 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
221 return 0;
never executed: return 0;
0
222 }
executed 5 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5
223 }-
224-
225 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
226 i = asn1_cb(ASN1_OP_PRINT_PRE, fld, it, &parg);-
227 if (i == 0)
i == 0Description
TRUEnever evaluated
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1960
228 return 0;
never executed: return 0;
0
229 if (i == 2)
i == 2Description
TRUEnever evaluated
FALSEevaluated 1960 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1960
230 return 1;
never executed: return 1;
0
231 }
executed 1960 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1960
232-
233 /* Print each field entry */-
234 for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
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
16205-47984
235 const ASN1_TEMPLATE *seqtt;-
236 seqtt = asn1_do_adb(fld, tt, 1);-
237 if (!seqtt)
!seqttDescription
TRUEnever evaluated
FALSEevaluated 47984 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47984
238 return 0;
never executed: return 0;
0
239 tmpfld = asn1_get_field_ptr(fld, seqtt);-
240 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
241 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
242 return 0;
executed 894 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
894
243 }
executed 47090 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
47090
244 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_SEQUENCE) {
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
245 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
246 return 0;
never executed: return 0;
0
247 }
executed 16200 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
16200
248-
249 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
250 i = asn1_cb(ASN1_OP_PRINT_POST, fld, it, &parg);-
251 if (i == 0)
i == 0Description
TRUEnever evaluated
FALSEevaluated 1607 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1607
252 return 0;
never executed: return 0;
0
253 }
executed 1607 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1607
254 break;
executed 16205 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
16205
255-
256 default:
never executed: default:
0
257 BIO_printf(out, "Unprocessed type %d\n", it->itype);-
258 return 0;
never executed: return 0;
0
259 }-
260-
261 return 1;
executed 87408 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
87408
262}-
263-
264static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,-
265 const ASN1_TEMPLATE *tt, const ASN1_PCTX *pctx)-
266{-
267 int i, flags;-
268 const char *sname, *fname;-
269 ASN1_VALUE *tfld;-
270 flags = tt->flags;-
271 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME)
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
272 sname = ASN1_ITEM_ptr(tt->item)->sname;
executed 54842 times by 1 test: sname = (tt->item)->sname;
Executed by:
  • libcrypto.so.1.1
54842
273 else-
274 sname = NULL;
executed 15 times by 1 test: sname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
15
275 if (pctx->flags & ASN1_PCTX_FLAGS_NO_FIELD_NAME)
pctx->flags & 0x040Description
TRUEnever evaluated
FALSEevaluated 54857 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-54857
276 fname = NULL;
never executed: fname = ((void *)0) ;
0
277 else-
278 fname = tt->field_name;
executed 54857 times by 1 test: fname = tt->field_name;
Executed by:
  • libcrypto.so.1.1
54857
279-
280 /*-
281 * If field is embedded then fld needs fixing so it is a pointer to-
282 * a pointer to a field.-
283 */-
284 if (flags & ASN1_TFLG_EMBED) {
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
285 tfld = (ASN1_VALUE *)fld;-
286 fld = &tfld;-
287 }
executed 5380 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5380
288-
289 if (flags & ASN1_TFLG_SK_MASK) {
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
290 char *tname;-
291 ASN1_VALUE *skitem;-
292 STACK_OF(ASN1_VALUE) *stack;-
293-
294 /* SET OF, SEQUENCE OF */-
295 if (fname) {
fnameDescription
TRUEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-8584
296 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_SSOF) {
pctx->flags & 0x004Description
TRUEevaluated 8584 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-8584
297 if (flags & ASN1_TFLG_SET_OF)
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
298 tname = "SET";
executed 2049 times by 1 test: tname = "SET";
Executed by:
  • libcrypto.so.1.1
2049
299 else-
300 tname = "SEQUENCE";
executed 6535 times by 1 test: tname = "SEQUENCE";
Executed by:
  • libcrypto.so.1.1
6535
301 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
302 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
303 return 0;
never executed: return 0;
0
304 } else if (BIO_printf(out, "%*s%s:\n", indent, "", fname) <= 0)
executed 8584 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
BIO_printf(out...", fname) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0-8584
305 return 0;
never executed: return 0;
0
306 }
executed 8584 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8584
307 stack = (STACK_OF(ASN1_VALUE) *)*fld;-
308 for (i = 0; i < sk_ASN1_VALUE_num(stack); i++) {
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
8326-38671
309 if ((i > 0) && (BIO_puts(out, "\n") <= 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
0-35150
310 return 0;
never executed: return 0;
0
311-
312 skitem = sk_ASN1_VALUE_value(stack, i);-
313 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
314 ASN1_ITEM_ptr(tt->item), NULL, NULL, 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
315 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
316 return 0;
executed 258 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
258
317 }
executed 38413 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
38413
318 if (i == 0 && BIO_printf(out, "%*s<%s>\n", indent + 2, "",
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... "EMPTY") <= 0Description
TRUEnever evaluated
FALSEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5063
319 stack == NULL ? "ABSENT" : "EMPTY") <= 0)
BIO_printf(out... "EMPTY") <= 0Description
TRUEnever evaluated
FALSEevaluated 5063 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5063
320 return 0;
never executed: return 0;
0
321 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_SEQUENCE) {
pctx->flags & 0x002Description
TRUEevaluated 8326 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-8326
322 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
323 return 0;
never executed: return 0;
0
324 }
executed 8326 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8326
325 return 1;
executed 8326 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
8326
326 }-
327 return asn1_item_print_ctx(out, fld, indent, ASN1_ITEM_ptr(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
328 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
329}-
330-
331static int asn1_print_fsname(BIO *out, int indent,-
332 const char *fname, const char *sname,-
333 const ASN1_PCTX *pctx)-
334{-
335 static const char spaces[] = " ";-
336 static const int nspaces = sizeof(spaces) - 1;-
337-
338 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
339 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
340 return 0;
never executed: return 0;
0
341 indent -= nspaces;-
342 }
executed 1017 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1017
343 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
344 return 0;
never executed: return 0;
0
345 if (pctx->flags & ASN1_PCTX_FLAGS_NO_STRUCT_NAME)
pctx->flags & 0x100Description
TRUEnever evaluated
FALSEevaluated 77464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-77464
346 sname = NULL;
never executed: sname = ((void *)0) ;
0
347 if (pctx->flags & ASN1_PCTX_FLAGS_NO_FIELD_NAME)
pctx->flags & 0x040Description
TRUEnever evaluated
FALSEevaluated 77464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-77464
348 fname = NULL;
never executed: fname = ((void *)0) ;
0
349 if (!sname && !fname)
!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
!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
350 return 1;
executed 23826 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
23826
351 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
352 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
353 return 0;
never executed: return 0;
0
354 }
executed 45208 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
45208
355 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
356 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
357 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
358 return 0;
never executed: return 0;
0
359 } else {
executed 45193 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
45193
360 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
361 return 0;
never executed: return 0;
0
362 }
executed 8430 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8430
363 }-
364 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
365 return 0;
never executed: return 0;
0
366 return 1;
executed 53638 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
53638
367}-
368-
369static int asn1_print_boolean(BIO *out, int boolval)-
370{-
371 const char *str;-
372 switch (boolval) {-
373 case -1:
executed 1062 times by 1 test: case -1:
Executed by:
  • libcrypto.so.1.1
1062
374 str = "BOOL ABSENT";-
375 break;
executed 1062 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1062
376-
377 case 0:
executed 566 times by 1 test: case 0:
Executed by:
  • libcrypto.so.1.1
566
378 str = "FALSE";-
379 break;
executed 566 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
566
380-
381 default:
executed 1063 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
1063
382 str = "TRUE";-
383 break;
executed 1063 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1063
384-
385 }-
386-
387 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
388 return 0;
never executed: return 0;
0
389 return 1;
executed 2691 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
2691
390-
391}-
392-
393static int asn1_print_integer(BIO *out, const ASN1_INTEGER *str)-
394{-
395 char *s;-
396 int ret = 1;-
397 s = i2s_ASN1_INTEGER(NULL, str);-
398 if (s == NULL)
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
399 return 0;
executed 38 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
38
400 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
401 ret = 0;
never executed: ret = 0;
0
402 OPENSSL_free(s);-
403 return ret;
executed 7608 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
7608
404}-
405-
406static int asn1_print_oid(BIO *out, const ASN1_OBJECT *oid)-
407{-
408 char objbuf[80];-
409 const char *ln;-
410 ln = OBJ_nid2ln(OBJ_obj2nid(oid));-
411 if (!ln)
!lnDescription
TRUEnever evaluated
FALSEevaluated 8946 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-8946
412 ln = "";
never executed: ln = "";
0
413 OBJ_obj2txt(objbuf, sizeof(objbuf), oid, 1);-
414 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
415 return 0;
never executed: return 0;
0
416 return 1;
executed 8946 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
8946
417}-
418-
419static int asn1_print_obstring(BIO *out, const ASN1_STRING *str, int indent)-
420{-
421 if (str->type == V_ASN1_BIT_STRING) {
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
422 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
423 return 0;
never executed: return 0;
0
424 } else if (BIO_puts(out, "\n") <= 0)
executed 1715 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
BIO_puts(out, "\n") <= 0Description
TRUEnever evaluated
FALSEevaluated 4230 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4230
425 return 0;
never executed: return 0;
0
426 if ((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
427 && 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
428 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
429 return 0;
never executed: return 0;
0
430 return 1;
executed 5945 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
5945
431}-
432-
433static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,-
434 const ASN1_ITEM *it, int indent,-
435 const char *fname, const char *sname,-
436 const ASN1_PCTX *pctx)-
437{-
438 long utype;-
439 ASN1_STRING *str;-
440 int ret = 1, needlf = 1;-
441 const char *pname;-
442 const ASN1_PRIMITIVE_FUNCS *pf;-
443 pf = it->funcs;-
444 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
445 return 0;
never executed: return 0;
0
446 if (pf && pf->prim_print)
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_printDescription
TRUEevaluated 12264 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-53477
447 return 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
448 if (it->itype == ASN1_ITYPE_MSTRING) {
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
449 str = (ASN1_STRING *)*fld;-
450 utype = str->type & ~V_ASN1_NEG;-
451 } else {
executed 3871 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3871
452 utype = it->utype;-
453 if (utype == V_ASN1_BOOLEAN)
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
454 str = NULL;
executed 2434 times by 1 test: str = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
2434
455 else-
456 str = (ASN1_STRING *)*fld;
executed 47172 times by 1 test: str = (ASN1_STRING *)*fld;
Executed by:
  • libcrypto.so.1.1
47172
457 }-
458 if (utype == V_ASN1_ANY) {
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
459 ASN1_TYPE *atype = (ASN1_TYPE *)*fld;-
460 utype = atype->type;-
461 fld = &atype->value.asn1_value;-
462 str = (ASN1_STRING *)*fld;-
463 if (pctx->flags & ASN1_PCTX_FLAGS_NO_ANY_TYPE)
pctx->flags & 0x010Description
TRUEnever evaluated
FALSEevaluated 28294 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-28294
464 pname = NULL;
never executed: pname = ((void *)0) ;
0
465 else-
466 pname = ASN1_tag2str(utype);
executed 28294 times by 1 test: pname = ASN1_tag2str(utype);
Executed by:
  • libcrypto.so.1.1
28294
467 } else {-
468 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_TYPE)
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
469 pname = ASN1_tag2str(utype);
executed 25178 times by 1 test: pname = ASN1_tag2str(utype);
Executed by:
  • libcrypto.so.1.1
25178
470 else-
471 pname = NULL;
executed 5 times by 1 test: pname = ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5
472 }-
473-
474 if (utype == V_ASN1_NULL) {
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
475 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
476 return 0;
never executed: return 0;
0
477 return 1;
executed 1694 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1694
478 }-
479-
480 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
481 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
482 return 0;
never executed: return 0;
0
483 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
484 return 0;
never executed: return 0;
0
485 }
executed 51778 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
51778
486-
487 switch (utype) {-
488 case V_ASN1_BOOLEAN:
executed 2691 times by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
2691
489 {-
490 int boolval = *(int *)fld;-
491 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
492 boolval = it->size;
executed 1062 times by 1 test: boolval = it->size;
Executed by:
  • libcrypto.so.1.1
1062
493 ret = asn1_print_boolean(out, boolval);-
494 }-
495 break;
executed 2691 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
2691
496-
497 case V_ASN1_INTEGER:
executed 7608 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
7608
498 case V_ASN1_ENUMERATED:
executed 38 times by 1 test: case 10:
Executed by:
  • libcrypto.so.1.1
38
499 ret = asn1_print_integer(out, str);-
500 break;
executed 7646 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
7646
501-
502 case V_ASN1_UTCTIME:
executed 1949 times by 1 test: case 23:
Executed by:
  • libcrypto.so.1.1
1949
503 ret = ASN1_UTCTIME_print(out, str);-
504 break;
executed 1949 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1949
505-
506 case V_ASN1_GENERALIZEDTIME:
executed 1304 times by 1 test: case 24:
Executed by:
  • libcrypto.so.1.1
1304
507 ret = ASN1_GENERALIZEDTIME_print(out, str);-
508 break;
executed 1304 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1304
509-
510 case V_ASN1_OBJECT:
executed 8946 times by 1 test: case 6:
Executed by:
  • libcrypto.so.1.1
8946
511 ret = asn1_print_oid(out, (const ASN1_OBJECT *)*fld);-
512 break;
executed 8946 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
8946
513-
514 case V_ASN1_OCTET_STRING:
executed 4230 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
4230
515 case V_ASN1_BIT_STRING:
executed 1715 times by 1 test: case 3:
Executed by:
  • libcrypto.so.1.1
1715
516 ret = asn1_print_obstring(out, str, indent);-
517 needlf = 0;-
518 break;
executed 5945 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
5945
519-
520 case V_ASN1_SEQUENCE:
executed 11569 times by 1 test: case 16:
Executed by:
  • libcrypto.so.1.1
11569
521 case V_ASN1_SET:
executed 764 times by 1 test: case 17:
Executed by:
  • libcrypto.so.1.1
764
522 case V_ASN1_OTHER:
executed 7955 times by 1 test: case -3:
Executed by:
  • libcrypto.so.1.1
7955
523 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
524 return 0;
never executed: return 0;
0
525 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
526 ret = 0;
executed 830 times by 1 test: ret = 0;
Executed by:
  • libcrypto.so.1.1
830
527 needlf = 0;-
528 break;
executed 20288 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
20288
529-
530 default:
executed 3014 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
3014
531 ret = ASN1_STRING_print_ex(out, str, pctx->str_flags);-
532-
533 }
executed 3014 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3014
534 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
535 return 0;
executed 1211 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1211
536 if (needlf && BIO_puts(out, "\n") <= 0)
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") <= 0Description
TRUEnever evaluated
FALSEevaluated 25169 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-25403
537 return 0;
never executed: return 0;
0
538 return 1;
executed 50572 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
50572
539}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2