OpenCoverage

v3_purp.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509v3/v3_purp.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static void x509v3_cache_extensions(X509 *x);-
4-
5static int check_ssl_ca(const X509 *x);-
6static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x,-
7 int ca);-
8static int check_purpose_ssl_server(const X509_PURPOSE *xp, const X509 *x,-
9 int ca);-
10static int check_purpose_ns_ssl_server(const X509_PURPOSE *xp, const X509 *x,-
11 int ca);-
12static int purpose_smime(const X509 *x, int ca);-
13static int check_purpose_smime_sign(const X509_PURPOSE *xp, const X509 *x,-
14 int ca);-
15static int check_purpose_smime_encrypt(const X509_PURPOSE *xp, const X509 *x,-
16 int ca);-
17static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x,-
18 int ca);-
19static int check_purpose_timestamp_sign(const X509_PURPOSE *xp, const X509 *x,-
20 int ca);-
21static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca);-
22static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca);-
23-
24static int xp_cmp(const X509_PURPOSE *const *a, const X509_PURPOSE *const *b);-
25static void xptable_free(X509_PURPOSE *p);-
26-
27static X509_PURPOSE xstandard[] = {-
28 {1, 2, 0,-
29 check_purpose_ssl_client, "SSL client", "sslclient", -
30 ((void *)0)-
31 },-
32 {2, 3, 0,-
33 check_purpose_ssl_server, "SSL server", "sslserver", -
34 ((void *)0)-
35 },-
36 {3, 3, 0,-
37 check_purpose_ns_ssl_server, "Netscape SSL server", "nssslserver", -
38 ((void *)0)-
39 },-
40 {4, 4, 0, check_purpose_smime_sign,-
41 "S/MIME signing", "smimesign", -
42 ((void *)0)-
43 },-
44 {5, 4, 0,-
45 check_purpose_smime_encrypt, "S/MIME encryption", "smimeencrypt", -
46 ((void *)0)-
47 },-
48 {6, 1, 0, check_purpose_crl_sign,-
49 "CRL signing", "crlsign", -
50 ((void *)0)-
51 },-
52 {7, 0, 0, no_check, "Any Purpose", "any",-
53 -
54 ((void *)0)-
55 },-
56 {8, 1, 0, ocsp_helper,-
57 "OCSP helper", "ocsphelper", -
58 ((void *)0)-
59 },-
60 {9, 8, 0,-
61 check_purpose_timestamp_sign, "Time Stamp signing", "timestampsign",-
62 -
63 ((void *)0)-
64 },-
65};-
66-
67-
68-
69static struct stack_st_X509_PURPOSE *xptable = -
70 ((void *)0)-
71 ;-
72-
73static int xp_cmp(const X509_PURPOSE *const *a, const X509_PURPOSE *const *b)-
74{-
75 return
never executed: return (*a)->purpose - (*b)->purpose;
(*a)->purpose - (*b)->purpose;
never executed: return (*a)->purpose - (*b)->purpose;
0
76}-
77-
78-
79-
80-
81-
82-
83int X509_check_purpose(X509 *x, int id, int ca)-
84{-
85 int idx;-
86 const X509_PURPOSE *pt;-
87-
88 x509v3_cache_extensions(x);-
89-
90-
91 if (id == -1
id == -1Description
TRUEevaluated 38737 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2605 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2605-38737
92 return
executed 38737 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 38737 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
38737
93 idx = X509_PURPOSE_get_by_id(id);-
94 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEevaluated 2605 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2605
95 return
never executed: return -1;
-1;
never executed: return -1;
0
96 pt = X509_PURPOSE_get0(idx);-
97 return
executed 2605 times by 1 test: return pt->check_purpose(pt, x, ca);
Executed by:
  • libcrypto.so.1.1
pt->check_purpose(pt, x, ca);
executed 2605 times by 1 test: return pt->check_purpose(pt, x, ca);
Executed by:
  • libcrypto.so.1.1
2605
98}-
99-
100int X509_PURPOSE_set(int *p, int purpose)-
101{-
102 if (X509_PURPOSE_get_by_id(purpose) == -1
X509_PURPOSE_g...purpose) == -1Description
TRUEnever evaluated
FALSEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-134
103 ERR_put_error(34,(141),(146),__FILE__,98);-
104 return
never executed: return 0;
0;
never executed: return 0;
0
105 }-
106 *p = purpose;-
107 return
executed 134 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 134 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
134
108}-
109-
110int X509_PURPOSE_get_count(void)-
111{-
112 if (!xptable
!xptableDescription
TRUEevaluated 256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-256
113 return
executed 256 times by 1 test: return (sizeof(xstandard)/sizeof((xstandard)[0]));
Executed by:
  • libcrypto.so.1.1
(sizeof(xstandard)/sizeof((xstandard)[0]));
executed 256 times by 1 test: return (sizeof(xstandard)/sizeof((xstandard)[0]));
Executed by:
  • libcrypto.so.1.1
256
114 return
never executed: return sk_X509_PURPOSE_num(xptable) + (sizeof(xstandard)/sizeof((xstandard)[0]));
sk_X509_PURPOSE_num(xptable) + (sizeof(xstandard)/sizeof((xstandard)[0]));
never executed: return sk_X509_PURPOSE_num(xptable) + (sizeof(xstandard)/sizeof((xstandard)[0]));
0
115}-
116-
117X509_PURPOSE *X509_PURPOSE_get0(int idx)-
118{-
119 if (idx < 0
idx < 0Description
TRUEevaluated 4898 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3153 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
3153-4898
120 return
executed 4898 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 4898 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
4898
121 ((void *)0)
executed 4898 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
4898
122 ;
executed 4898 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
4898
123 if (idx < (int)(sizeof(xstandard)/sizeof((xstandard)[0]))
idx < (int)(si...standard)[0]))Description
TRUEevaluated 3153 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-3153
124 return
executed 3153 times by 1 test: return xstandard + idx;
Executed by:
  • libcrypto.so.1.1
xstandard + idx;
executed 3153 times by 1 test: return xstandard + idx;
Executed by:
  • libcrypto.so.1.1
3153
125 return
never executed: return sk_X509_PURPOSE_value(xptable, idx - (sizeof(xstandard)/sizeof((xstandard)[0])));
sk_X509_PURPOSE_value(xptable, idx - (sizeof(xstandard)/sizeof((xstandard)[0])));
never executed: return sk_X509_PURPOSE_value(xptable, idx - (sizeof(xstandard)/sizeof((xstandard)[0])));
0
126}-
127-
128int X509_PURPOSE_get_by_sname(const char *sname)-
129{-
130 int i;-
131 X509_PURPOSE *xptmp;-
132 for (i = 0; i < X509_PURPOSE_get_count()
i < X509_PURPOSE_get_count()Description
TRUEevaluated 256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
; i++) {
0-256
133 xptmp = X509_PURPOSE_get0(i);-
134 if (-
135 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
136 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
137 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
138 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
139 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
140 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
141 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
142 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
143 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
144 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
145 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
146 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
147 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
148 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
149 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
150 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
151 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
152 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
153 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
154 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
155 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
156 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
157 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
158 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
159 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
160 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
161 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
162 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
163 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
164 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
165 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
166 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
167 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
168 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
169 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
170 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
171 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
172 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
173 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
174 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
175 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
176 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
177 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
178 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
179 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
180 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
181 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( xptmp->sname ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
182 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
never executed: __result = (((const unsigned char *) (const char *) ( xptmp->sname ))[3] - __s2[3]);
0-134
183 ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
never executed: __result = (((const unsigned char *) (const char *) ( xptmp->sname ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
184 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
185 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
186 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
187 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
188 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
189 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
190 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
191 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
192 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
193 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
194 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
195 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
196 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
197 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
198 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
199 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
200 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
201 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
202 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
203 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
204 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
205 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
206 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
207 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
208 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
209 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( sname ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
210 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
never executed: __result = (((const unsigned char *) (const char *) ( sname ))[3] - __s2[3]);
0-134
211 ))[3] - __s2[3]);
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
never executed: __result = (((const unsigned char *) (const char *) ( sname ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-134
212 xptmp->sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
213 ,
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
214 sname
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
215 )))); })
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-134
216 == 0
__extension__ ... )))); }) == 0Description
TRUEevaluated 134 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
122-134
217 return
executed 134 times by 1 test: return i;
Executed by:
  • libcrypto.so.1.1
