OpenCoverage

x_name.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509/x_name.c
Switch to Source codePreprocessed file
LineSourceCount
1static int x509_name_ex_d2i(ASN1_VALUE **val,-
2 const unsigned char **in, long len,-
3 const ASN1_ITEM *it,-
4 int tag, int aclass, char opt, ASN1_TLC *ctx);-
5-
6static int x509_name_ex_i2d(ASN1_VALUE **val, unsigned char **out,-
7 const ASN1_ITEM *it, int tag, int aclass);-
8static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it);-
9static void x509_name_ex_free(ASN1_VALUE **val, const ASN1_ITEM *it);-
10-
11static int x509_name_encode(X509_NAME *a);-
12static int x509_name_canon(X509_NAME *a);-
13static int asn1_string_canon(ASN1_STRING *out, const ASN1_STRING *in);-
14static int i2d_name_canon(struct stack_st_STACK_OF_X509_NAME_ENTRY * intname,-
15 unsigned char **in);-
16-
17static int x509_name_ex_print(BIO *out, ASN1_VALUE **pval,-
18 int indent,-
19 const char *fname, const ASN1_PCTX *pctx);-
20-
21static const ASN1_TEMPLATE X509_NAME_ENTRY_seq_tt[] = {-
22 { (0), (0), -
23 __builtin_offsetof (-
24 X509_NAME_ENTRY-
25 , -
26 object-
27 )-
28 , "object", (&(ASN1_OBJECT_it)) },-
29 { (0), (0), -
30 __builtin_offsetof (-
31 X509_NAME_ENTRY-
32 , -
33 value-
34 )-
35 , "value", (&(ASN1_PRINTABLE_it)) }-
36} ; const ASN1_ITEM X509_NAME_ENTRY_it = { 0x1, 16, X509_NAME_ENTRY_seq_tt, sizeof(X509_NAME_ENTRY_seq_tt) / sizeof(ASN1_TEMPLATE), -
37 ((void *)0)-
38 , sizeof(X509_NAME_ENTRY), "X509_NAME_ENTRY" };-
39-
40X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, const unsigned char **in, long len) { return
never executed: return (X509_NAME_ENTRY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(X509_NAME_ENTRY_it)));
(X509_NAME_ENTRY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(X509_NAME_ENTRY_it)));
never executed: return (X509_NAME_ENTRY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(X509_NAME_ENTRY_it)));
} int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **out) { return
never executed: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(X509_NAME_ENTRY_it)));
ASN1_item_i2d((ASN1_VALUE *)a, out, (&(X509_NAME_ENTRY_it)));
never executed: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(X509_NAME_ENTRY_it)));
} X509_NAME_ENTRY *X509_NAME_ENTRY_new(void) { return
executed 120966 times by 1 test: return (X509_NAME_ENTRY *)ASN1_item_new((&(X509_NAME_ENTRY_it)));
Executed by:
  • libcrypto.so.1.1
(X509_NAME_ENTRY *)ASN1_item_new((&(X509_NAME_ENTRY_it)));
executed 120966 times by 1 test: return (X509_NAME_ENTRY *)ASN1_item_new((&(X509_NAME_ENTRY_it)));
Executed by:
  • libcrypto.so.1.1
} void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a) { ASN1_item_free((ASN1_VALUE *)a, (&(X509_NAME_ENTRY_it))); }
executed 272317 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
0-272317
41X509_NAME_ENTRY * X509_NAME_ENTRY_dup(X509_NAME_ENTRY *x) { return
executed 19686 times by 1 test: return ASN1_item_dup((&(X509_NAME_ENTRY_it)), x);
Executed by:
  • libcrypto.so.1.1
ASN1_item_dup((&(X509_NAME_ENTRY_it)), x);
executed 19686 times by 1 test: return ASN1_item_dup((&(X509_NAME_ENTRY_it)), x);
Executed by:
  • libcrypto.so.1.1
}
19686
42-
43-
44-
45-
46-
47-
48static const ASN1_TEMPLATE X509_NAME_ENTRIES_item_tt =-
49 { ((0x1 << 1)), (0), 0, "RDNS", (&(X509_NAME_ENTRY_it)) }-
50; static const ASN1_ITEM X509_NAME_ENTRIES_it = { 0x0, -1, &X509_NAME_ENTRIES_item_tt, 0, -
51((void *)0)-
52, 0, "X509_NAME_ENTRIES" };-
53-
54static const ASN1_TEMPLATE X509_NAME_INTERNAL_item_tt =-
55 { ((0x2 << 1)), (0), 0, "Name", (&(X509_NAME_ENTRIES_it)) }-
56; static const ASN1_ITEM X509_NAME_INTERNAL_it = { 0x0, -1, &X509_NAME_INTERNAL_item_tt, 0, -
57((void *)0)-
58, 0, "X509_NAME_INTERNAL" };-
59static const ASN1_EXTERN_FUNCS x509_name_ff = {-
60 -
61 ((void *)0)-
62 ,-
63 x509_name_ex_new,-
64 x509_name_ex_free,-
65 0,-
66 x509_name_ex_d2i,-
67 x509_name_ex_i2d,-
68 x509_name_ex_print-
69};-
70-
71const ASN1_ITEM X509_NAME_it = { 0x4, 16, -
72((void *)0)-
73, 0, &x509_name_ff, 0, "X509_NAME" };-
74-
75X509_NAME *d2i_X509_NAME(X509_NAME **a, const unsigned char **in, long len) { return
executed 50 times by 1 test: return (X509_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(X509_NAME_it)));
Executed by:
  • libcrypto.so.1.1
