OpenCoverage

a_strex.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/a_strex.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static int send_bio_chars(void *arg, const void *buf, int len)-
5{-
6 if (!arg
!argDescription
TRUEevaluated 139865 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 235228 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
139865-235228
7 return
executed 139865 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 139865 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
139865
8 if (BIO_write(arg, buf, len) != len
BIO_write(arg,...f, len) != lenDescription
TRUEnever evaluated
FALSEevaluated 235228 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-235228
9 return
never executed: return 0;
0;
never executed: return 0;
0
10 return
executed 235228 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 235228 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
235228
11}-
12-
13-
14static int send_fp_chars(void *arg, const void *buf, int len)-
15{-
16 if (!arg
!argDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
17 return
never executed: return 1;
1;
never executed: return 1;
0
18 if (fwrite(buf, 1, len, arg) != (unsigned int)len
fwrite(buf, 1,...signed int)lenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
19 return
never executed: return 0;
0;
never executed: return 0;
0
20 return
never executed: return 1;
1;
never executed: return 1;
0
21}-
22-
23-
24typedef int char_io (void *arg, const void *buf, int len);-
25-
26-
27-
28-
29-
30-
31-
32static int do_esc_char(unsigned long c, unsigned short flags, char *do_quotes,-
33 char_io *io_ch, void *arg)-
34{-
35 unsigned short chflgs;-
36 unsigned char chtmp;-
37 char tmphex[(sizeof(long)*2) + 3];-
38-
39 if (c > 0xffffffffL
c > 0xffffffffLDescription
TRUEnever evaluated
FALSEevaluated 274774 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-274774
40 return
never executed: return -1;
-1;
never executed: return -1;
0
41 if (c > 0xffff
c > 0xffffDescription
TRUEevaluated 209 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 274565 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
209-274565
42 BIO_snprintf(tmphex, sizeof(tmphex), "\\W%08lX", c);-
43 if (!io_ch(arg, tmphex, 10)
!io_ch(arg, tmphex, 10)Description
TRUEnever evaluated
FALSEevaluated 209 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-209
44 return
never executed: return -1;
-1;
never executed: return -1;
0
45 return
executed 209 times by 1 test: return 10;
Executed by:
  • libcrypto.so.1.1
10;
executed 209 times by 1 test: return 10;
Executed by:
  • libcrypto.so.1.1
209
46 }-
47 if (c > 0xff
c > 0xffDescription
TRUEevaluated 500 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 274065 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
500-274065
48 BIO_snprintf(tmphex, sizeof(tmphex), "\\U%04lX", c);-
49 if (!io_ch(arg, tmphex, 6)
!io_ch(arg, tmphex, 6)Description
TRUEnever evaluated
FALSEevaluated 500 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-500
50 return
never executed: return -1;
-1;
never executed: return -1;
0
51 return
executed 500 times by 1 test: return 6;
Executed by:
  • libcrypto.so.1.1
6;
executed 500 times by 1 test: return 6;
Executed by:
  • libcrypto.so.1.1
500
52 }-
53 chtmp = (unsigned char)c;-
54 if (chtmp > 0x7f
chtmp > 0x7fDescription
TRUEevaluated 122020 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 152045 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
122020-152045
55 chflgs = flags & 4;
executed 122020 times by 1 test: chflgs = flags & 4;
Executed by:
  • libcrypto.so.1.1
122020
56 else-
57 chflgs = char_type[chtmp] & flags;
executed 152045 times by 1 test: chflgs = char_type[chtmp] & flags;
Executed by:
  • libcrypto.so.1.1
152045
58 if (chflgs & (1 | 0x20 | 0x40)
chflgs & (1 | 0x20 | 0x40)Description
TRUEevaluated 2120 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 271945 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
2120-271945
59-
60 if (chflgs & 8
chflgs & 8Description
TRUEevaluated 1528 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 592 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
592-1528
61 if (do_quotes
do_quotesDescription
TRUEevaluated 764 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 764 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
764
62 *
executed 764 times by 1 test: *do_quotes = 1;
Executed by:
  • libcrypto.so.1.1
do_quotes = 1;
executed 764 times by 1 test: *do_quotes = 1;
Executed by:
  • libcrypto.so.1.1
764
63 if (!io_ch(arg, &chtmp, 1)
!io_ch(arg, &chtmp, 1)Description
TRUEnever evaluated
FALSEevaluated 1528 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1528
64 return
never executed: return -1;
-1;
never executed: return -1;
0
65 return
executed 1528 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1528 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1528
66 }-
67 if (!io_ch(arg, "\\", 1)
!io_ch(arg, "\\", 1)Description
TRUEnever evaluated
FALSEevaluated 592 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-592
68 return
never executed: return -1;
-1;
never executed: return -1;
0
69 if (!io_ch(arg, &chtmp, 1)
!io_ch(arg, &chtmp, 1)Description
TRUEnever evaluated
FALSEevaluated 592 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-592
70 return
never executed: return -1;
-1;
never executed: return -1;
0
71 return
executed 592 times by 1 test: return 2;
Executed by:
  • libcrypto.so.1.1
2;
executed 592 times by 1 test: return 2;
Executed by:
  • libcrypto.so.1.1
592
72 }-
73 if (chflgs & (2
chflgs & (2 | 4 | 0x400)Description
TRUEevaluated 124188 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 147757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
124188-147757
74 | 4
chflgs & (2 | 4 | 0x400)Description
TRUEevaluated 124188 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 147757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
124188-147757
75 | 0x400)
chflgs & (2 | 4 | 0x400)Description
TRUEevaluated 124188 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 147757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
124188-147757
76 BIO_snprintf(tmphex, 11, "\\%02X", chtmp);-
77 if (!io_ch(arg, tmphex, 3)
!io_ch(arg, tmphex, 3)Description
TRUEnever evaluated
FALSEevaluated 124188 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-124188
78 return
never executed: return -1;
-1;
never executed: return -1;
0
79 return
executed 124188 times by 1 test: return 3;
Executed by:
  • libcrypto.so.1.1
3;
executed 124188 times by 1 test: return 3;
Executed by:
  • libcrypto.so.1.1
124188
80 }-
81-
82-
83-
84-
85 if (chtmp == '\\'
chtmp == '\\'Description
TRUEevaluated 256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 147501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(flags & (1 | ... | 8 | 2 | 4))Description
TRUEnever evaluated
FALSEevaluated 256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
flags & (1 | 0x400 | 8 | 2 | 4))
(flags & (1 | ... | 8 | 2 | 4))Description
TRUEnever evaluated
FALSEevaluated 256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-147501
86 if (!io_ch(arg, "\\\\", 2)
!io_ch(arg, "\\\\", 2)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
87 return
never executed: return -1;
-1;
never executed: return -1;
0
88 return
never executed: return 2;
2;
never executed: return 2;
0
89 }-
90 if (!io_ch(arg, &chtmp, 1)
!io_ch(arg, &chtmp, 1)Description
TRUEnever evaluated
FALSEevaluated 147757 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-147757
91 return
never executed: return -1;
-1;
never executed: return -1;
0
92 return
executed 147757 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 147757 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
147757
93}-
94static int do_buf(unsigned char *buf, int buflen,-
95 int type, unsigned short flags, char *quotes, char_io *io_ch,-
96 void *arg)-
97{-
98 int i, outlen, len, charwidth;-
99 unsigned short orflags;-
100 unsigned char *p, *q;-
101 unsigned long c;-
102-
103 p = buf;-
104 q = buf + buflen;-
105 outlen = 0;-
106 charwidth = type & 0x7;-
107-
108 switch (charwidth) {-
109 case
executed 3476 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
4:
executed 3476 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
3476
110 if (buflen & 3
buflen & 3Description
TRUEnever evaluated
FALSEevaluated 3476 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-3476
111 ERR_put_error(13,(142),(133),__FILE__,155);-
112 return
never executed: return -1;
-1;
never executed: return -1;
0
113 }-
114 break;
executed 3476 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
3476
115 case
executed 6574 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
2:
executed 6574 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
6574
116 if (buflen & 1
buflen & 1Description
TRUEnever evaluated
FALSEevaluated 6574 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-6574
117 ERR_put_error(13,(142),(129),__FILE__,161);-
118 return
never executed: return -1;
-1;
never executed: return -1;
0
119 }-
120 break;
executed 6574 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
6574
121 default
executed 19623 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
:
executed 19623 times by 1 test: default:
Executed by:
  • libcrypto.so.1.1
19623
122 break;
executed 19623 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
19623
123 }-
124-
125 while (p != q
p != qDescription
TRUEevaluated 199023 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24336 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
24336-199023
126 if (p == buf
p == bufDescription
TRUEevaluated 22559 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 176464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& flags & 1
flags & 1Description
TRUEevaluated 16274 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
6285-176464
127 orflags = 0x20;
executed 16274 times by 1 test: orflags = 0x20;
Executed by:
  • libcrypto.so.1.1
16274
128 else-
129 orflags = 0;
executed 182749 times by 1 test: orflags = 0;
Executed by:
  • libcrypto.so.1.1
182749
130-
131 switch (charwidth) {-
132 case
executed 1186 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
4:
executed 1186 times by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
1186
133 c = ((unsigned long)*p++) << 24;-
134 c |= ((unsigned long)*p++) << 16;-
135 c |= ((unsigned long)*p++) << 8;-
136 c |= *p++;-
137 break;
executed 1186 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1186
138-
139 case
executed 38246 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
2:
executed 38246 times by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
38246
140 c = ((unsigned long)*p++) << 8;-
141 c |= *p++;-
142 break;
executed 38246 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
38246
143-
144 case
executed 147420 times by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
1:
executed 147420 times by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
147420
145 c = *p++;-
146 break;
executed 147420 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
147420
147-
148 case
executed 12171 times by 1 test: case 0:
Executed by:
  • libcrypto.so.1.1
0:
executed 12171 times by 1 test: case 0:
Executed by:
  • libcrypto.so.1.1
12171
149 i = UTF8_getc(p, buflen, &c);-
150 if (i < 0
i < 0Description
TRUEevaluated 5337 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6834 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
5337-6834
151 return
executed 5337 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
-1;
executed 5337 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
5337
152 buflen -= i;-
153 p += i;-
154 break;
executed 6834 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
6834
155 default
never executed: default:
:
never executed: default:
0
156 return
never executed: return -1;
-1;
never executed: return -1;
0
157 }-
158 if (p == q
p == qDescription
TRUEevaluated 17222 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 176464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& flags & 1
flags & 1Description
TRUEevaluated 16274 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 948 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
948-176464
159 orflags = 0x40;
executed 16274 times by 1 test: orflags = 0x40;
Executed by:
  • libcrypto.so.1.1
16274
160 if (type & 0x8
type & 0x8Description
TRUEevaluated 80090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 113596 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
80090-113596
161 unsigned char utfbuf[6];-
162 int utflen;-
163 utflen = UTF8_putc(utfbuf, sizeof(utfbuf), c);-
164 for (i = 0; i < utflen
i < utflenDescription
TRUEevaluated 161178 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 80090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
80090-161178
165-
166-
167-
168-
169-
170-
171 len = do_esc_char(utfbuf[i], flags | orflags, quotes,-
172 io_ch, arg);-
173 if (len < 0
len < 0Description
TRUEnever evaluated
FALSEevaluated 161178 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-161178
174 return
never executed: return -1;
-1;
never executed: return -1;
0
175 outlen += len;-
176 }
executed 161178 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
161178
177 }
executed 80090 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
80090
178 len = do_esc_char(c, flags | orflags, quotes,-
179 io_ch, arg);-
180 if (len < 0
len < 0Description
TRUEnever evaluated
FALSEevaluated 113596 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-113596
181 return
never executed: return -1;
-1;
never executed: return -1;
0
182 outlen += len;-
183 }
executed 113596 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
113596
184 }-
185 return
executed 24336 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
outlen;
executed 24336 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
24336
186}-
187-
188-
189-
190static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf,-
191 int buflen)-
192{-
193 static const char hexdig[] = "0123456789ABCDEF";-
194 unsigned char *p, *q;-
195 char hextmp[2];-
196 if (arg
argDescription
TRUEevaluated 6930 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-6930
197 p = buf;-
198 q = buf + buflen;-
199 while (p != q
p != qDescription
TRUEevaluated 44616 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6930 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
6930-44616
200 hextmp[0] = hexdig[*p >> 4];-
201 hextmp[1] = hexdig[*p & 0xf];-
202 if (!io_ch(arg, hextmp, 2)
!io_ch(arg, hextmp, 2)Description
TRUEnever evaluated
FALSEevaluated 44616 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-44616
203 return
never executed: return -1;
-1;
never executed: return -1;
0
204 p++;-
205 }
executed 44616 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
44616
206 }
executed 6930 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
6930
207 return
executed 6930 times by 1 test: return buflen << 1;
Executed by:
  • libcrypto.so.1.1
buflen << 1;
executed 6930 times by 1 test: return buflen << 1;
Executed by:
  • libcrypto.so.1.1
6930
208}-
209-
210-
211-
212-
213-
214-
215-
216static int do_dump(unsigned long lflags, char_io *io_ch, void *arg,-
217 const ASN1_STRING *str)-
218{-
219-
220-
221-
222-
223 ASN1_TYPE t;-
224 unsigned char *der_buf, *p;-
225 int outlen, der_len;-
226-
227 if (!io_ch(arg, "#", 1)
!io_ch(arg, "#", 1)Description
TRUEnever evaluated
FALSEevaluated 6930 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-6930
228 return
never executed: return -1;
-1;
never executed: return -1;
0
229-
230 if (!(lflags & 0x200)
!(lflags & 0x200)Description
TRUEevaluated 3014 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3014-3916
231 outlen = do_hex_dump(io_ch, arg, str->data, str->length);-
232 if (outlen < 0
outlen < 0Description
TRUEnever evaluated
FALSEevaluated 3014 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3014
233 return
never executed: return -1;
-1;
never executed: return -1;
0
234 return
executed 3014 times by 1 test: return outlen + 1;
Executed by:
  • libcrypto.so.1.1
outlen + 1;
executed 3014 times by 1 test: return outlen + 1;
Executed by:
  • libcrypto.so.1.1
3014
235 }-
236 t.type = str->type;-
237 t.value.ptr = (char *)str;-
238 der_len = i2d_ASN1_TYPE(&t, -
239 ((void *)0)-
240 );-
241 if ((
(der_buf = CRY...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
der_buf = CRYPTO_malloc(der_len, __FILE__, 283)) ==
(der_buf = CRY...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3916
242 ((void *)0)
(der_buf = CRY...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3916
243 ) {-
244 ERR_put_error(13,(125),((1|64)),__FILE__,284);-
245 return
never executed: return -1;
-1;
never executed: return -1;
0
246 }-
247 p = der_buf;-
248 i2d_ASN1_TYPE(&t, &p);-
249 outlen = do_hex_dump(io_ch, arg, der_buf, der_len);-
250 CRYPTO_free(der_buf, __FILE__, 290);-
251 if (outlen < 0
outlen < 0Description
TRUEnever evaluated
FALSEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3916
252 return
never executed: return -1;
-1;
never executed: return -1;
0
253 return
executed 3916 times by 1 test: return outlen + 1;
Executed by:
  • libcrypto.so.1.1
outlen + 1;
executed 3916 times by 1 test: return outlen + 1;
Executed by:
  • libcrypto.so.1.1
3916
254}-
255-
256-
257-
258-
259-
260-
261-
262static const signed char tag2nbyte[] = {-
263 -1, -1, -1, -1, -1,-
264 -1, -1, -1, -1, -1,-
265 -1, -1,-
266 0,-
267 -1, -1, -1, -1, -1,-
268 1,-
269 1,-
270 1,-
271 -1,-
272 1,-
273 1,-
274 1,-
275 -1,-
276 1,-
277 -1,-
278 4,-
279 -1,-
280 2-
281};-
282-
283-
284-
285-
286-
287-
288-
289static int do_print_ex(char_io *io_ch, void *arg, unsigned long lflags,-
290 const ASN1_STRING *str)-
291{-
292 int outlen, len;-
293 int type;-
294 char quotes;-
295 unsigned short flags;-
296 quotes = 0;-
297-
298 flags = (unsigned short)(lflags & (1 | 0x400 | 8 | 2 | 4));-
299-
300 type = str->type;-
301-
302 outlen = 0;-
303-
304 if (lflags & 0x40
lflags & 0x40Description
TRUEevaluated 3014 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21421 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3014-21421
305 const char *tagname;-
306 tagname = ASN1_tag2str(type);-
307 outlen += strlen(tagname);-
308 if (!io_ch(arg, tagname, outlen)
!io_ch(arg, tagname, outlen)Description
TRUEnever evaluated
FALSEevaluated 3014 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !io_ch(arg, ":", 1)
!io_ch(arg, ":", 1)Description
TRUEnever evaluated
FALSEevaluated 3014 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3014
309 return
never executed: return -1;
-1;
never executed: return -1;
0
310 outlen++;-
311 }
executed 3014 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3014
312-
313-
314-
315-
316 if (lflags & 0x80
lflags & 0x80Description
TRUEevaluated 3014 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21421 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
3014-21421
317 type = -1;
executed 3014 times by 1 test: type = -1;
Executed by:
  • libcrypto.so.1.1
3014
318-
319 else if (lflags & 0x20
lflags & 0x20Description
TRUEnever evaluated
FALSEevaluated 21421 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21421
320 type = 1;
never executed: type = 1;
0
321 else {-
322-
323 if ((
(type > 0)Description
TRUEevaluated 21421 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
type > 0)
(type > 0)Description
TRUEevaluated 21421 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& (
(type < 31)Description
TRUEevaluated 21181 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 240 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
type < 31)
(type < 31)Description
TRUEevaluated 21181 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 240 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21421
324 type = tag2nbyte[type];
executed 21181 times by 1 test: type = tag2nbyte[type];
Executed by:
  • libcrypto.so.1.1
21181
325 else-
326 type = -1;
executed 240 times by 1 test: type = -1;
Executed by:
  • libcrypto.so.1.1
240
327 if ((
(type == -1)Description
TRUEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 17505 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
type == -1)
(type == -1)Description
TRUEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 17505 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !(lflags & 0x100)
!(lflags & 0x100)Description
TRUEnever evaluated
FALSEevaluated 3916 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-17505
328 type = 1;
never executed: type = 1;
0
329 }
executed 21421 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
21421
330-
331 if (type == -1
type == -1Description
TRUEevaluated 6930 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 17505 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
6930-17505
332 len = do_dump(lflags, io_ch, arg, str);-
333 if (len < 0
len < 0Description
TRUEnever evaluated
FALSEevaluated 6930 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-6930
334 return
never executed: return -1;
-1;
never executed: return -1;
0
335 outlen += len;-
336 return
executed 6930 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
outlen;
executed 6930 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
6930
337 }-
338-
339 if (lflags & 0x10
lflags & 0x10Description
TRUEevaluated 11301 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6204 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
6204-11301
340-
341-
342-
343-
344-
345 if (!type
!typeDescription
TRUEevaluated 3204 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8097 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
3204-8097
346 type = 1;
executed 3204 times by 1 test: type = 1;
Executed by:
  • libcrypto.so.1.1
3204
347 else-
348 type |= 0x8;
executed 8097 times by 1 test: type |= 0x8;
Executed by:
  • libcrypto.so.1.1
8097
349 }-
350-
351 len = do_buf(str->data, str->length, type, flags, &quotes, io_ch, -
352 ((void *)0)-
353 );-
354 if (len < 0
len < 0Description
TRUEevaluated 5337 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12168 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
5337-12168
355 return
executed 5337 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
-1;
executed 5337 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
5337
356 outlen += len;-
357 if (quotes
quotesDescription
TRUEevaluated 578 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11590 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
578-11590
358 outlen += 2;
executed 578 times by 1 test: outlen += 2;
Executed by:
  • libcrypto.so.1.1
578
359 if (!arg
!argDescription
TRUEnever evaluated
FALSEevaluated 12168 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-12168
360 return
never executed: return outlen;
outlen;
never executed: return outlen;
0
361 if (quotes
quotesDescription
TRUEevaluated 578 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11590 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !io_ch(arg, "\"", 1)
!io_ch(arg, "\"", 1)Description
TRUEnever evaluated
FALSEevaluated 578 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-11590
362 return
never executed: return -1;
-1;
never executed: return -1;
0
363 if (do_buf(str->data, str->length, type, flags,
do_buf(str->da...o_ch, arg) < 0Description
TRUEnever evaluated
FALSEevaluated 12168 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-12168
364 ((void *)0)
do_buf(str->da...o_ch, arg) < 0Description
TRUEnever evaluated
FALSEevaluated 12168 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-12168
365 , io_ch, arg) < 0
do_buf(str->da...o_ch, arg) < 0Description
TRUEnever evaluated
FALSEevaluated 12168 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-12168
366 return
never executed: return -1;
-1;
never executed: return -1;
0
367 if (quotes
quotesDescription
TRUEevaluated 578 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11590 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !io_ch(arg, "\"", 1)
!io_ch(arg, "\"", 1)Description
TRUEnever evaluated
FALSEevaluated 578 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-11590
368 return
never executed: return -1;
-1;
never executed: return -1;
0
369 return
executed 12168 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
outlen;
executed 12168 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
12168
370}-
371-
372-
373-
374static int do_indent(char_io *io_ch, void *arg, int indent)-
375{-
376 int i;-
377 for (i = 0; i < indent
i < indentDescription
TRUEevaluated 175 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12100 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++)
175-12100
378 if (!io_ch(arg, " ", 1)
!io_ch(arg, " ", 1)Description
TRUEnever evaluated
FALSEevaluated 175 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-175
379 return
never executed: return 0;
0;
never executed: return 0;
0
380 return
executed 12100 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 12100 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
12100
381}-
382-
383-
384-
385-
386static int do_name_ex(char_io *io_ch, void *arg, const X509_NAME *n,-
387 int indent, unsigned long flags)-
388{-
389 int i, prev = -1, orflags, cnt;-
390 int fn_opt, fn_nid;-
391 ASN1_OBJECT *fn;-
392 const ASN1_STRING *val;-
393 const X509_NAME_ENTRY *ent;-
394 char objtmp[80];-
395 const char *objbuf;-
396 int outlen, len;-
397 char *sep_dn, *sep_mv, *sep_eq;-
398 int sep_dn_len, sep_mv_len, sep_eq_len;-
399 if (indent < 0
indent < 0Description
TRUEnever evaluated
FALSEevaluated 7182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-7182
400 indent = 0;
never executed: indent = 0;
0
401 outlen = indent;-
402 if (!do_indent(io_ch, arg, indent)
!do_indent(io_ch, arg, indent)Description
TRUEnever evaluated
FALSEevaluated 7182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-7182
403 return
never executed: return -1;
-1;
never executed: return -1;
0
404 switch (flags & (0xf << 16)) {-
405 case
executed 2 times by 1 test: case (4 << 16):
Executed by:
  • libcrypto.so.1.1
(4 << 16):
executed 2 times by 1 test: case (4 << 16):
Executed by:
  • libcrypto.so.1.1
2
406 sep_dn = "\n";-
407 sep_dn_len = 1;-
408 sep_mv = " + ";-
409 sep_mv_len = 3;-
410 break;
executed 2 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
2
411-
412 case
never executed: case (1 << 16):
(1 << 16):
never executed: case (1 << 16):
0
413 sep_dn = ",";-
414 sep_dn_len = 1;-
415 sep_mv = "+";-
416 sep_mv_len = 1;-
417 indent = 0;-
418 break;
never executed: break;
0
419-
420 case
executed 7180 times by 1 test: case (2 << 16):
Executed by:
  • libcrypto.so.1.1
(2 << 16):
executed 7180 times by 1 test: case (2 << 16):
Executed by:
  • libcrypto.so.1.1
7180
421 sep_dn = ", ";-
422 sep_dn_len = 2;-
423 sep_mv = " + ";-
424 sep_mv_len = 3;-
425 indent = 0;-
426 break;
executed 7180 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
7180
427-
428 case
never executed: case (3 << 16):
(3 << 16):
never executed: case (3 << 16):
0
429 sep_dn = "; ";-
430 sep_dn_len = 2;-
431 sep_mv = " + ";-
432 sep_mv_len = 3;-
433 indent = 0;-
434 break;
never executed: break;
0
435-
436 default
never executed: default:
:
never executed: default:
0
437 return
never executed: return -1;
-1;
never executed: return -1;
0
438 }-
439-
440 if (flags & (1 << 23)
flags & (1 << 23)Description
TRUEevaluated 7177 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-7177
441 sep_eq = " = ";-
442 sep_eq_len = 3;-
443 }
executed 7177 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
7177
444 sep_eq = "=";-
445 sep_eq_len = 1;-
446 }
executed 5 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
5
447-
448 fn_opt = flags & (0x3 << 21);-
449-
450 cnt = X509_NAME_entry_count(n);-
451 for (i = 0; i < cnt
i < cntDescription
TRUEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
7182-15238
452 if (flags & (1 << 20)
flags & (1 << 20)Description
TRUEnever evaluated
FALSEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-15238
453 ent = X509_NAME_get_entry(n, cnt - i - 1);
never executed: ent = X509_NAME_get_entry(n, cnt - i - 1);
0
454 else-
455 ent = X509_NAME_get_entry(n, i);
executed 15238 times by 1 test: ent = X509_NAME_get_entry(n, i);
Executed by:
  • libcrypto.so.1.1
15238
456 if (prev != -1
prev != -1Description
TRUEevaluated 10346 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4892 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4892-10346
457 if (prev == X509_NAME_ENTRY_set(ent)
prev == X509_N...ENTRY_set(ent)Description
TRUEevaluated 5435 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4911 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4911-5435
458 if (!io_ch(arg, sep_mv, sep_mv_len)
!io_ch(arg, se...v, sep_mv_len)Description
TRUEnever evaluated
FALSEevaluated 5435 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5435
459 return
never executed: return -1;
-1;
never executed: return -1;
0
460 outlen += sep_mv_len;-
461 }
executed 5435 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
5435
462 if (!io_ch(arg, sep_dn, sep_dn_len)
!io_ch(arg, se...n, sep_dn_len)Description
TRUEnever evaluated
FALSEevaluated 4911 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4911
463 return
never executed: return -1;
-1;
never executed: return -1;
0
464 outlen += sep_dn_len;-
465 if (!do_indent(io_ch, arg, indent)
!do_indent(io_ch, arg, indent)Description
TRUEnever evaluated
FALSEevaluated 4911 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4911
466 return
never executed: return -1;
-1;
never executed: return -1;
0
467 outlen += indent;-
468 }
executed 4911 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
4911
469 }-
470 prev = X509_NAME_ENTRY_set(ent);-
471 fn = X509_NAME_ENTRY_get_object(ent);-
472 val = X509_NAME_ENTRY_get_data(ent);-
473 fn_nid = OBJ_obj2nid(fn);-
474 if (fn_opt != (3 << 21)
fn_opt != (3 << 21)Description
TRUEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-15238
475 int objlen, fld_len;-
476 if ((
(fn_opt == (2 << 21))Description
TRUEnever evaluated
FALSEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
fn_opt == (2 << 21))
(fn_opt == (2 << 21))Description
TRUEnever evaluated
FALSEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (
(fn_nid == 0)Description
TRUEevaluated 8233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7005 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
fn_nid == 0)
(fn_nid == 0)Description
TRUEevaluated 8233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7005 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-15238
477 OBJ_obj2txt(objtmp, sizeof(objtmp), fn, 1);-
478 fld_len = 0;-
479 objbuf = objtmp;-
480 }
executed 8233 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
8233
481 if (fn_opt == 0
fn_opt == 0Description
TRUEevaluated 6998 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
7-6998
482 fld_len = 10;-
483 objbuf = OBJ_nid2sn(fn_nid);-
484 }
executed 6998 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (fn_opt == (1 << 21)
fn_opt == (1 << 21)Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-6998
485 fld_len = 25;-
486 objbuf = OBJ_nid2ln(fn_nid);-
487 }
executed 7 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
7
488 fld_len = 0;-
489 objbuf = "";-
490 }
never executed: end of block
0
491 }-
492 objlen = strlen(objbuf);-
493 if (!io_ch(arg, objbuf, objlen)
!io_ch(arg, objbuf, objlen)Description
TRUEnever evaluated
FALSEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-15238
494 return
never executed: return -1;
-1;
never executed: return -1;
0
495 if ((
(objlen < fld_len)Description
TRUEevaluated 4090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11148 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
objlen < fld_len)
(objlen < fld_len)Description
TRUEevaluated 4090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11148 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(flags & (1 << 25))Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
flags & (1 << 25))
(flags & (1 << 25))Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
7-11148
496 if (!do_indent(io_ch, arg, fld_len - objlen)
!do_indent(io_..._len - objlen)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-7
497 return
never executed: return -1;
-1;
never executed: return -1;
0
498 outlen += fld_len - objlen;-
499 }
executed 7 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
7
500 if (!io_ch(arg, sep_eq, sep_eq_len)
!io_ch(arg, se...q, sep_eq_len)Description
TRUEnever evaluated
FALSEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-15238
501 return
never executed: return -1;
-1;
never executed: return -1;
0
502 outlen += objlen + sep_eq_len;-
503 }
executed 15238 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
15238
504-
505-
506-
507-
508-
509 if ((
(fn_nid == 0)Description
TRUEevaluated 8233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7005 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
fn_nid == 0)
(fn_nid == 0)Description
TRUEevaluated 8233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7005 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(flags & (1 << 24))Description
TRUEnever evaluated
FALSEevaluated 8233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
flags & (1 << 24))
(flags & (1 << 24))Description
TRUEnever evaluated
FALSEevaluated 8233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-8233
510 orflags = 0x80;
never executed: orflags = 0x80;
0
511 else-
512 orflags = 0;
executed 15238 times by 1 test: orflags = 0;
Executed by:
  • libcrypto.so.1.1
15238
513-
514 len = do_print_ex(io_ch, arg, flags | orflags, val);-
515 if (len < 0
len < 0Description
TRUEnever evaluated
FALSEevaluated 15238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-15238
516 return
never executed: return -1;
-1;
never executed: return -1;
0
517 outlen += len;-
518 }
executed 15238 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
15238
519 return
executed 7182 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
outlen;
executed 7182 times by 1 test: return outlen;
Executed by:
  • libcrypto.so.1.1
7182
520}-
521-
522-
523-
524int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent,-
525 unsigned long flags)-
526{-
527 if (flags == 0
flags == 0Description
TRUEevaluated 5796 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
5796-7182
528 return
executed 5796 times by 1 test: return X509_NAME_print(out, nm, indent);
Executed by:
  • libcrypto.so.1.1
X509_NAME_print(out, nm, indent);
executed 5796 times by 1 test: return X509_NAME_print(out, nm, indent);
Executed by:
  • libcrypto.so.1.1
5796
529 return
executed 7182 times by 1 test: return do_name_ex(send_bio_chars, out, nm, indent, flags);
Executed by:
  • libcrypto.so.1.1
do_name_ex(send_bio_chars, out, nm, indent, flags);
executed 7182 times by 1 test: return do_name_ex(send_bio_chars, out, nm, indent, flags);
Executed by:
  • libcrypto.so.1.1
7182
530}-
531-
532-
533int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,-
534 unsigned long flags)-
535{-
536 if (flags == 0
flags == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
537 BIO *btmp;-
538 int ret;-
539 btmp = BIO_new_fp(fp, 0x00);-
540 if (!btmp
!btmpDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
541 return
never executed: return -1;
-1;
never executed: return -1;
0
542 ret = X509_NAME_print(btmp, nm, indent);-
543 BIO_free(btmp);-
544 return
never executed: return ret;
ret;
never executed: return ret;
0
545 }-
546 return
never executed: return do_name_ex(send_fp_chars, fp, nm, indent, flags);
do_name_ex(send_fp_chars, fp, nm, indent, flags);
never executed: return do_name_ex(send_fp_chars, fp, nm, indent, flags);
0
547}-
548-
549-
550int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags)-
551{-
552 return
executed 9197 times by 1 test: return do_print_ex(send_bio_chars, out, flags, str);
Executed by:
  • libcrypto.so.1.1
do_print_ex(send_bio_chars, out, flags, str);
executed 9197 times by 1 test: return do_print_ex(send_bio_chars, out, flags, str);
Executed by:
  • libcrypto.so.1.1
9197
553}-
554-
555-
556int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags)-
557{-
558 return
never executed: return do_print_ex(send_fp_chars, fp, flags, str);
do_print_ex(send_fp_chars, fp, flags, str);
never executed: return do_print_ex(send_fp_chars, fp, flags, str);
0
559}-
560-
561-
562-
563-
564-
565-
566-
567int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in)-
568{-
569 ASN1_STRING stmp, *str = &stmp;-
570 int mbflag, type, ret;-
571 if (!in
!inDescription
TRUEnever evaluated
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-154154
572 return
never executed: return -1;
-1;
never executed: return -1;
0
573 type = in->type;-
574 if ((
(type < 0)Description
TRUEnever evaluated
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
type < 0)
(type < 0)Description
TRUEnever evaluated
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (
(type > 30)Description
TRUEnever evaluated
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
type > 30)
(type > 30)Description
TRUEnever evaluated
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-154154
575 return
never executed: return -1;
-1;
never executed: return -1;
0
576 mbflag = tag2nbyte[type];-
577 if (mbflag == -1
mbflag == -1Description
TRUEnever evaluated
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-154154
578 return
never executed: return -1;
-1;
never executed: return -1;
0
579 mbflag |= 0x1000;-
580 stmp.data = -
581 ((void *)0)-
582 ;-
583 stmp.length = 0;-
584 stmp.flags = 0;-
585 ret =-
586 ASN1_mbstring_copy(&str, in->data, in->length, mbflag,-
587 0x2000);-
588 if (ret < 0
ret < 0Description
TRUEevaluated 4656 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 149498 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4656-149498
589 return
executed 4656 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 4656 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
4656
590 *out = stmp.data;-
591 return
executed 149498 times by 1 test: return stmp.length;
Executed by:
  • libcrypto.so.1.1
stmp.length;
executed 149498 times by 1 test: return stmp.length;
Executed by:
  • libcrypto.so.1.1
149498
592}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2