i;
executed 134 times by 1 test: return i;
Executed by:
  • libcrypto.so.1.1
134
218 }
executed 122 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
122
219 return
never executed: return -1;
-1;
never executed: return -1;
0
220}-
221-
222int X509_PURPOSE_get_by_id(int purpose)-
223{-
224 X509_PURPOSE tmp;-
225 int idx;-
226-
227 if ((
(purpose >= 1)Description
TRUEevaluated 2897 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4898 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
purpose >= 1)
(purpose >= 1)Description
TRUEevaluated 2897 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4898 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(purpose <= 9)Description
TRUEevaluated 2897 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
purpose <= 9)
(purpose <= 9)Description
TRUEevaluated 2897 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-4898
228 return
executed 2897 times by 1 test: return purpose - 1;
Executed by:
  • libcrypto.so.1.1
purpose - 1;
executed 2897 times by 1 test: return purpose - 1;
Executed by:
  • libcrypto.so.1.1
2897
229 if (xptable ==
xptable == ((void *)0)Description
TRUEevaluated 4898 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-4898
230 ((void *)0)
xptable == ((void *)0)Description
TRUEevaluated 4898 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-4898
231 )-
232 return
executed 4898 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
-1;
executed 4898 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
4898
233 tmp.purpose = purpose;-
234 idx = sk_X509_PURPOSE_find(xptable, &tmp);-
235 if (idx < 0
idx < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
236 return
never executed: return -1;
-1;
never executed: return -1;
0
237 return
never executed: return idx + (sizeof(xstandard)/sizeof((xstandard)[0]));
idx + (sizeof(xstandard)/sizeof((xstandard)[0]));
never executed: return idx + (sizeof(xstandard)/sizeof((xstandard)[0]));
0
238}-
239-
240int X509_PURPOSE_add(int id, int trust, int flags,-
241 int (*ck) (const X509_PURPOSE *, const X509 *, int),-
242 const char *name, const char *sname, void *arg)-
243{-
244 int idx;-
245 X509_PURPOSE *ptmp;-
246-
247-
248-
249 flags &= ~0x1;-
250-
251 flags |= 0x2;-
252-
253 idx = X509_PURPOSE_get_by_id(id);-
254-
255 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
256 if ((
(ptmp = CRYPTO...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
ptmp = CRYPTO_malloc(sizeof(*ptmp), __FILE__, 165)) ==
(ptmp = CRYPTO...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
257 ((void *)0)
(ptmp = CRYPTO...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
258 ) {-
259 ERR_put_error(34,(137),((1|64)),__FILE__,166);-
260 return
never executed: return 0;
0;
never executed: return 0;
0
261 }-
262 ptmp->flags = 0x1;-
263 }
never executed: end of block
else
0
264 ptmp = X509_PURPOSE_get0(idx);
never executed: ptmp = X509_PURPOSE_get0(idx);
0
265-
266-
267 if (ptmp->flags & 0x2
ptmp->flags & 0x2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
268 CRYPTO_free(ptmp->name, __FILE__, 175);-
269 CRYPTO_free(ptmp->sname, __FILE__, 176);-
270 }
never executed: end of block
0
271-
272 ptmp->name = CRYPTO_strdup(name, __FILE__, 179);-
273 ptmp->sname = CRYPTO_strdup(sname, __FILE__, 180);-
274 if (!ptmp->name
!ptmp->nameDescription
TRUEnever evaluated
FALSEnever evaluated
|| !ptmp->sname
!ptmp->snameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
275 ERR_put_error(34,(137),((1|64)),__FILE__,182);-
276 goto
never executed: goto err;
err;
never executed: goto err;
0
277 }-
278-
279 ptmp->flags &= 0x1;-
280-
281 ptmp->flags |= flags;-
282-
283 ptmp->purpose = id;-
284 ptmp->trust = trust;-
285 ptmp->check_purpose = ck;-
286 ptmp->usr_data = arg;-
287-
288-
289 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
290 if (xptable ==
xptable == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
291 ((void *)0)
xptable == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
292 -
293 && (
(xptable = sk_...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
xptable = sk_X509_PURPOSE_new(xp_cmp)) ==
(xptable = sk_...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
294 ((void *)0)
(xptable = sk_...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
295 ) {-
296 ERR_put_error(34,(137),((1|64)),__FILE__,199);-
297 goto
never executed: goto err;
err;
never executed: goto err;
0
298 }-
299 if (!sk_X509_PURPOSE_push(xptable, ptmp)
!sk_X509_PURPO...xptable, ptmp)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
300 ERR_put_error(34,(137),((1|64)),__FILE__,203);-
301 goto
never executed: goto err;
err;
never executed: goto err;
0
302 }-
303 }
never executed: end of block
0
304 return
never executed: return 1;
1;
never executed: return 1;
0
305 err:-
306 if (idx == -1
idx == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
307 CRYPTO_free(ptmp->name, __FILE__, 210);-
308 CRYPTO_free(ptmp->sname, __FILE__, 211);-
309 CRYPTO_free(ptmp, __FILE__, 212);-
310 }
never executed: end of block
0
311 return
never executed: return 0;
0;
never executed: return 0;
0
312}-
313-
314static void xptable_free(X509_PURPOSE *p)-
315{-
316 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
317 return;
never executed: return;
0
318 if (p->flags & 0x1
p->flags & 0x1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
319 if (p->flags & 0x2
p->flags & 0x2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
320 CRYPTO_free(p->name, __FILE__, 223);-
321 CRYPTO_free(p->sname, __FILE__, 224);-
322 }
never executed: end of block
0
323 CRYPTO_free(p, __FILE__, 226);-
324 }
never executed: end of block
0
325}
never executed: end of block
0
326-
327void X509_PURPOSE_cleanup(void)-
328{-
329 sk_X509_PURPOSE_pop_free(xptable, xptable_free);-
330 xptable = -
331 ((void *)0)-
332 ;-
333}
never executed: end of block
0
334-
335int X509_PURPOSE_get_id(const X509_PURPOSE *xp)-
336{-
337 return
executed 134 times by 1 test: return xp->purpose;
Executed by:
  • libcrypto.so.1.1
xp->purpose;
executed 134 times by 1 test: return xp->purpose;
Executed by:
  • libcrypto.so.1.1
134
338}-
339-
340char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp)-
341{-
342 return
never executed: return xp->name;
xp->name;
never executed: return xp->name;
0
343}-
344-
345char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp)-
346{-
347 return
never executed: return xp->sname;
xp->sname;
never executed: return xp->sname;
0
348}-
349-
350int X509_PURPOSE_get_trust(const X509_PURPOSE *xp)-
351{-
352 return
executed 133 times by 1 test: return xp->trust;
Executed by:
  • libcrypto.so.1.1
xp->trust;
executed 133 times by 1 test: return xp->trust;
Executed by:
  • libcrypto.so.1.1
133
353}-
354-
355static int nid_cmp(const int *a, const int *b)-
356{-
357 return
executed 15812 times by 1 test: return *a - *b;
Executed by:
  • libcrypto.so.1.1
*a - *b;
executed 15812 times by 1 test: return *a - *b;
Executed by:
  • libcrypto.so.1.1
15812
358}-
359-
360static int nid_cmp_BSEARCH_CMP_FN(const void *, const void *); static int nid_cmp(int const *, int const *); static int * OBJ_bsearch_nid(int *key, int const *base, int num);-
361static int nid_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) { int const *a = a_; int const *b = b_; return
executed 15812 times by 1 test: return nid_cmp(a,b);
Executed by:
  • libcrypto.so.1.1
nid_cmp(a,b);
executed 15812 times by 1 test: return nid_cmp(a,b);
Executed by:
  • libcrypto.so.1.1
} static int *OBJ_bsearch_nid(int *key, int const *base, int num) { return
executed 6328 times by 1 test: return (int *)OBJ_bsearch_(key, base, num, sizeof(int), nid_cmp_BSEARCH_CMP_FN);
Executed by:
  • libcrypto.so.1.1
(int *)OBJ_bsearch_(key, base, num, sizeof(int), nid_cmp_BSEARCH_CMP_FN);
executed 6328 times by 1 test: return (int *)OBJ_bsearch_(key, base, num, sizeof(int), nid_cmp_BSEARCH_CMP_FN);
Executed by:
  • libcrypto.so.1.1
} extern void dummy_prototype(void);
6328-15812
362-
363int X509_supported_extension(X509_EXTENSION *ex)-
364{-
365 static const int supported_nids[] = {-
366 71,-
367 83,-
368 85,-
369 87,-
370 89,-
371 103,-
372 126,-
373-
374 290,-
375 291,-
376-
377 401,-
378 663,-
379 666,-
380 747,-
381 748-
382 };-
383-
384 int ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));-
385-
386 if (ex_nid == 0
ex_nid == 0Description
TRUEevaluated 94 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6328 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
94-6328
387 return
executed 94 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 94 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
94
388-
389 if (OBJ_bsearch_nid(&ex_nid, supported_nids, (sizeof(supported_nids)/sizeof((supported_nids)[0])))
OBJ_bsearch_ni...ed_nids)[0])))Description
TRUEevaluated 6307 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
21-6307
390 return
executed 6307 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 6307 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
6307
391 return
executed 21 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 21 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
21
392}-
393-
394static void setup_dp(X509 *x, DIST_POINT *dp)-
395{-
396 X509_NAME *iname = -
397 ((void *)0)-
398 ;-
399 int i;-
400 if (dp->reasons
dp->reasonsDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-38
401 if (dp->reasons->length > 0
dp->reasons->length > 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-1
402 dp->dp_reasons = dp->reasons->data[0];
executed 1 time by 1 test: dp->dp_reasons = dp->reasons->data[0];
Executed by:
  • libcrypto.so.1.1
1
403 if (dp->reasons->length > 1
dp->reasons->length > 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-1
404 dp->dp_reasons |= (dp->reasons->data[1] << 8);
executed 1 time by 1 test: dp->dp_reasons |= (dp->reasons->data[1] << 8);
Executed by:
  • libcrypto.so.1.1
1
405 dp->dp_reasons &= 0x807f;-
406 }
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
1
407 dp->dp_reasons = 0x807f;
executed 38 times by 1 test: dp->dp_reasons = 0x807f;
Executed by:
  • libcrypto.so.1.1
38
408 if (!dp->distpoint
!dp->distpointDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (
(dp->distpoint->type != 1)Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
dp->distpoint->type != 1)
(dp->distpoint->type != 1)Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-38
409 return;
executed 39 times by 1 test: return;
Executed by:
  • libcrypto.so.1.1
39
410 for (i = 0; i < sk_GENERAL_NAME_num(dp->CRLissuer)
i < sk_GENERAL...dp->CRLissuer)Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
411 GENERAL_NAME *gen = sk_GENERAL_NAME_value(dp->CRLissuer, i);-
412 if (gen->type == 4
gen->type == 4Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
413 iname = gen->d.directoryName;-
414 break;
never executed: break;
0
415 }-
416 }
never executed: end of block
0
417 if (!iname
!inameDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
418 iname = X509_get_issuer_name(x);
never executed: iname = X509_get_issuer_name(x);
0
419-
420 DIST_POINT_set_dpname(dp->distpoint, iname);-
421-
422}
never executed: end of block
0
423-
424static void setup_crldp(X509 *x)-
425{-
426 int i;-
427 x->crldp = X509_get_ext_d2i(x, 103, -
428 ((void *)0)-
429 , -
430 ((void *)0)-
431 );-
432 for (i = 0; i < sk_DIST_POINT_num(x->crldp)
i < sk_DIST_PO..._num(x->crldp)Description
TRUEevaluated 39 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++)
39-12501
433 setup_dp(x, sk_DIST_POINT_value(x->crldp, i));
executed 39 times by 1 test: setup_dp(x, sk_DIST_POINT_value(x->crldp, i));
Executed by:
  • libcrypto.so.1.1
39
434}
executed 12501 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
12501
435static void x509v3_cache_extensions(X509 *x)-
436{-
437 BASIC_CONSTRAINTS *bs;-
438 PROXY_CERT_INFO_EXTENSION *pci;-
439 ASN1_BIT_STRING *usage;-
440 ASN1_BIT_STRING *ns;-
441 EXTENDED_KEY_USAGE *extusage;-
442 X509_EXTENSION *ex;-
443 int i;-
444-
445-
446-
447 if (-
448 __extension__ ({ __auto_type __atomic_load_ptr = (
__extension__ ...c_load_tmp; })Description
TRUEevaluated 34901 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
12501-34901
449 ((_Atomic int *)&x->ex_cached)
__extension__ ...c_load_tmp; })Description
TRUEevaluated 34901 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
12501-34901
450 ); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (
__extension__ ...c_load_tmp; })Description
TRUEevaluated 34901 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
12501-34901
451 memory_order_acquire
__extension__ ...c_load_tmp; })Description
TRUEevaluated 34901 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
12501-34901
452 )); __atomic_load_tmp; })
__extension__ ...c_load_tmp; })Description
TRUEevaluated 34901 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
12501-34901
453 )-
454 return;
executed 34901 times by 1 test: return;
Executed by:
  • libcrypto.so.1.1
