OpenCoverage

v3_lib.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509v3/v3_lib.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static struct stack_st_X509V3_EXT_METHOD *ext_list = -
4 ((void *)0)-
5 ;-
6-
7static int ext_cmp(const X509V3_EXT_METHOD *const *a,-
8 const X509V3_EXT_METHOD *const *b);-
9static void ext_list_free(X509V3_EXT_METHOD *ext);-
10-
11int X509V3_EXT_add(X509V3_EXT_METHOD *ext)-
12{-
13 if (ext_list ==
ext_list == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
14 ((void *)0)
ext_list == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
15 -
16 && (
(ext_list = sk...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
ext_list = sk_X509V3_EXT_METHOD_new(ext_cmp)) ==
(ext_list = sk...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
17 ((void *)0)
(ext_list = sk...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
18 ) {-
19 ERR_put_error(34,(104),((1|64)),__FILE__,29);-
20 return
never executed: return 0;
0;
never executed: return 0;
0
21 }-
22 if (!sk_X509V3_EXT_METHOD_push(ext_list, ext)
!sk_X509V3_EXT...ext_list, ext)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
23 ERR_put_error(34,(104),((1|64)),__FILE__,33);-
24 return
never executed: return 0;
0;
never executed: return 0;
0
25 }-
26 return
never executed: return 1;
1;
never executed: return 1;
0
27}-
28-
29static int ext_cmp(const X509V3_EXT_METHOD *const *a,-
30 const X509V3_EXT_METHOD *const *b)-
31{-
32 return
executed 920369 times by 1 test: return ((*a)->ext_nid - (*b)->ext_nid);
Executed by:
  • libcrypto.so.1.1
((*a)->ext_nid - (*b)->ext_nid);
executed 920369 times by 1 test: return ((*a)->ext_nid - (*b)->ext_nid);
Executed by:
  • libcrypto.so.1.1
920369
33}-
34-
35static int ext_cmp_BSEARCH_CMP_FN(const void *, const void *); static int ext_cmp(const X509V3_EXT_METHOD * const *, const X509V3_EXT_METHOD * const *); static const X509V3_EXT_METHOD * * OBJ_bsearch_ext(const X509V3_EXT_METHOD * *key, const X509V3_EXT_METHOD * const *base, int num)-
36 ;-
37static int ext_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) { const X509V3_EXT_METHOD * const *a = a_; const X509V3_EXT_METHOD * const *b = b_; return
executed 920369 times by 1 test: return ext_cmp(a,b);
Executed by:
  • libcrypto.so.1.1
ext_cmp(a,b);
executed 920369 times by 1 test: return ext_cmp(a,b);
Executed by:
  • libcrypto.so.1.1
} static const X509V3_EXT_METHOD * *OBJ_bsearch_ext(const X509V3_EXT_METHOD * *key, const X509V3_EXT_METHOD * const *base, int num) { return
executed 190374 times by 1 test: return (const X509V3_EXT_METHOD * *)OBJ_bsearch_(key, base, num, sizeof(const X509V3_EXT_METHOD *), ext_cmp_BSEARCH_CMP_FN);
Executed by:
  • libcrypto.so.1.1
(const X509V3_EXT_METHOD * *)OBJ_bsearch_(key, base, num, sizeof(const X509V3_EXT_METHOD *), ext_cmp_BSEARCH_CMP_FN);
executed 190374 times by 1 test: return (const X509V3_EXT_METHOD * *)OBJ_bsearch_(key, base, num, sizeof(const X509V3_EXT_METHOD *), ext_cmp_BSEARCH_CMP_FN);
Executed by:
  • libcrypto.so.1.1
} extern void dummy_prototype(void)
190374-920369
38 ;-
39-
40-
41const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid)-
42{-
43 X509V3_EXT_METHOD tmp;-
44 const X509V3_EXT_METHOD *t = &tmp, *const *ret;-
45 int idx;-
46-
47 if (nid < 0
nid < 0Description
TRUEnever evaluated
FALSEevaluated 190374 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-190374
48 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
49 ((void *)0)
never executed: return ((void *)0) ;
0
50 ;
never executed: return ((void *)0) ;
0
51 tmp.ext_nid = nid;-
52 ret = OBJ_bsearch_ext(&t, standard_exts, (sizeof(standard_exts)/sizeof((standard_exts)[0])));-
53 if (ret
retDescription
TRUEevaluated 185970 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4404 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4404-185970
54 return
executed 185970 times by 1 test: return *ret;
Executed by:
  • libcrypto.so.1.1
*ret;
executed 185970 times by 1 test: return *ret;
Executed by:
  • libcrypto.so.1.1
185970
55 if (!ext_list
!ext_listDescription
TRUEevaluated 4404 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-4404
56 return
executed 4404 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 4404 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
4404
57 ((void *)0)
executed 4404 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
4404
58 ;
executed 4404 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
4404
59 idx = sk_X509V3_EXT_METHOD_find(ext_list, &tmp);-
60 return
never executed: return sk_X509V3_EXT_METHOD_value(ext_list, idx);
sk_X509V3_EXT_METHOD_value(ext_list, idx);
never executed: return sk_X509V3_EXT_METHOD_value(ext_list, idx);
0
61}-
62-
63const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext)-
64{-
65 int nid;-
66 if ((
(nid = OBJ_obj...ct(ext))) == 0Description
TRUEevaluated 9295 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 190153 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext))) == 0
(nid = OBJ_obj...ct(ext))) == 0Description
TRUEevaluated 9295 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 190153 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
9295-190153
67 return
executed 9295 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 9295 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
9295
68 ((void *)0)
executed 9295 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
9295
69 ;
executed 9295 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
9295
70 return
executed 190153 times by 1 test: return X509V3_EXT_get_nid(nid);
Executed by:
  • libcrypto.so.1.1