(X509_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(X509_NAME_it)));
executed 50 times by 1 test: return (X509_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(X509_NAME_it)));
Executed by:
  • libcrypto.so.1.1
} int i2d_X509_NAME(X509_NAME *a, unsigned char **out) { return
executed 5217 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(X509_NAME_it)));
Executed by:
  • libcrypto.so.1.1
ASN1_item_i2d((ASN1_VALUE *)a, out, (&(X509_NAME_it)));
executed 5217 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(X509_NAME_it)));
Executed by:
  • libcrypto.so.1.1
} X509_NAME *X509_NAME_new(void) { return
executed 412 times by 1 test: return (X509_NAME *)ASN1_item_new((&(X509_NAME_it)));
Executed by:
  • libcrypto.so.1.1
(X509_NAME *)ASN1_item_new((&(X509_NAME_it)));
executed 412 times by 1 test: return (X509_NAME *)ASN1_item_new((&(X509_NAME_it)));
Executed by:
  • libcrypto.so.1.1
} void X509_NAME_free(X509_NAME *a) { ASN1_item_free((ASN1_VALUE *)a, (&(X509_NAME_it))); }
executed 25089 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
50-25089
76-
77X509_NAME * X509_NAME_dup(X509_NAME *x) { return
executed 7141 times by 1 test: return ASN1_item_dup((&(X509_NAME_it)), x);
Executed by:
  • libcrypto.so.1.1
ASN1_item_dup((&(X509_NAME_it)), x);
executed 7141 times by 1 test: return ASN1_item_dup((&(X509_NAME_it)), x);
Executed by:
  • libcrypto.so.1.1
}
7141
78-
79static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it)-
80{-
81 X509_NAME *ret = CRYPTO_zalloc(sizeof(*ret), __FILE__, 92);-
82-
83 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-274790
84 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-274790
85 )-
86 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
87 if ((
(ret->entries ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret->entries = sk_X509_NAME_ENTRY_new_null()) ==
(ret->entries ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-274790
88 ((void *)0)
(ret->entries ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-274790
89 )-
90 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
91 if ((
(ret->bytes = ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret->bytes = BUF_MEM_new()) ==
(ret->bytes = ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-274790
92 ((void *)0)
(ret->bytes = ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-274790
93 )-
94 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
95 ret->modified = 1;-
96 *val = (ASN1_VALUE *)ret;-
97 return
executed 274790 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 274790 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
274790
98-
99 memerr:-
100 ERR_put_error(13,(171),((1|64)),__FILE__,105);-
101 if (ret
retDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
102 sk_X509_NAME_ENTRY_free(ret->entries);-
103 CRYPTO_free(ret, __FILE__, 108);-
104 }
never executed: end of block
0
105 return
never executed: return 0;
0;
never executed: return 0;
0
106}-
107-
108static void x509_name_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it)-
109{-
110 X509_NAME *a;-
111-
112 if (!pval
!pvalDescription
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !*pval
!*pvalDescription
TRUEnever evaluated
FALSEevaluated 274790 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-274790
113 return;
never executed: return;
0
114 a = (X509_NAME *)*pval;-
115-
116 BUF_MEM_free(a->bytes);-
117 sk_X509_NAME_ENTRY_pop_free(a->entries, X509_NAME_ENTRY_free);-
118 CRYPTO_free(a->canon_enc, __FILE__, 123);-
119 CRYPTO_free(a, __FILE__, 124);-
120 *pval = -
121 ((void *)0)-
122 ;-
123}
executed 274790 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
274790
124-
125static void local_sk_X509_NAME_ENTRY_free(struct stack_st_X509_NAME_ENTRY *ne)-
126{-
127 sk_X509_NAME_ENTRY_free(ne);-
128}
executed 97560 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
97560
129-
130static void local_sk_X509_NAME_ENTRY_pop_free(struct stack_st_X509_NAME_ENTRY *ne)-
131{-
132 sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free);-
133}
executed 99013 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
99013
134-
135static int x509_name_ex_d2i(ASN1_VALUE **val,-
136 const unsigned char **in, long len,-
137 const ASN1_ITEM *it, int tag, int aclass,-
138 char opt, ASN1_TLC *ctx)-
139{-
140 const unsigned char *p = *in, *q;-
141 union {-
142 struct stack_st_STACK_OF_X509_NAME_ENTRY *s;-
143 ASN1_VALUE *a;-
144 } intname = {-
145 -
146 ((void *)0)-
147 -
148 };-
149 union {-
150 X509_NAME *x;-
151 ASN1_VALUE *a;-
152 } nm = {-
153 -
154 ((void *)0)-
155 -
156 };-
157 int i, j, ret;-
158 struct stack_st_X509_NAME_ENTRY *entries;-
159 X509_NAME_ENTRY *entry;-
160 if (len > (1024 * 1024)
len > (1024 * 1024)Description
TRUEnever evaluated
FALSEevaluated 138785 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-138785
161 len = (1024 * 1024);
never executed: len = (1024 * 1024);
0
162 q = p;-
163-
164-
165 ret = ASN1_item_ex_d2i(&intname.a,-
166 &p, len, (&(X509_NAME_INTERNAL_it)),-
167 tag, aclass, opt, ctx);-
168-
169 if (ret <= 0
ret <= 0Description
TRUEevaluated 15104 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 123681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
15104-123681
170 return
executed 15104 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 15104 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
15104
171-
172 if (*
*valDescription
TRUEevaluated 112126 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11555 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
val
*valDescription
TRUEevaluated 112126 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11555 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
11555-112126
173 x509_name_ex_free(val,
executed 112126 times by 1 test: x509_name_ex_free(val, ((void *)0) );
Executed by:
  • libcrypto.so.1.1
112126
174 ((void *)0)
executed 112126 times by 1 test: x509_name_ex_free(val, ((void *)0) );
Executed by:
  • libcrypto.so.1.1
112126
175 );
executed 112126 times by 1 test: x509_name_ex_free(val, ((void *)0) );
Executed by:
  • libcrypto.so.1.1
112126
176 if (!x509_name_ex_new(&nm.a,
!x509_name_ex_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 123681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-123681
177 ((void *)0)
!x509_name_ex_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 123681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-123681
178 )
!x509_name_ex_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 123681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-123681
179 goto
never executed: goto err;
err;
never executed: goto err;
0
180-
181 if (!BUF_MEM_grow(nm.x->bytes, p - q)
!BUF_MEM_grow(...>bytes, p - q)Description
TRUEnever evaluated
FALSEevaluated 123681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-123681
182 goto
never executed: goto err;
err;
never executed: goto err;
0
183 memcpy(nm.x->bytes->data, q, p - q);-
184-
185-
186 for (i = 0; i < sk_STACK_OF_X509_NAME_ENTRY_num(intname.s)
i < sk_STACK_O...num(intname.s)Description
TRUEevaluated 79944 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 123681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
79944-123681
187 entries = sk_STACK_OF_X509_NAME_ENTRY_value(intname.s, i);-
188 for (j = 0; j < sk_X509_NAME_ENTRY_num(entries)
j < sk_X509_NA...Y_num(entries)Description
TRUEevaluated 95547 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 79944 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; j++) {
79944-95547
189 entry = sk_X509_NAME_ENTRY_value(entries, j);-
190 entry->set = i;-
191 if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry)
!sk_X509_NAME_...ntries, entry)Description
TRUEnever evaluated
FALSEevaluated 95547 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-95547
192 goto
never executed: goto err;
err;
never executed: goto err;
0
193 sk_X509_NAME_ENTRY_set(entries, j, -
194 ((void *)0)-
195 );-
196 }
executed 95547 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
95547
197 }
executed 79944 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
79944
198 ret = x509_name_canon(nm.x);-
199 if (!ret
!retDescription
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122518 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1163-122518
200 goto
executed 1163 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 1163 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
1163
201 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,-
202 local_sk_X509_NAME_ENTRY_free);-
203 nm.x->modified = 0;-
204 *val = nm.a;-
205 *in = p;-
206 return
executed 122518 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 122518 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
122518
207-
208 err:-
209 if (nm.x !=
nm.x != ((void *)0)Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1163
210 ((void *)0)
nm.x != ((void *)0)Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1163
211 )-
212 X509_NAME_free(nm.x);
executed 1163 times by 1 test: X509_NAME_free(nm.x);
Executed by:
  • libcrypto.so.1.1
1163
213 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,-
214 local_sk_X509_NAME_ENTRY_pop_free);-
215 ERR_put_error(13,(158),(58),__FILE__,206);-
216 return
executed 1163 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 1163 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1163
217}-
218-
219static int x509_name_ex_i2d(ASN1_VALUE **val, unsigned char **out,-
220 const ASN1_ITEM *it, int tag, int aclass)-
221{-
222 int ret;-
223 X509_NAME *a = (X509_NAME *)*val;-
224 if (a->modified
a->modifiedDescription
TRUEevaluated 4549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27804 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4549-27804
225 ret = x509_name_encode(a);-
226 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 4549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4549
227 return
never executed: return ret;
ret;
never executed: return ret;
0
228 ret = x509_name_canon(a);-
229 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 4549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4549
230 return
never executed: return ret;
ret;
never executed: return ret;
0
231 }
executed 4549 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
4549
232 ret = a->bytes->length;-
233 if (out !=
out != ((void *)0)Description
TRUEevaluated 9110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23243 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
9110-23243
234 ((void *)0)
out != ((void *)0)Description
TRUEevaluated 9110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23243 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
9110-23243
235 ) {-
236 memcpy(*out, a->bytes->data, ret);-
237 *out += ret;-
238 }
executed 9110 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
9110
239 return
executed 32353 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 32353 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
32353
240}-
241-
242static int x509_name_encode(X509_NAME *a)-
243{-
244 union {-
245 struct stack_st_STACK_OF_X509_NAME_ENTRY *s;-
246 ASN1_VALUE *a;-
247 } intname = {-
248 -
249 ((void *)0)-
250 -
251 };-
252 int len;-
253 unsigned char *p;-
254 struct stack_st_X509_NAME_ENTRY *entries = -
255 ((void *)0)-
256 ;-
257 X509_NAME_ENTRY *entry;-
258 int i, set = -1;-
259 intname.s = sk_STACK_OF_X509_NAME_ENTRY_new_null();-
260 if (!intname.s
!intname.sDescription
TRUEnever evaluated
FALSEevaluated 4549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4549
261 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
262 for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries)
i < sk_X509_NA...um(a->entries)Description
TRUEevaluated 25517 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
4549-25517
263 entry = sk_X509_NAME_ENTRY_value(a->entries, i);-
264 if (entry->set != set
entry->set != setDescription
TRUEevaluated 22300 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3217 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3217-22300
265 entries = sk_X509_NAME_ENTRY_new_null();-
266 if (!entries
!entriesDescription
TRUEnever evaluated
FALSEevaluated 22300 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-22300
267 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
268 if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname.s, entries)
!sk_STACK_OF_X...me.s, entries)Description
TRUEnever evaluated
FALSEevaluated 22300 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-22300
269 sk_X509_NAME_ENTRY_free(entries);-
270 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
271 }-
272 set = entry->set;-
273 }
executed 22300 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
22300
274 if (!sk_X509_NAME_ENTRY_push(entries, entry)
!sk_X509_NAME_...ntries, entry)Description
TRUEnever evaluated
FALSEevaluated 25517 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-25517
275 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
276 }
executed 25517 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
25517
277 len = ASN1_item_ex_i2d(&intname.a, -
278 ((void *)0)-
279 ,-
280 (&(X509_NAME_INTERNAL_it)), -1, -1);-
281 if (!BUF_MEM_grow(a->bytes, len)
!BUF_MEM_grow(a->bytes, len)Description
TRUEnever evaluated
FALSEevaluated 4549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4549
282 goto
never executed: goto memerr;
memerr;
never executed: goto memerr;
0
283 p = (unsigned char *)a->bytes->data;-
284 ASN1_item_ex_i2d(&intname.a,-
285 &p, (&(X509_NAME_INTERNAL_it)), -1, -1);-
286 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,-
287 local_sk_X509_NAME_ENTRY_free);-
288 a->modified = 0;-
289 return
executed 4549 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 4549 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
4549
290 memerr:-
291 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,-
292 local_sk_X509_NAME_ENTRY_free);-
293 ERR_put_error(13,(203),((1|64)),__FILE__,276);-
294 return
never executed: return -1;
-1;
never executed: return -1;
0
295}-
296-
297static int x509_name_ex_print(BIO *out, ASN1_VALUE **pval,-
298 int indent,-
299 const char *fname, const ASN1_PCTX *pctx)-
300{-
301 if (X509_NAME_print_ex(out, (const X509_NAME *)*pval,
X509_NAME_prin...nm_flags) <= 0Description
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1163
302 indent, pctx->nm_flags) <= 0
X509_NAME_prin...nm_flags) <= 0Description
TRUEnever evaluated
FALSEevaluated 1163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1163
303 return
never executed: return 0;
0;
never executed: return 0;
0
304 return
executed 1163 times by 1 test: return 2;
Executed by:
  • libcrypto.so.1.1
2;
executed 1163 times by 1 test: return 2;
Executed by:
  • libcrypto.so.1.1
1163
305}-
306static int x509_name_canon(X509_NAME *a)-
307{-
308 unsigned char *p;-
309 struct stack_st_STACK_OF_X509_NAME_ENTRY *intname;-
310 struct stack_st_X509_NAME_ENTRY *entries = -
311 ((void *)0)-
312 ;-
313 X509_NAME_ENTRY *entry, *tmpentry = -
314 ((void *)0)-
315 ;-
316 int i, set = -1, ret = 0, len;-
317-
318 CRYPTO_free(a->canon_enc, __FILE__, 308);-
319 a->canon_enc = -
320 ((void *)0)-
321 ;-
322-
323 if (sk_X509_NAME_ENTRY_num(a->entries) == 0
sk_X509_NAME_E...>entries) == 0Description
TRUEevaluated 87456 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 40774 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
40774-87456
324 a->canon_enclen = 0;-
325 return
executed 87456 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 87456 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
87456
326 }-
327 intname = sk_STACK_OF_X509_NAME_ENTRY_new_null();-
328 if (intname ==
intname == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 40774 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-40774
329 ((void *)0)
intname == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 40774 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-40774
330 ) {-
331 ERR_put_error(11,(156),((1|64)),__FILE__,317);-
332 goto
never executed: goto err;
err;
never executed: goto err;
0
333 }-
334 for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries)
i < sk_X509_NA...um(a->entries)Description
TRUEevaluated 120201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 36118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
36118-120201
335 entry = sk_X509_NAME_ENTRY_value(a->entries, i);-
336 if (entry->set != set
entry->set != setDescription
TRUEevaluated 94329 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 25872 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
25872-94329
337 entries = sk_X509_NAME_ENTRY_new_null();-
338 if (entries ==
entries == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 94329 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-94329
339 ((void *)0)
entries == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 94329 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-94329
340 )-
341 goto
never executed: goto err;
err;
never executed: goto err;
0
342 if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)
!sk_STACK_OF_X...name, entries)Description
TRUEnever evaluated
FALSEevaluated 94329 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-94329
343 sk_X509_NAME_ENTRY_free(entries);-
344 ERR_put_error(11,(156),((1|64)),__FILE__,328);-
345 goto
never executed: goto err;
err;
never executed: goto err;
0
346 }-
347 set = entry->set;-
348 }
executed 94329 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
94329
349 tmpentry = X509_NAME_ENTRY_new();-
350 if (tmpentry ==
tmpentry == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 120201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-120201
351 ((void *)0)
tmpentry == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 120201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-120201
352 ) {-
353 ERR_put_error(11,(156),((1|64)),__FILE__,335);-
354 goto
never executed: goto err;
err;
never executed: goto err;
0
355 }-
356 tmpentry->object = OBJ_dup(entry->object);-
357 if (tmpentry->object ==
tmpentry->obje...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 120201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-120201
358 ((void *)0)
tmpentry->obje...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 120201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-120201
359 ) {-
360 ERR_put_error(11,(156),((1|64)),__FILE__,340);-
361 goto
never executed: goto err;
err;
never executed: goto err;
0
362 }-
363 if (!asn1_string_canon(tmpentry->value, entry->value)
!asn1_string_c... entry->value)Description
TRUEevaluated 4656 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 115545 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4656-115545
364 goto
executed 4656 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 4656 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
4656
365 if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)
!sk_X509_NAME_...ies, tmpentry)Description
TRUEnever evaluated
FALSEevaluated 115545 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-115545
366 ERR_put_error(11,(156),((1|64)),__FILE__,346);-
367 goto
never executed: goto err;
err;
never executed: goto err;
0
368 }-
369 tmpentry = -
370 ((void *)0)-
371 ;-
372 }
executed 115545 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
115545
373-
374-
375 len = i2d_name_canon(intname, -
376 ((void *)0)-
377 );-
378 if (len < 0
len < 0Description
TRUEnever evaluated
FALSEevaluated 36118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-36118
379 goto
never executed: goto err;
err;
never executed: goto err;
0
380 a->canon_enclen = len;-
381-
382 p = CRYPTO_malloc(a->canon_enclen, __FILE__, 358);-
383 if (p ==
p == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36118
384 ((void *)0)
p == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 36118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36118
385 ) {-
386 ERR_put_error(11,(156),((1|64)),__FILE__,360);-
387 goto
never executed: goto err;
err;
never executed: goto err;
0
388 }-
389-
390 a->canon_enc = p;-
391-
392 i2d_name_canon(intname, &p);-
393-
394 ret = 1;-
395-
396 err:
code before this statement executed 36118 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
36118
397 X509_NAME_ENTRY_free(tmpentry);-
398 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname,-
399 local_sk_X509_NAME_ENTRY_pop_free);-
400 return
executed 40774 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 40774 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
40774
401}-
402static int asn1_string_canon(ASN1_STRING *out, const ASN1_STRING *in)-
403{-
404 unsigned char *to, *from;-
405 int len, i;-
406-
407-
408 if (!(ASN1_tag2bit(in->type) & (0x2000 | 0x0800 | 0x0100 | 0x0002 | 0x0004 | 0x0010 | 0x0040))
!(ASN1_tag2bit...010 | 0x0040))Description
TRUEevaluated 20492 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 99709 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
20492-99709
409 if (!ASN1_STRING_copy(out, in)
!ASN1_STRING_copy(out, in)Description
TRUEnever evaluated
FALSEevaluated 20492 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20492
410 return
never executed: return 0;
0;
never executed: return 0;
0
411 return
executed 20492 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 20492 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
20492
412 }-
413-
414 out->type = 12;-
415 out->length = ASN1_STRING_to_UTF8(&out->data, in);-
416 if (out->length == -1
out->length == -1Description
TRUEevaluated 4656 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 95053 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4656-95053
417 return
executed 4656 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 4656 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
4656
418-
419 to = out->data;-
420 from = to;-
421-
422 len = out->length;-
423 while (len > 0
len > 0Description
TRUEevaluated 69703 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27527 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(ossl_ctype_ch...(*from), 0x8))Description
TRUEevaluated 2177 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 67526 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ossl_ctype_check((*from), 0x8))
(ossl_ctype_ch...(*from), 0x8))Description
TRUEevaluated 2177 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 67526 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
2177-69703
424 from++;-
425 len--;-
426 }
executed 2177 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2177
427-
428 to = from + len;-
429-
430-
431 while (len > 0
len > 0Description
TRUEevaluated 68668 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27527 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(ossl_ctype_ch...to[-1]), 0x8))Description
TRUEevaluated 1142 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 67526 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ossl_ctype_check((to[-1]), 0x8))
(ossl_ctype_ch...to[-1]), 0x8))Description
TRUEevaluated 1142 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 67526 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1142-68668
432 to--;-
433 len--;-
434 }
executed 1142 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1142
435-
436 to = out->data;-
437-
438 i = 0;-
439 while (i < len
i < lenDescription
TRUEevaluated 867351 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 95053 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
95053-867351
440-
441 if (!(((*from) & ~127) == 0)
!(((*from) & ~127) == 0)Description
TRUEevaluated 212781 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 654570 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
212781-654570
442 *to++ = *from++;-
443 i++;-
444 }
executed 212781 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
212781
445-
446 else if ((
(ossl_ctype_ch...(*from), 0x8))Description
TRUEevaluated 54920 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 599650 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ossl_ctype_check((*from), 0x8))
(ossl_ctype_ch...(*from), 0x8))Description
TRUEevaluated 54920 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 599650 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
54920-599650
447-
448 *to++ = ' ';-
449-
450-
451-
452-
453-
454 do {-
455 from++;-
456 i++;-
457 }
executed 56267 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
56267
458 while ((
(ossl_ctype_ch...(*from), 0x8))Description
TRUEevaluated 1347 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 54920 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ossl_ctype_check((*from), 0x8))
(ossl_ctype_ch...(*from), 0x8))Description
TRUEevaluated 1347 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 54920 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
);
1347-54920
459 }
executed 54920 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
54920
460 *to++ = ossl_tolower(*from);-
461 from++;-
462 i++;-
463 }
executed 599650 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
599650
464 }-
465-
466 out->length = to - out->data;-
467-
468 return
executed 95053 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 95053 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
95053
469-
470}-
471-
472static int i2d_name_canon(struct stack_st_STACK_OF_X509_NAME_ENTRY * _intname,-
473 unsigned char **in)-
474{-
475 int i, len, ltmp;-
476 ASN1_VALUE *v;-
477 struct stack_st_ASN1_VALUE *intname = (struct stack_st_ASN1_VALUE *)_intname;-
478-
479 len = 0;-
480 for (i = 0; i < sk_ASN1_VALUE_num(intname)
i < sk_ASN1_VALUE_num(intname)Description
TRUEevaluated 150480 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72236 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
72236-150480
481 v = sk_ASN1_VALUE_value(intname, i);-
482 ltmp = ASN1_item_ex_i2d(&v, in,-
483 (&(X509_NAME_ENTRIES_it)), -1, -1);-
484 if (ltmp < 0
ltmp < 0Description
TRUEnever evaluated
FALSEevaluated 150480 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-150480
485 return
never executed: return ltmp;
ltmp;
never executed: return ltmp;
0
486 len += ltmp;-
487 }
executed 150480 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
150480
488 return
executed 72236 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 72236 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
72236
489}-
490-
491int X509_NAME_set(X509_NAME **xn, X509_NAME *name)-
492{-
493 if (*
*xn == nameDescription
TRUEnever evaluated
FALSEevaluated 561 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
xn == name
*xn == nameDescription
TRUEnever evaluated
FALSEevaluated 561 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-561
494 return
never executed: return *xn != ((void *)0) ;
*xn !=
never executed: return *xn != ((void *)0) ;
0
495 ((void *)0)
never executed: return *xn != ((void *)0) ;
0
496 ;
never executed: return *xn != ((void *)0) ;
0
497 if ((
(name = X509_N...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 561 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
name = X509_NAME_dup(name)) ==
(name = X509_N...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 561 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-561
498 ((void *)0)
(name = X509_N...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 561 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-561
499 )-
500 return
never executed: return 0;
0;
never executed: return 0;
0
501 X509_NAME_free(*xn);-
502 *xn = name;-
503 return
executed 561 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 561 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
561
504}-
505-
506int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)-
507{-
508 char *s, *c, *b;-
509 int l, i;-
510-
511 l = 80 - 2 - obase;-
512-
513 b = X509_NAME_oneline(name, -
514 ((void *)0)-
515 , 0);-
516 if (!b
!bDescription
TRUEnever evaluated
FALSEevaluated 5796 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5796
517 return
never executed: return 0;
0;
never executed: return 0;
0
518 if (!*b
!*bDescription
TRUEevaluated 4047 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1749-4047
519 CRYPTO_free(b, __FILE__, 504);-
520 return
executed 4047 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 4047 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
4047
521 }-
522 s = b + 1;-
523-
524 c = s;-
525 for (;;) {-
526 if (((*
(*s == '/')Description
TRUEevaluated 15616 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 308618 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
s == '/')
(*s == '/')Description
TRUEevaluated 15616 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 308618 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&&
15616-308618
527 ((
(ossl_ctype_ch...((s[1]), 0x2))Description
TRUEevaluated 4469 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11147 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ossl_ctype_check((s[1]), 0x2))
(ossl_ctype_ch...((s[1]), 0x2))Description
TRUEevaluated 4469 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11147 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& ((
(s[2] == '=')Description
TRUEevaluated 1348 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3121 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
s[2] == '=')
(s[2] == '=')Description
TRUEevaluated 1348 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3121 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
1348-11147
528 ((
(ossl_ctype_ch...((s[2]), 0x2))Description
TRUEevaluated 2457 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 664 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ossl_ctype_check((s[2]), 0x2))
(ossl_ctype_ch...((s[2]), 0x2))Description
TRUEevaluated 2457 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 664 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(s[3] == '=')Description
TRUEevaluated 1837 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 620 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
s[3] == '=')
(s[3] == '=')Description
TRUEevaluated 1837 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 620 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
620-2457
529 ))) || (*
(*s == '\0')Description
TRUEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 319300 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
s == '\0')
(*s == '\0')Description
TRUEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 319300 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1749-319300
530 {-
531 i = s - c;-
532 if (BIO_write(bp, c, i) != i
BIO_write(bp, c, i) != iDescription
TRUEnever evaluated
FALSEevaluated 4934 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4934
533 goto
never executed: goto err;
err;
never executed: goto err;
0
534 c = s + 1;-
535 if (*
*s != '\0'Description
TRUEevaluated 3185 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
s != '\0'
*s != '\0'Description
TRUEevaluated 3185 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1749-3185
536 if (BIO_write(bp, ", ", 2) != 2
BIO_write(bp, ", ", 2) != 2Description
TRUEnever evaluated
FALSEevaluated 3185 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3185
537 goto
never executed: goto err;
err;
never executed: goto err;
0
538 }
executed 3185 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3185
539 l--;-
540 }
executed 4934 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
4934
541 if (*
*s == '\0'Description
TRUEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 322485 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
s == '\0'
*s == '\0'Description
TRUEevaluated 1749 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 322485 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1749-322485
542 break;
executed 1749 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1749
543 s++;-
544 l--;-
545 }
executed 322485 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
322485
546-
547 CRYPTO_free(b, __FILE__, 532);-
548 return
executed 1749 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1749 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1749
549 err:-
550 ERR_put_error(11,(117),(7),__FILE__,535);-
551 CRYPTO_free(b, __FILE__, 536);-
552 return
never executed: return 0;
0;
never executed: return 0;
0
553}-
554-
555int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder,-
556 size_t *pderlen)-
557{-
558-
559 if (i2d_X509_NAME(nm,
i2d_X509_NAME(...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
560 ((void *)0)
i2d_X509_NAME(...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
561 ) <= 0
i2d_X509_NAME(...id *)0) ) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
562 return
never executed: return 0;
0;
never executed: return 0;
0
563 if (pder !=
pder != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
564 ((void *)0)
pder != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
565 )-
566 *
never executed: *pder = (unsigned char *)nm->bytes->data;
pder = (unsigned char *)nm->bytes->data;
never executed: *pder = (unsigned char *)nm->bytes->data;
0
567 if (pderlen !=
pderlen != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
568 ((void *)0)
pderlen != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
569 )-
570 *
never executed: *pderlen = nm->bytes->length;
pderlen = nm->bytes->length;
never executed: *pderlen = nm->bytes->length;
0
571 return
never executed: return 1;
1;
never executed: return 1;
0
572}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2