34901
455-
456-
457 CRYPTO_THREAD_write_lock(x->lock);-
458 if (x->ex_flags & 0x100
x->ex_flags & 0x100Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-12501
459 CRYPTO_THREAD_unlock(x->lock);-
460 return;
never executed: return;
0
461 }-
462-
463 X509_digest(x, EVP_sha1(), x->sha1_hash, -
464 ((void *)0)-
465 );-
466-
467 if (!X509_get_version(x)
!X509_get_version(x)Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12492 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
9-12492
468 x->ex_flags |= 0x40;
executed 9 times by 1 test: x->ex_flags |= 0x40;
Executed by:
  • libcrypto.so.1.1
9
469-
470 if ((
(bs = X509_get...((void *)0) ))Description
TRUEevaluated 11988 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bs = X509_get_ext_d2i(x, 87,
(bs = X509_get...((void *)0) ))Description
TRUEevaluated 11988 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
513-11988
471 ((void *)0)
(bs = X509_get...((void *)0) ))Description
TRUEevaluated 11988 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
513-11988
472 ,
(bs = X509_get...((void *)0) ))Description
TRUEevaluated 11988 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
513-11988
473 ((void *)0)
(bs = X509_get...((void *)0) ))Description
TRUEevaluated 11988 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
513-11988
474 ))
(bs = X509_get...((void *)0) ))Description
TRUEevaluated 11988 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 513 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
513-11988
475 if (bs->ca
bs->caDescription
TRUEevaluated 1726 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 10262 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1726-10262
476 x->ex_flags |= 0x10;
executed 1726 times by 1 test: x->ex_flags |= 0x10;
Executed by:
  • libcrypto.so.1.1
1726
477 if (bs->pathlen
bs->pathlenDescription
TRUEevaluated 113 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11875 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
113-11875
478 if ((
(bs->pathlen->...= (2 | 0x100))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bs->pathlen->type == (2 | 0x100))
(bs->pathlen->...= (2 | 0x100))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3-110
479 || !bs->ca
!bs->caDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 62 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
48-62
480 x->ex_flags |= 0x80;-
481 x->ex_pathlen = 0;-
482 }
executed 51 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
51
483 x->ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
executed 62 times by 1 test: x->ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
Executed by:
  • libcrypto.so.1.1
62
484 } else-
485 x->ex_pathlen = -1;
executed 11875 times by 1 test: x->ex_pathlen = -1;
Executed by:
  • libcrypto.so.1.1
11875
486 BASIC_CONSTRAINTS_free(bs);-
487 x->ex_flags |= 0x1;-
488 }
executed 11988 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
11988
489-
490 if ((
(pci = X509_ge...((void *)0) ))Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
pci = X509_get_ext_d2i(x, 663,
(pci = X509_ge...((void *)0) ))Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
34-12467
491 ((void *)0)
(pci = X509_ge...((void *)0) ))Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
34-12467
492 ,
(pci = X509_ge...((void *)0) ))Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
34-12467
493 ((void *)0)
(pci = X509_ge...((void *)0) ))Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
34-12467
494 ))
(pci = X509_ge...((void *)0) ))Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
34-12467
495 if (x->ex_flags & 0x10
x->ex_flags & 0x10Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 33 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-33
496 || X509_get_ext_by_NID(x, 85, -1) >= 0
X509_get_ext_b..., 85, -1) >= 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
9-24
497 || X509_get_ext_by_NID(x, 86, -1) >= 0
X509_get_ext_b..., 86, -1) >= 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4-20
498 x->ex_flags |= 0x80;-
499 }
executed 14 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
14
500 if (pci->pcPathLengthConstraint
pci->pcPathLengthConstraintDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
13-21
501 x->ex_pcpathlen = ASN1_INTEGER_get(pci->pcPathLengthConstraint);-
502 }
executed 13 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
13
503 x->ex_pcpathlen = -1;
executed 21 times by 1 test: x->ex_pcpathlen = -1;
Executed by:
  • libcrypto.so.1.1