X509V3_EXT_get_nid(nid);
executed 190153 times by 1 test: return X509V3_EXT_get_nid(nid);
Executed by:
  • libcrypto.so.1.1
190153
71}-
72-
73int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist)-
74{-
75 for (; extlist->ext_nid != -1
extlist->ext_nid != -1Description
TRUEnever evaluated
FALSEnever evaluated
; extlist++)
0
76 if (!X509V3_EXT_add(extlist)
!X509V3_EXT_add(extlist)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
77 return
never executed: return 0;
0;
never executed: return 0;
0
78 return
never executed: return 1;
1;
never executed: return 1;
0
79}-
80-
81int X509V3_EXT_add_alias(int nid_to, int nid_from)-
82{-
83 const X509V3_EXT_METHOD *ext;-
84 X509V3_EXT_METHOD *tmpext;-
85-
86 if ((
(ext = X509V3_...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
ext = X509V3_EXT_get_nid(nid_from)) ==
(ext = X509V3_...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
87 ((void *)0)
(ext = X509V3_...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
88 ) {-
89 ERR_put_error(34,(106),(102),__FILE__,92);-
90 return
never executed: return 0;
0;
never executed: return 0;
0
91 }-
92 if ((
(tmpext = CRYP...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
tmpext = CRYPTO_malloc(sizeof(*tmpext), __FILE__, 95)) ==
(tmpext = CRYP...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
93 ((void *)0)
(tmpext = CRYP...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
94 ) {-
95 ERR_put_error(34,(106),((1|64)),__FILE__,96);-
96 return
never executed: return 0;
0;
never executed: return 0;
0
97 }-
98 *tmpext = *ext;-
99 tmpext->ext_nid = nid_to;-
100 tmpext->ext_flags |= 0x1;-
101 return
never executed: return X509V3_EXT_add(tmpext);
X509V3_EXT_add(tmpext);
never executed: return X509V3_EXT_add(tmpext);
0
102}-
103-
104void X509V3_EXT_cleanup(void)-
105{-
106 sk_X509V3_EXT_METHOD_pop_free(ext_list, ext_list_free);-
107 ext_list = -
108 ((void *)0)-
109 ;-
110}
never executed: end of block
0
111-
112static void ext_list_free(X509V3_EXT_METHOD *ext)-
113{-
114 if (ext->ext_flags & 0x1
ext->ext_flags & 0x1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
115 CRYPTO_free(ext, __FILE__, 114);
never executed: CRYPTO_free(ext, __FILE__, 114);
0
116}
never executed: end of block
0
117-
118-
119-
120-
121-
122-
123int X509V3_add_standard_extensions(void)-
124{-
125 return
never executed: return 1;
1;
never executed: return 1;
0
126}-
127-
128-
129-
130void *X509V3_EXT_d2i(X509_EXTENSION *ext)-
131{-
132 const X509V3_EXT_METHOD *method;-
133 const unsigned char *p;-
134 ASN1_STRING *extvalue;-
135 int extlen;-
136-
137 if ((
(method = X509...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 100504 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
method = X509V3_EXT_get(ext)) ==
(method = X509...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 100504 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-100504
138 ((void *)0)
(method = X509...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 100504 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-100504
139 )-
140 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
141 ((void *)0)
never executed: return ((void *)0) ;
0
142 ;
never executed: return ((void *)0) ;
0
143 extvalue = X509_EXTENSION_get_data(ext);-
144 p = ASN1_STRING_get0_data(extvalue);-
145 extlen = ASN1_STRING_length(extvalue);-
146 if (method->it
method->itDescription
TRUEevaluated 100495 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
9-100495
147 return
executed 100495 times by 1 test: return ASN1_item_d2i( ((void *)0) , &p, extlen, (method->it));
Executed by:
  • libcrypto.so.1.1
ASN1_item_d2i(
executed 100495 times by 1 test: return ASN1_item_d2i( ((void *)0) , &p, extlen, (method->it));
Executed by:
  • libcrypto.so.1.1
100495
148 ((void *)0)
executed 100495 times by 1 test: return ASN1_item_d2i( ((void *)0) , &p, extlen, (method->it));
Executed by:
  • libcrypto.so.1.1
100495
149 , &p, extlen, (method->it));
executed 100495 times by 1 test: return ASN1_item_d2i( ((void *)0) , &p, extlen, (method->it));
Executed by:
  • libcrypto.so.1.1
100495
150 return
executed 9 times by 1 test: return method->d2i( ((void *)0) , &p, extlen);
Executed by:
  • libcrypto.so.1.1
method->d2i(
executed 9 times by 1 test: return method->d2i( ((void *)0) , &p, extlen);
Executed by:
  • libcrypto.so.1.1
9
151 ((void *)0)
executed 9 times by 1 test: return method->d2i( ((void *)0) , &p, extlen);
Executed by:
  • libcrypto.so.1.1
9
152 , &p, extlen);
executed 9 times by 1 test: return method->d2i( ((void *)0) , &p, extlen);
Executed by:
  • libcrypto.so.1.1
9
153}-
154void *X509V3_get_d2i(const struct stack_st_X509_EXTENSION *x, int nid, int *crit,-
155 int *idx)-
156{-
157 int lastpos, i;-
158 X509_EXTENSION *ex, *found_ex = -
159 ((void *)0)-
160 ;-
161-
162 if (!x
!xDescription
TRUEevaluated 99539 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 294133 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
99539-294133
163 if (idx
idxDescription
TRUEnever evaluated
FALSEevaluated 99539 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-99539
164 *
never executed: *idx = -1;
idx = -1;
never executed: *idx = -1;
0
165 if (crit
critDescription
TRUEevaluated 14114 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 85425 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
14114-85425
166 *
executed 14114 times by 1 test: *crit = -1;
Executed by:
  • libcrypto.so.1.1
crit = -1;
executed 14114 times by 1 test: *crit = -1;
Executed by:
  • libcrypto.so.1.1
14114
167 return
executed 99539 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 99539 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
99539
168 ((void *)0)
executed 99539 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
99539
169 ;
executed 99539 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
99539
170 }-
171 if (idx
idxDescription
TRUEnever evaluated
FALSEevaluated 294133 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-294133
172 lastpos = *idx + 1;
never executed: lastpos = *idx + 1;
0
173 else-
174 lastpos = 0;
executed 294133 times by 1 test: lastpos = 0;
Executed by:
  • libcrypto.so.1.1
294133
175 if (lastpos < 0
lastpos < 0Description
TRUEnever evaluated
FALSEevaluated 294133 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-294133
176 lastpos = 0;
never executed: lastpos = 0;
0
177 for (i = lastpos; i < sk_X509_EXTENSION_num(x)
i < sk_X509_EXTENSION_num(x)Description
TRUEevaluated 920576 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 292772 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
292772-920576
178 ex = sk_X509_EXTENSION_value(x, i);-
179 if (OBJ_obj2nid(X509_EXTENSION_get_object(ex)) == nid
OBJ_obj2nid(X5...ct(ex)) == nidDescription
TRUEevaluated 103213 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 817363 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
103213-817363
180 if (idx
idxDescription
TRUEnever evaluated
FALSEevaluated 103213 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-103213
181 *idx = i;-
182 found_ex = ex;-
183 break;
never executed: break;
0
184 } else if (found_ex
found_exDescription
TRUEevaluated 1361 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 101852 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1361-101852
185-
186 if (crit
critDescription
TRUEevaluated 418 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 943 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
418-943
187 *
executed 418 times by 1 test: *crit = -2;
Executed by:
  • libcrypto.so.1.1
crit = -2;
executed 418 times by 1 test: *crit = -2;
Executed by:
  • libcrypto.so.1.1
418
188 return
executed 1361 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 1361 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
1361
189 ((void *)0)
executed 1361 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
1361
190 ;
executed 1361 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
1361
191 }-
192 found_ex = ex;-
193 }
executed 101852 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
101852
194 }
executed 919215 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
919215
195 if (found_ex
found_exDescription
TRUEevaluated 100491 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 192281 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
100491-192281
196-
197 if (crit
critDescription
TRUEevaluated 5850 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 94641 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
5850-94641
198 *
executed 5850 times by 1 test: *crit = X509_EXTENSION_get_critical(found_ex);
Executed by:
  • libcrypto.so.1.1
crit = X509_EXTENSION_get_critical(found_ex);
executed 5850 times by 1 test: *crit = X509_EXTENSION_get_critical(found_ex);
Executed by:
  • libcrypto.so.1.1
5850
199 return
executed 100491 times by 1 test: return X509V3_EXT_d2i(found_ex);
Executed by:
  • libcrypto.so.1.1
X509V3_EXT_d2i(found_ex);
executed 100491 times by 1 test: return X509V3_EXT_d2i(found_ex);
Executed by:
  • libcrypto.so.1.1
100491
200 }-
201-
202-
203 if (idx
idxDescription
TRUEnever evaluated
FALSEevaluated 192281 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-192281
204 *
never executed: *idx = -1;
idx = -1;
never executed: *idx = -1;
0
205 if (crit
critDescription
TRUEevaluated 20272 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 172009 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
20272-172009
206 *
executed 20272 times by 1 test: *crit = -1;
Executed by:
  • libcrypto.so.1.1
crit = -1;
executed 20272 times by 1 test: *crit = -1;
Executed by:
  • libcrypto.so.1.1
20272
207 return
executed 192281 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 192281 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
192281
208 ((void *)0)
executed 192281 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
192281
209 ;
executed 192281 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
192281
210}-
211-
212-
213-
214-
215-
216-
217-
218int X509V3_add1_i2d(struct stack_st_X509_EXTENSION **x, int nid, void *value,-
219 int crit, unsigned long flags)-
220{-
221 int errcode, extidx = -1;-
222 X509_EXTENSION *ext = -
223 ((void *)0)-
224 , *extmp;-
225 struct stack_st_X509_EXTENSION *ret = -
226 ((void *)0)-
227 ;-
228 unsigned long ext_op = flags & 0xfL;-
229-
230-
231-
232-
233-
234 if (ext_op != 1L
ext_op != 1LDescription
TRUEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-103
235 extidx = X509v3_get_ext_by_NID(*x, nid, -1);
executed 103 times by 1 test: extidx = X509v3_get_ext_by_NID(*x, nid, -1);
Executed by:
  • libcrypto.so.1.1
103
236-
237-
238 if (extidx >= 0
extidx >= 0Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-103
239-
240 if (ext_op == 4L
ext_op == 4LDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
241 return
never executed: return 1;
1;
never executed: return 1;
0
242-
243 if (ext_op == 0L
ext_op == 0LDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
244 errcode = 145;-
245 goto
never executed: goto err;
err;
never executed: goto err;
0
246 }-
247-
248 if (ext_op == 5L
ext_op == 5LDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
249 if (!sk_X509_EXTENSION_delete(*x, extidx)
!sk_X509_EXTEN...te(*x, extidx)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
250 return
never executed: return -1;
-1;
never executed: return -1;
0
251 return
never executed: return 1;
1;
never executed: return 1;
0
252 }-
253 }
never executed: end of block
else {
0
254-
255-
256-
257 if ((
(ext_op == 3L)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ext_op == 3L)
(ext_op == 3L)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
0-103
258 (
(ext_op == 5L)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ext_op == 5L)
(ext_op == 5L)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-103
259 errcode = 102;-
260 goto
never executed: goto err;
err;
never executed: goto err;
0
261 }-
262 }
executed 103 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
103
263-
264-
265-
266-
267-
268-
269 ext = X509V3_EXT_i2d(nid, crit, value);-
270-
271 if (!ext
!extDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-103
272 ERR_put_error(34,(140),(144),__FILE__,269)-
273 ;-
274 return
never executed: return 0;
0;
never executed: return 0;
0
275 }-
276-
277-
278 if (extidx >= 0
extidx >= 0Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-103
279 extmp = sk_X509_EXTENSION_value(*x, extidx);-
280 X509_EXTENSION_free(extmp);-
281 if (!sk_X509_EXTENSION_set(*x, extidx, ext)
!sk_X509_EXTEN..., extidx, ext)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
282 return
never executed: return -1;
-1;
never executed: return -1;
0
283 return
never executed: return 1;
1;
never executed: return 1;
0
284 }-
285-
286 ret = *x;-
287 if (*
*x == ((void *)0)Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
x ==
*x == ((void *)0)Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-103
288 ((void *)0)
*x == ((void *)0)Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-103
289 -
290 && (
(ret = sk_X509...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = sk_X509_EXTENSION_new_null()) ==
(ret = sk_X509...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-103
291 ((void *)0)
(ret = sk_X509...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-103
292 )-
293 goto
never executed: goto m_fail;
m_fail;
never executed: goto m_fail;
0
294 if (!sk_X509_EXTENSION_push(ret, ext)
!sk_X509_EXTEN...push(ret, ext)Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-103
295 goto
never executed: goto m_fail;
m_fail;
never executed: goto m_fail;
0
296-
297 *x = ret;-
298 return
executed 103 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 103 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
103
299-
300 m_fail:-
301-
302 if (ret != *x
ret != *xDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
303 sk_X509_EXTENSION_free(ret);
never executed: sk_X509_EXTENSION_free(ret);
0
304 X509_EXTENSION_free(ext);-
305 return
never executed: return -1;
-1;
never executed: return -1;
0
306-
307 err:-
308 if (!(flags & 0x10)
!(flags & 0x10)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
309 ERR_put_error(34,(140),(errcode),__FILE__,301);
never executed: ERR_put_error(34,(140),(errcode),__FILE__,301);
0
310 return
never executed: return 0;
0;
never executed: return 0;
0
311}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2