21
504 PROXY_CERT_INFO_EXTENSION_free(pci);-
505 x->ex_flags |= 0x400;-
506 }
executed 34 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
34
507-
508 if ((
(usage = X509_...((void *)0) ))Description
TRUEevaluated 8144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4357 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
usage = X509_get_ext_d2i(x, 83,
(usage = X509_...((void *)0) ))Description
TRUEevaluated 8144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4357 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4357-8144
509 ((void *)0)
(usage = X509_...((void *)0) ))Description
TRUEevaluated 8144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4357 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4357-8144
510 ,
(usage = X509_...((void *)0) ))Description
TRUEevaluated 8144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4357 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4357-8144
511 ((void *)0)
(usage = X509_...((void *)0) ))Description
TRUEevaluated 8144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4357 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4357-8144
512 ))
(usage = X509_...((void *)0) ))Description
TRUEevaluated 8144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4357 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4357-8144
513 if (usage->length > 0
usage->length > 0Description
TRUEevaluated 8141 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3-8141
514 x->ex_kusage = usage->data[0];-
515 if (usage->length > 1
usage->length > 1Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8138 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
3-8138
516 x->ex_kusage |= usage->data[1] << 8;
executed 3 times by 1 test: x->ex_kusage |= usage->data[1] << 8;
Executed by:
  • libcrypto.so.1.1
3
517 }
executed 8141 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
8141
518 x->ex_kusage = 0;
executed 3 times by 1 test: x->ex_kusage = 0;
Executed by:
  • libcrypto.so.1.1
3
519 x->ex_flags |= 0x2;-
520 ASN1_BIT_STRING_free(usage);-
521 }
executed 8144 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8144
522 x->ex_xkusage = 0;-
523 if ((
(extusage = X5...((void *)0) ))Description
TRUEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4497 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
extusage = X509_get_ext_d2i(x, 126,
(extusage = X5...((void *)0) ))Description
TRUEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4497 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4497-8004
524 ((void *)0)
(extusage = X5...((void *)0) ))Description
TRUEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4497 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4497-8004
525 ,
(extusage = X5...((void *)0) ))Description
TRUEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4497 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4497-8004
526 ((void *)0)
(extusage = X5...((void *)0) ))Description
TRUEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4497 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
4497-8004
527 ))
(extusage = X5...((void *)0) ))Description
TRUEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4497 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4497-8004
528 x->ex_flags |= 0x4;-
529 for (i = 0; i < sk_ASN1_OBJECT_num(extusage)
i < sk_ASN1_OB..._num(extusage)Description
TRUEevaluated 8096 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8004 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
8004-8096
530 switch (OBJ_obj2nid(sk_ASN1_OBJECT_value(extusage, i))) {-
531 case
executed 7820 times by 1 test: case 129:
Executed by:
  • libcrypto.so.1.1
129:
executed 7820 times by 1 test: case 129:
Executed by:
  • libcrypto.so.1.1
7820
532 x->ex_xkusage |= 0x1;-
533 break;
executed 7820 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
7820
534-
535 case
executed 141 times by 1 test: case 130:
Executed by:
  • libcrypto.so.1.1
130:
executed 141 times by 1 test: case 130:
Executed by:
  • libcrypto.so.1.1
141
536 x->ex_xkusage |= 0x2;-
537 break;
executed 141 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
141
538-
539 case
executed 13 times by 1 test: case 132:
Executed by:
  • libcrypto.so.1.1
132:
executed 13 times by 1 test: case 132:
Executed by:
  • libcrypto.so.1.1
13
540 x->ex_xkusage |= 0x4;-
541 break;
executed 13 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
13
542-
543 case
executed 1 time by 1 test: case 131:
Executed by:
  • libcrypto.so.1.1
131:
executed 1 time by 1 test: case 131:
Executed by:
  • libcrypto.so.1.1
1
544 x->ex_xkusage |= 0x8;-
545 break;
executed 1 time by 1 test: break;
Executed by:
  • libcrypto.so.1.1
1
546-
547 case
executed 4 times by 1 test: case 137:
Executed by:
  • libcrypto.so.1.1
137:
executed 4 times by 1 test: case 137:
Executed by:
  • libcrypto.so.1.1
4
548 case
never executed: case 139:
139:
never executed: case 139:
0
549 x->ex_xkusage |= 0x10;-
550 break;
executed 4 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
4
551-
552 case
executed 21 times by 1 test: case 180:
Executed by:
  • libcrypto.so.1.1
180:
executed 21 times by 1 test: case 180:
Executed by:
  • libcrypto.so.1.1
21
553 x->ex_xkusage |= 0x20;-
554 break;
executed 21 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
21
555-
556 case
executed 10 times by 1 test: case 133:
Executed by:
  • libcrypto.so.1.1
133:
executed 10 times by 1 test: case 133:
Executed by:
  • libcrypto.so.1.1
10
557 x->ex_xkusage |= 0x40;-
558 break;
executed 10 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
10
559-
560 case
executed 10 times by 1 test: case 297:
Executed by:
  • libcrypto.so.1.1
297:
executed 10 times by 1 test: case 297:
Executed by:
  • libcrypto.so.1.1
10
561 x->ex_xkusage |= 0x80;-
562 break;
executed 10 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
10
563-
564 case
never executed: case 910:
910:
never executed: case 910:
0
565 x->ex_xkusage |= 0x100;-
566 break;
never executed: break;
0
567 }-
568 }
executed 8096 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8096
569 sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free);-
570 }
executed 8004 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8004
571-
572 if ((
(ns = X509_get...((void *)0) ))Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ns = X509_get_ext_d2i(x, 71,
(ns = X509_get...((void *)0) ))Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-12501
573 ((void *)0)
(ns = X509_get...((void *)0) ))Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-12501
574 ,
(ns = X509_get...((void *)0) ))Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-12501
575 ((void *)0)
(ns = X509_get...((void *)0) ))Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-12501
576 ))
(ns = X509_get...((void *)0) ))Description
TRUEnever evaluated
FALSEevaluated 12501 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-12501
577 if (ns->length > 0
ns->length > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
578 x->ex_nscert = ns->data[0];
never executed: x->ex_nscert = ns->data[0];
0
579 else-
580 x->ex_nscert = 0;
never executed: x->ex_nscert = 0;
0
581 x->ex_flags |= 0x8;-
582 ASN1_BIT_STRING_free(ns);-
583 }
never executed: end of block
0
584 x->skid = X509_get_ext_d2i(x, 82, -
585 ((void *)0)-
586 , -
587 ((void *)0)-
588 );-
589 x->akid = X509_get_ext_d2i(x, 90, -
590 ((void *)0)-
591 , -
592 ((void *)0)-
593 );-
594-
595 if (!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))
!X509_NAME_cmp...ssuer_name(x))Description
TRUEevaluated 6831 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5670 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5670-6831
596 x->ex_flags |= 0x20;-
597-
598 if (X509_check_akid(x, x->akid) == 0
X509_check_aki... x->akid) == 0Description
TRUEevaluated 6815 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 16 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&&
16-6815
599 !(((
((x)->ex_flags & 0x2)Description
TRUEevaluated 5697 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEevaluated 5697 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_kusage & (0x0004))
!((x)->ex_kusage & (0x0004))Description
TRUEevaluated 5585 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 112 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
112-5697
600 x->ex_flags |= 0x2000;
executed 1230 times by 1 test: x->ex_flags |= 0x2000;
Executed by:
  • libcrypto.so.1.1
1230
601 }
executed 6831 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
6831
602 x->altname = X509_get_ext_d2i(x, 85, -
603 ((void *)0)-
604 , -
605 ((void *)0)-
606 );-
607 x->nc = X509_get_ext_d2i(x, 666, &i, -
608 ((void *)0)-
609 );-
610 if (!x->nc
!x->ncDescription
TRUEevaluated 12470 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(i != -1)Description
TRUEevaluated 110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12360 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
i != -1)
(i != -1)Description
TRUEevaluated 110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12360 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
31-12470
611 x->ex_flags |= 0x80;
executed 110 times by 1 test: x->ex_flags |= 0x80;
Executed by:
  • libcrypto.so.1.1
110
612 setup_crldp(x);-
613-
614-
615 x->rfc3779_addr = X509_get_ext_d2i(x, 290, -
616 ((void *)0)-
617 , -
618 ((void *)0)-
619 );-
620 x->rfc3779_asid = X509_get_ext_d2i(x, 291,-
621 -
622 ((void *)0)-
623 , -
624 ((void *)0)-
625 );-
626-
627 for (i = 0; i < X509_get_ext_count(x)
i < X509_get_ext_count(x)Description
TRUEevaluated 51071 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12386 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
12386-51071
628 ex = X509_get_ext(x, i);-
629 if (OBJ_obj2nid(X509_EXTENSION_get_object(ex))
OBJ_obj2nid(X5...ct(ex)) == 857Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 51058 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
13-51058
630 == 857
OBJ_obj2nid(X5...ct(ex)) == 857Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 51058 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
13-51058
631 x->ex_flags |= 0x1000;
executed 13 times by 1 test: x->ex_flags |= 0x1000;
Executed by:
  • libcrypto.so.1.1
13
632 if (!X509_EXTENSION_get_critical(ex)
!X509_EXTENSIO...t_critical(ex)Description
TRUEevaluated 44649 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6422 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
6422-44649
633 continue;
executed 44649 times by 1 test: continue;
Executed by:
  • libcrypto.so.1.1
44649
634 if (!X509_supported_extension(ex)
!X509_supported_extension(ex)Description
TRUEevaluated 115 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6307 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
115-6307
635 x->ex_flags |= 0x200;-
636 break;
executed 115 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
115
637 }-
638 }
executed 6307 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
6307
639 x509_init_sig_info(x);-
640 x->ex_flags |= 0x100;-
641-
642 -
643 __extension__ ({ __auto_type __atomic_store_ptr = (-
644 ((_Atomic int *)&x->ex_cached)-
645 ); __typeof__ (*__atomic_store_ptr) __atomic_store_tmp = (-
646 (1)-
647 ); __atomic_store (__atomic_store_ptr, &__atomic_store_tmp, (-
648 memory_order_release-
649 )); })-
650 ;-
651-
652-
653-
654-
655-
656-
657 CRYPTO_THREAD_unlock(x->lock);-
658}
executed 12501 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
12501
659static int check_ca(const X509 *x)-
660{-
661-
662 if ((((
((x)->ex_flags & 0x2)Description
TRUEevaluated 482 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3461 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEevaluated 482 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3461 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_kusage & (0x0004))
!((x)->ex_kusage & (0x0004))Description
TRUEevaluated 238 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 244 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
238-3461
663 return
executed 238 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 238 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
238
664 if (x->ex_flags & 0x1
x->ex_flags & 0x1Description
TRUEevaluated 3701 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4-3701
665 if (x->ex_flags & 0x10
x->ex_flags & 0x10Description
TRUEevaluated 2591 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1110 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1110-2591
666 return
executed 2591 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 2591 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
2591
667-
668 else-
669 return
executed 1110 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 1110 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1110
670 } else {-
671-
672 if ((
(x->ex_flags &... (0x40|0x2000)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x->ex_flags & (0x40|0x2000)) == (0x40|0x2000)
(x->ex_flags &... (0x40|0x2000)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4
673 return
never executed: return 3;
3;
never executed: return 3;
0
674-
675-
676-
677 else if (x->ex_flags & 0x2
x->ex_flags & 0x2Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-4
678 return
executed 4 times by 1 test: return 4;
Executed by:
  • libcrypto.so.1.1
4;
executed 4 times by 1 test: return 4;
Executed by:
  • libcrypto.so.1.1
4
679-
680 else if (x->ex_flags & 0x8
x->ex_flags & 0x8Description
TRUEnever evaluated
FALSEnever evaluated
&& x->ex_nscert & (0x04|0x02|0x01)
x->ex_nscert &...x04|0x02|0x01)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
681 return
never executed: return 5;
5;
never executed: return 5;
0
682-
683 return
never executed: return 0;
0;
never executed: return 0;
0
684 }-
685}-
686-
687void X509_set_proxy_flag(X509 *x)-
688{-
689 x->ex_flags |= 0x400;-
690}
never executed: end of block
0
691-
692void X509_set_proxy_pathlen(X509 *x, long l)-
693{-
694 x->ex_pcpathlen = l;-
695}
never executed: end of block
0
696-
697int X509_check_ca(X509 *x)-
698{-
699 x509v3_cache_extensions(x);-
700-
701 return
executed 2668 times by 1 test: return check_ca(x);
Executed by:
  • libcrypto.so.1.1
check_ca(x);
executed 2668 times by 1 test: return check_ca(x);
Executed by:
  • libcrypto.so.1.1
2668
702}-
703-
704-
705static int check_ssl_ca(const X509 *x)-
706{-
707 int ca_ret;-
708 ca_ret = check_ca(x);-
709 if (!ca_ret
!ca_retDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
3-1170
710 return
executed 3 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 3 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
3
711-
712 if (ca_ret != 5
ca_ret != 5Description
TRUEevaluated 1170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
|| x->ex_nscert & 0x04
x->ex_nscert & 0x04Description
TRUEnever evaluated
FALSEnever evaluated
)
0-1170
713 return
executed 1170 times by 1 test: return ca_ret;
Executed by:
  • libcrypto.so.1.1
ca_ret;
executed 1170 times by 1 test: return ca_ret;
Executed by:
  • libcrypto.so.1.1
1170
714 else-
715 return
never executed: return 0;
0;
never executed: return 0;
0
716}-
717-
718static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x,-
719 int ca)-
720{-
721 if ((((
((x)->ex_flags & 0x4)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 84 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x4)
((x)->ex_flags & 0x4)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 84 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_xkusage & (0x2))
!((x)->ex_xkusage & (0x2))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 35 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
1-84
722 return
executed 1 time by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 1 time by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1
723 if (ca
caDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 49 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
49-70
724 return
executed 70 times by 1 test: return check_ssl_ca(x);
Executed by:
  • libcrypto.so.1.1
check_ssl_ca(x);
executed 70 times by 1 test: return check_ssl_ca(x);
Executed by:
  • libcrypto.so.1.1
70
725-
726 if ((((
((x)->ex_flags & 0x2)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 44 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_kusage & (0x0080 | 0x0008))
!((x)->ex_kusa...080 | 0x0008))Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
0-44
727 return
never executed: return 0;
0;
never executed: return 0;
0
728-
729 if ((((
((x)->ex_flags & 0x8)Description
TRUEnever evaluated
FALSEevaluated 49 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x8)
((x)->ex_flags & 0x8)Description
TRUEnever evaluated
FALSEevaluated 49 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_nscert & (0x80))
!((x)->ex_nscert & (0x80))Description
TRUEnever evaluated
FALSEnever evaluated
))
0-49
730 return
never executed: return 0;
0;
never executed: return 0;
0
731 return
executed 49 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 49 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
49
732}-
733static int check_purpose_ssl_server(const X509_PURPOSE *xp, const X509 *x,-
734 int ca)-
735{-
736 if ((((
((x)->ex_flags & 0x4)Description
TRUEevaluated 1041 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1232 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x4)
((x)->ex_flags & 0x4)Description
TRUEevaluated 1041 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1232 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_xkusage & (0x1 | 0x10))
!((x)->ex_xkus... (0x1 | 0x10))Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1036 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
5-1232
737 return
executed 5 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 5 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
5
738 if (ca
caDescription
TRUEevaluated 1103 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1165 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
1103-1165
739 return
executed 1103 times by 1 test: return check_ssl_ca(x);
Executed by:
  • libcrypto.so.1.1
check_ssl_ca(x);
executed 1103 times by 1 test: return check_ssl_ca(x);
Executed by:
  • libcrypto.so.1.1
1103
740-
741 if ((((
((x)->ex_flags & 0x8)Description
TRUEnever evaluated
FALSEevaluated 1165 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x8)
((x)->ex_flags & 0x8)Description
TRUEnever evaluated
FALSEevaluated 1165 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_nscert & (0x40))
!((x)->ex_nscert & (0x40))Description
TRUEnever evaluated
FALSEnever evaluated
))
0-1165
742 return
never executed: return 0;
0;
never executed: return 0;
0
743 if ((((
((x)->ex_flags & 0x2)Description
TRUEevaluated 127 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1038 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEevaluated 127 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1038 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_kusage & (0x0080|0x0020|0x0008))
!((x)->ex_kusa...x0020|0x0008))Description
TRUEnever evaluated
FALSEevaluated 127 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
0-1038
744 return
never executed: return 0;
0;
never executed: return 0;
0
745-
746 return
executed 1165 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1165 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1165
747-
748}-
749-
750static int check_purpose_ns_ssl_server(const X509_PURPOSE *xp, const X509 *x,-
751 int ca)-
752{-
753 int ret;-
754 ret = check_purpose_ssl_server(xp, x, ca);-
755 if (!ret
!retDescription
TRUEnever evaluated
FALSEnever evaluated
|| ca
caDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
756 return
never executed: return ret;
ret;
never executed: return ret;
0
757-
758 if ((((
((x)->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
&& !((x)->ex_kusage & (0x0020))
!((x)->ex_kusage & (0x0020))Description
TRUEnever evaluated
FALSEnever evaluated
))
0
759 return
never executed: return 0;
0;
never executed: return 0;
0
760 return
never executed: return ret;
ret;
never executed: return ret;
0
761}-
762-
763-
764static int purpose_smime(const X509 *x, int ca)-
765{-
766 if ((((
((x)->ex_flags & 0x4)Description
TRUEnever evaluated
FALSEevaluated 176 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
x)->ex_flags & 0x4)
((x)->ex_flags & 0x4)Description
TRUEnever evaluated
FALSEevaluated 176 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((x)->ex_xkusage & (0x4))
!((x)->ex_xkusage & (0x4))Description
TRUEnever evaluated
FALSEnever evaluated
))
0-176
767 return
never executed: return 0;
0;
never executed: return 0;
0
768 if (ca
caDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
88
769 int ca_ret;-
770 ca_ret = check_ca(x);-
771 if (!ca_ret
!ca_retDescription
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-88
772 return
never executed: return 0;
0;
never executed: return 0;
0
773-
774 if (ca_ret != 5
ca_ret != 5Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
|| x->ex_nscert & 0x02
x->ex_nscert & 0x02Description
TRUEnever evaluated
FALSEnever evaluated
)
0-88
775 return
executed 88 times by 1 test: return ca_ret;
Executed by:
  • libcrypto.so.1.1
ca_ret;
executed 88 times by 1 test: return ca_ret;
Executed by:
  • libcrypto.so.1.1
88
776 else-
777 return
never executed: return 0;
0;
never executed: return 0;
0
778 }-
779 if (x->ex_flags & 0x8
x->ex_flags & 0x8Description
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-88
780 if (x->ex_nscert & 0x20
x->ex_nscert & 0x20Description
TRUEnever evaluated
FALSEnever evaluated
)
0
781 return
never executed: return 1;
1;
never executed: return 1;
0
782-
783 if (x->ex_nscert & 0x80
x->ex_nscert & 0x80Description
TRUEnever evaluated
FALSEnever evaluated
)
0
784 return
never executed: return 2;
2;
never executed: return 2;
0
785 return
never executed: return 0;
0;
never executed: return 0;
0
786 }-
787 return
executed 88 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 88 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
88
788}-
789-
790static int check_purpose_smime_sign(const X509_PURPOSE *xp, const X509 *x,-
791 int ca)-
792{-
793 int ret;-
794 ret = purpose_smime(x, ca);-
795 if (!ret
!retDescription
TRUEnever evaluated
FALSEevaluated 176 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| ca
caDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-176
796 return
executed 88 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 88 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
88
797 if ((((
((x)->ex_flags & 0x2)Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& !((x)->ex_kusage & (0x0080 | 0x0040))
!((x)->ex_kusa...080 | 0x0040))Description
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
0-88
798 return
never executed: return 0;
0;
never executed: return 0;
0
799 return
executed 88 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 88 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
88
800}-
801-
802static int check_purpose_smime_encrypt(const X509_PURPOSE *xp, const X509 *x,-
803 int ca)-
804{-
805 int ret;-
806 ret = purpose_smime(x, ca);-
807 if (!ret
!retDescription
TRUEnever evaluated
FALSEnever evaluated
|| ca
caDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
808 return
never executed: return ret;
ret;
never executed: return ret;
0
809 if ((((
((x)->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
&& !((x)->ex_kusage & (0x0020))
!((x)->ex_kusage & (0x0020))Description
TRUEnever evaluated
FALSEnever evaluated
))
0
810 return
never executed: return 0;
0;
never executed: return 0;
0
811 return
never executed: return ret;
ret;
never executed: return ret;
0
812}-
813-
814static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x,-
815 int ca)-
816{-
817 if (ca
caDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
818 int ca_ret;-
819 if ((
(ca_ret = check_ca(x)) != 2Description
TRUEnever evaluated
FALSEnever evaluated
ca_ret = check_ca(x)) != 2
(ca_ret = check_ca(x)) != 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
820 return
never executed: return ca_ret;
ca_ret;
never executed: return ca_ret;
0
821 else-
822 return
never executed: return 0;
0;
never executed: return 0;
0
823 }-
824 if ((((
((x)->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
x)->ex_flags & 0x2)
((x)->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
&& !((x)->ex_kusage & (0x0002))
!((x)->ex_kusage & (0x0002))Description
TRUEnever evaluated
FALSEnever evaluated
))
0
825 return
never executed: return 0;
0;
never executed: return 0;
0
826 return
never executed: return 1;
1;
never executed: return 1;
0
827}-
828-
829-
830-
831-
832-
833-
834static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca)-
835{-
836-
837-
838-
839-
840 if (ca
caDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
14-22
841 return
executed 14 times by 1 test: return check_ca(x);
Executed by:
  • libcrypto.so.1.1
check_ca(x);
executed 14 times by 1 test: return check_ca(x);
Executed by:
  • libcrypto.so.1.1
14
842-
843 return
executed 22 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 22 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
22
844}-
845-
846static int check_purpose_timestamp_sign(const X509_PURPOSE *xp, const X509 *x,-
847 int ca)-
848{-
849 int i_ext;-
850-
851-
852 if (ca
caDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
853 return
never executed: return check_ca(x);
check_ca(x);
never executed: return check_ca(x);
0
854-
855-
856-
857-
858-
859-
860-
861 if ((
(x->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
x->ex_flags & 0x2)
(x->ex_flags & 0x2)Description
TRUEnever evaluated
FALSEnever evaluated
0
862 && ((
(x->ex_kusage ...040 | 0x0080))Description
TRUEnever evaluated
FALSEnever evaluated
x->ex_kusage & ~(0x0040 | 0x0080))
(x->ex_kusage ...040 | 0x0080))Description
TRUEnever evaluated
FALSEnever evaluated
||
0
863 !(x->ex_kusage & (0x0040 | 0x0080))
!(x->ex_kusage...040 | 0x0080))Description
TRUEnever evaluated
FALSEnever evaluated
))
0
864 return
never executed: return 0;
0;
never executed: return 0;
0
865-
866-
867 if (!(x->ex_flags & 0x4)
!(x->ex_flags & 0x4)Description
TRUEnever evaluated
FALSEnever evaluated
|| x->ex_xkusage != 0x40
x->ex_xkusage != 0x40Description
TRUEnever evaluated
FALSEnever evaluated
)
0
868 return
never executed: return 0;
0;
never executed: return 0;
0
869-
870-
871 i_ext = X509_get_ext_by_NID(x, 126, -1);-
872 if (i_ext >= 0
i_ext >= 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
873 X509_EXTENSION *ext = X509_get_ext((X509 *)x, i_ext);-
874 if (!X509_EXTENSION_get_critical(ext)
!X509_EXTENSIO..._critical(ext)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
875 return
never executed: return 0;
0;
never executed: return 0;
0
876 }
never executed: end of block
0
877-
878 return
never executed: return 1;
1;
never executed: return 1;
0
879}-
880-
881static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca)-
882{-
883 return
never executed: return 1;
1;
never executed: return 1;
0
884}-
885int X509_check_issued(X509 *issuer, X509 *subject)-
886{-
887 if (X509_NAME_cmp(X509_get_subject_name(issuer),
X509_NAME_cmp(...name(subject))Description
TRUEevaluated 715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1696 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
715-1696
888 X509_get_issuer_name(subject))
X509_NAME_cmp(...name(subject))Description
TRUEevaluated 715 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1696 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
715-1696
889 return
executed 715 times by 1 test: return 29;
Executed by:
  • libcrypto.so.1.1
29;
executed 715 times by 1 test: return 29;
Executed by:
  • libcrypto.so.1.1
715
890-
891 x509v3_cache_extensions(issuer);-
892 x509v3_cache_extensions(subject);-
893-
894 if (subject->akid
subject->akidDescription
TRUEevaluated 1432 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 264 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
264-1432
895 int ret = X509_check_akid(issuer, subject->akid);-
896 if (ret != 0
ret != 0Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
23-1409
897 return
executed 23 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 23 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
23
898 }
executed 1409 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1409
899-
900 if (subject->ex_flags & 0x400
subject->ex_flags & 0x400Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1647 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
26-1647
901 if ((((
((issuer)->ex_flags & 0x2)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
issuer)->ex_flags & 0x2)
((issuer)->ex_flags & 0x2)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((issuer)->ex_kusage & (0x0080))
!((issuer)->ex...ge & (0x0080))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
1-22
902 return
executed 1 time by 1 test: return 39;
Executed by:
  • libcrypto.so.1.1
39;
executed 1 time by 1 test: return 39;
Executed by:
  • libcrypto.so.1.1
1
903 }
executed 25 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if ((((
((issuer)->ex_flags & 0x2)Description
TRUEevaluated 232 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1415 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
issuer)->ex_flags & 0x2)
((issuer)->ex_flags & 0x2)Description
TRUEevaluated 232 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1415 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((issuer)->ex_kusage & (0x0004))
!((issuer)->ex...ge & (0x0004))Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 211 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
21-1415
904 return
executed 21 times by 1 test: return 32;
Executed by:
  • libcrypto.so.1.1
32;
executed 21 times by 1 test: return 32;
Executed by:
  • libcrypto.so.1.1
21
905 return
executed 1651 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 1651 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
1651
906}-
907-
908int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid)-
909{-
910-
911 if (!akid
!akidDescription
TRUEevaluated 5695 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2574 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2574-5695
912 return
executed 5695 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 5695 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
5695
913-
914-
915 if (akid->keyid
akid->keyidDescription
TRUEevaluated 2555 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& issuer->skid
issuer->skidDescription
TRUEevaluated 2548 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&&
7-2555
916 ASN1_OCTET_STRING_cmp(akid->keyid, issuer->skid)
ASN1_OCTET_STR... issuer->skid)Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2526 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
22-2526
917 return
executed 22 times by 1 test: return 30;
Executed by:
  • libcrypto.so.1.1
30;
executed 22 times by 1 test: return 30;
Executed by:
  • libcrypto.so.1.1
22
918-
919 if (akid->serial
akid->serialDescription
TRUEevaluated 85 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2467 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&&
85-2467
920 ASN1_INTEGER_cmp(X509_get_serialNumber(issuer), akid->serial)
ASN1_INTEGER_c... akid->serial)Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 71 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
14-71
921 return
executed 14 times by 1 test: return 31;
Executed by:
  • libcrypto.so.1.1
31;
executed 14 times by 1 test: return 31;
Executed by:
  • libcrypto.so.1.1
14
922-
923 if (akid->issuer
akid->issuerDescription
TRUEevaluated 74 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2464 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
74-2464
924-
925-
926-
927-
928-
929 GENERAL_NAMES *gens;-
930 GENERAL_NAME *gen;-
931 X509_NAME *nm = -
932 ((void *)0)-
933 ;-
934 int i;-
935 gens = akid->issuer;-
936 for (i = 0; i < sk_GENERAL_NAME_num(gens)
i < sk_GENERAL_NAME_num(gens)Description
TRUEevaluated 89 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
6-89
937 gen = sk_GENERAL_NAME_value(gens, i);-
938 if (gen->type == 4
gen->type == 4Description
TRUEevaluated 68 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
21-68
939 nm = gen->d.dirn;-
940 break;
executed 68 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
68
941 }-
942 }
executed 21 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
21
943 if (nm
nmDescription
TRUEevaluated 68 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& X509_NAME_cmp(nm, X509_get_issuer_name(issuer))
X509_NAME_cmp(..._name(issuer))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
3-68
944 return
executed 3 times by 1 test: return 31;
Executed by:
  • libcrypto.so.1.1
31;
executed 3 times by 1 test: return 31;
Executed by:
  • libcrypto.so.1.1
3
945 }
executed 71 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
71
946 return
executed 2535 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 2535 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
2535
947}-
948-
949uint32_t X509_get_extension_flags(X509 *x)-
950{-
951-
952 X509_check_purpose(x, -1, -1);-
953 return
executed 10377 times by 1 test: return x->ex_flags;
Executed by:
  • libcrypto.so.1.1
x->ex_flags;
executed 10377 times by 1 test: return x->ex_flags;
Executed by:
  • libcrypto.so.1.1
10377
954}-
955-
956uint32_t X509_get_key_usage(X509 *x)-
957{-
958-
959 X509_check_purpose(x, -1, -1);-
960 if (x->ex_flags & 0x2
x->ex_flags & 0x2Description
TRUEevaluated 524 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 32 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
32-524
961 return
executed 524 times by 1 test: return x->ex_kusage;
Executed by:
  • libcrypto.so.1.1
x->ex_kusage;
executed 524 times by 1 test: return x->ex_kusage;
Executed by:
  • libcrypto.so.1.1
524
962 return
executed 32 times by 1 test: return (4294967295U) ;
Executed by:
  • libcrypto.so.1.1
executed 32 times by 1 test: return (4294967295U) ;
Executed by:
  • libcrypto.so.1.1
32
963 (4294967295U)
executed 32 times by 1 test: return (4294967295U) ;
Executed by:
  • libcrypto.so.1.1
32
964 ;
executed 32 times by 1 test: return (4294967295U) ;
Executed by:
  • libcrypto.so.1.1
32
965}-
966-
967uint32_t X509_get_extended_key_usage(X509 *x)-
968{-
969-
970 X509_check_purpose(x, -1, -1);-
971 if (x->ex_flags & 0x4
x->ex_flags & 0x4Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-6
972 return
executed 6 times by 1 test: return x->ex_xkusage;
Executed by:
  • libcrypto.so.1.1
x->ex_xkusage;
executed 6 times by 1 test: return x->ex_xkusage;
Executed by:
  • libcrypto.so.1.1
6
973 return
never executed: return (4294967295U) ;
never executed: return (4294967295U) ;
0
974 (4294967295U)
never executed: return (4294967295U) ;
0
975 ;
never executed: return (4294967295U) ;
0
976}-
977-
978const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x)-
979{-
980-
981 X509_check_purpose(x, -1, -1);-
982 return
executed 21 times by 1 test: return x->skid;
Executed by:
  • libcrypto.so.1.1
x->skid;
executed 21 times by 1 test: return x->skid;
Executed by:
  • libcrypto.so.1.1
21
983}-
984-
985const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x)-
986{-
987-
988 X509_check_purpose(x, -1, -1);-
989 return
never executed: return (x->akid != ((void *)0) ? x->akid->keyid : ((void *)0) );
(x->akid !=
x->akid != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: return (x->akid != ((void *)0) ? x->akid->keyid : ((void *)0) );
0
990 ((void *)0)
x->akid != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: return (x->akid != ((void *)0) ? x->akid->keyid : ((void *)0) );
0
991 ? x->akid->keyid :
never executed: return (x->akid != ((void *)0) ? x->akid->keyid : ((void *)0) );
0
992 ((void *)0)
never executed: return (x->akid != ((void *)0) ? x->akid->keyid : ((void *)0) );
0
993 );
never executed: return (x->akid != ((void *)0) ? x->akid->keyid : ((void *)0) );
0
994}-
995-
996long X509_get_pathlen(X509 *x)-
997{-
998-
999 if (X509_check_purpose(x, -1, -1) != 1
X509_check_pur..., -1, -1) != 1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1
1000 || (
(x->ex_flags & 0x1) == 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
x->ex_flags & 0x1) == 0
(x->ex_flags & 0x1) == 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
1001 return
never executed: return -1;
-1;
never executed: return -1;
0
1002 return
executed 1 time by 1 test: return x->ex_pathlen;
Executed by:
  • libcrypto.so.1.1
x->ex_pathlen;
executed 1 time by 1 test: return x->ex_pathlen;
Executed by:
  • libcrypto.so.1.1
1
1003}-
1004-
1005long X509_get_proxy_pathlen(X509 *x)-
1006{-
1007-
1008 if (X509_check_purpose(x, -1, -1) != 1
X509_check_pur..., -1, -1) != 1Description
TRUEnever evaluated
FALSEnever evaluated
0
1009 || (
(x->ex_flags & 0x400) == 0Description
TRUEnever evaluated
FALSEnever evaluated
x->ex_flags & 0x400) == 0
(x->ex_flags & 0x400) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1010 return
never executed: return -1;
-1;
never executed: return -1;
0
1011 return
never executed: return x->ex_pcpathlen;
x->ex_pcpathlen;
never executed: return x->ex_pcpathlen;
0
1012}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2