| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/x509/x509_lu.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | static void X509_OBJECT_dec_ref_count(X509_OBJECT *a); | - | ||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | X509_LOOKUP * | - | ||||||||||||||||||||||||
| 7 | X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | - | ||||||||||||||||||||||||
| 8 | { | - | ||||||||||||||||||||||||
| 9 | X509_LOOKUP *ret; | - | ||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||
| 11 | ret = malloc(sizeof(X509_LOOKUP)); | - | ||||||||||||||||||||||||
| 12 | if (ret ==
| 0-50 | ||||||||||||||||||||||||
| 13 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||
| 14 | ) | - | ||||||||||||||||||||||||
| 15 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 16 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 17 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 18 | - | |||||||||||||||||||||||||
| 19 | ret->init = 0; | - | ||||||||||||||||||||||||
| 20 | ret->skip = 0; | - | ||||||||||||||||||||||||
| 21 | ret->method = method; | - | ||||||||||||||||||||||||
| 22 | ret->method_data = | - | ||||||||||||||||||||||||
| 23 | ((void *)0) | - | ||||||||||||||||||||||||
| 24 | ; | - | ||||||||||||||||||||||||
| 25 | ret->store_ctx = | - | ||||||||||||||||||||||||
| 26 | ((void *)0) | - | ||||||||||||||||||||||||
| 27 | ; | - | ||||||||||||||||||||||||
| 28 | if ((
| 23-27 | ||||||||||||||||||||||||
| 29 | ((void *)0)
| 23-27 | ||||||||||||||||||||||||
| 30 | )
| 0-27 | ||||||||||||||||||||||||
| 31 | free(ret); | - | ||||||||||||||||||||||||
| 32 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 33 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 34 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 35 | } | - | ||||||||||||||||||||||||
| 36 | return executed 50 times by 3 tests: ret;return ret;Executed by:
executed 50 times by 3 tests: return ret;Executed by:
| 50 | ||||||||||||||||||||||||
| 37 | } | - | ||||||||||||||||||||||||
| 38 | - | |||||||||||||||||||||||||
| 39 | void | - | ||||||||||||||||||||||||
| 40 | X509_LOOKUP_free(X509_LOOKUP *ctx) | - | ||||||||||||||||||||||||
| 41 | { | - | ||||||||||||||||||||||||
| 42 | if (ctx ==
| 1-50 | ||||||||||||||||||||||||
| 43 | ((void *)0)
| 1-50 | ||||||||||||||||||||||||
| 44 | ) | - | ||||||||||||||||||||||||
| 45 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 46 | if ((
| 0-50 | ||||||||||||||||||||||||
| 47 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||
| 48 | )
| 0-50 | ||||||||||||||||||||||||
| 49 | ((void *)0)
| 23-27 | ||||||||||||||||||||||||
| 50 | )
| 23-27 | ||||||||||||||||||||||||
| 51 | (* executed 23 times by 2 tests: ctx->method->free)(ctx);(*ctx->method->free)(ctx);Executed by:
executed 23 times by 2 tests: (*ctx->method->free)(ctx);Executed by:
| 23 | ||||||||||||||||||||||||
| 52 | free(ctx); | - | ||||||||||||||||||||||||
| 53 | } executed 50 times by 3 tests: end of blockExecuted by:
| 50 | ||||||||||||||||||||||||
| 54 | - | |||||||||||||||||||||||||
| 55 | int | - | ||||||||||||||||||||||||
| 56 | X509_LOOKUP_init(X509_LOOKUP *ctx) | - | ||||||||||||||||||||||||
| 57 | { | - | ||||||||||||||||||||||||
| 58 | if (ctx->method ==
| 0 | ||||||||||||||||||||||||
| 59 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 60 | ) | - | ||||||||||||||||||||||||
| 61 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 62 | if (ctx->method->init !=
| 0 | ||||||||||||||||||||||||
| 63 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 64 | ) | - | ||||||||||||||||||||||||
| 65 | return never executed: ctx->method->init(ctx);return ctx->method->init(ctx);never executed: return ctx->method->init(ctx); | 0 | ||||||||||||||||||||||||
| 66 | else | - | ||||||||||||||||||||||||
| 67 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 68 | } | - | ||||||||||||||||||||||||
| 69 | - | |||||||||||||||||||||||||
| 70 | int | - | ||||||||||||||||||||||||
| 71 | X509_LOOKUP_shutdown(X509_LOOKUP *ctx) | - | ||||||||||||||||||||||||
| 72 | { | - | ||||||||||||||||||||||||
| 73 | if (ctx->method ==
| 0-50 | ||||||||||||||||||||||||
| 74 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||
| 75 | ) | - | ||||||||||||||||||||||||
| 76 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 77 | if (ctx->method->shutdown !=
| 0-50 | ||||||||||||||||||||||||
| 78 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||
| 79 | ) | - | ||||||||||||||||||||||||
| 80 | return never executed: ctx->method->shutdown(ctx);return ctx->method->shutdown(ctx);never executed: return ctx->method->shutdown(ctx); | 0 | ||||||||||||||||||||||||
| 81 | else | - | ||||||||||||||||||||||||
| 82 | return executed 50 times by 3 tests: 1;return 1;Executed by:
executed 50 times by 3 tests: return 1;Executed by:
| 50 | ||||||||||||||||||||||||
| 83 | } | - | ||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||
| 85 | int | - | ||||||||||||||||||||||||
| 86 | X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, | - | ||||||||||||||||||||||||
| 87 | char **ret) | - | ||||||||||||||||||||||||
| 88 | { | - | ||||||||||||||||||||||||
| 89 | if (ctx->method ==
| 0-70 | ||||||||||||||||||||||||
| 90 | ((void *)0)
| 0-70 | ||||||||||||||||||||||||
| 91 | ) | - | ||||||||||||||||||||||||
| 92 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||
| 93 | if (ctx->method->ctrl !=
| 0-70 | ||||||||||||||||||||||||
| 94 | ((void *)0)
| 0-70 | ||||||||||||||||||||||||
| 95 | ) | - | ||||||||||||||||||||||||
| 96 | return executed 70 times by 3 tests: ctx->method->ctrl(ctx, cmd, argc, argl, ret);return ctx->method->ctrl(ctx, cmd, argc, argl, ret);Executed by:
executed 70 times by 3 tests: return ctx->method->ctrl(ctx, cmd, argc, argl, ret);Executed by:
| 70 | ||||||||||||||||||||||||
| 97 | else | - | ||||||||||||||||||||||||
| 98 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 99 | } | - | ||||||||||||||||||||||||
| 100 | - | |||||||||||||||||||||||||
| 101 | int | - | ||||||||||||||||||||||||
| 102 | X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, | - | ||||||||||||||||||||||||
| 103 | X509_OBJECT *ret) | - | ||||||||||||||||||||||||
| 104 | { | - | ||||||||||||||||||||||||
| 105 | if ((
| 0 | ||||||||||||||||||||||||
| 106 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 107 | )
| 0 | ||||||||||||||||||||||||
| 108 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 109 | )
| 0 | ||||||||||||||||||||||||
| 110 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 111 | if (ctx->skip
| 0 | ||||||||||||||||||||||||
| 112 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 113 | return never executed: ctx->method->get_by_subject(ctx, type, name, ret);return ctx->method->get_by_subject(ctx, type, name, ret);never executed: return ctx->method->get_by_subject(ctx, type, name, ret); | 0 | ||||||||||||||||||||||||
| 114 | } | - | ||||||||||||||||||||||||
| 115 | - | |||||||||||||||||||||||||
| 116 | int | - | ||||||||||||||||||||||||
| 117 | X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, | - | ||||||||||||||||||||||||
| 118 | ASN1_INTEGER *serial, X509_OBJECT *ret) | - | ||||||||||||||||||||||||
| 119 | { | - | ||||||||||||||||||||||||
| 120 | if ((
| 0 | ||||||||||||||||||||||||
| 121 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 122 | )
| 0 | ||||||||||||||||||||||||
| 123 | (
| 0 | ||||||||||||||||||||||||
| 124 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 125 | )
| 0 | ||||||||||||||||||||||||
| 126 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 127 | return never executed: ctx->method->get_by_issuer_serial(ctx, type, name, serial, ret);return ctx->method->get_by_issuer_serial(ctx, type, name, serial, ret);never executed: return ctx->method->get_by_issuer_serial(ctx, type, name, serial, ret); | 0 | ||||||||||||||||||||||||
| 128 | } | - | ||||||||||||||||||||||||
| 129 | - | |||||||||||||||||||||||||
| 130 | int | - | ||||||||||||||||||||||||
| 131 | X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, | - | ||||||||||||||||||||||||
| 132 | const unsigned char *bytes, int len, X509_OBJECT *ret) | - | ||||||||||||||||||||||||
| 133 | { | - | ||||||||||||||||||||||||
| 134 | if ((
| 0 | ||||||||||||||||||||||||
| 135 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 136 | )
| 0 | ||||||||||||||||||||||||
| 137 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 138 | )
| 0 | ||||||||||||||||||||||||
| 139 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 140 | return never executed: ctx->method->get_by_fingerprint(ctx, type, bytes, len, ret);return ctx->method->get_by_fingerprint(ctx, type, bytes, len, ret);never executed: return ctx->method->get_by_fingerprint(ctx, type, bytes, len, ret); | 0 | ||||||||||||||||||||||||
| 141 | } | - | ||||||||||||||||||||||||
| 142 | - | |||||||||||||||||||||||||
| 143 | int | - | ||||||||||||||||||||||||
| 144 | X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, const char *str, int len, | - | ||||||||||||||||||||||||
| 145 | X509_OBJECT *ret) | - | ||||||||||||||||||||||||
| 146 | { | - | ||||||||||||||||||||||||
| 147 | if ((
| 0 | ||||||||||||||||||||||||
| 148 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 149 | )
| 0 | ||||||||||||||||||||||||
| 150 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 151 | )
| 0 | ||||||||||||||||||||||||
| 152 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 153 | return never executed: ctx->method->get_by_alias(ctx, type, str, len, ret);return ctx->method->get_by_alias(ctx, type, str, len, ret);never executed: return ctx->method->get_by_alias(ctx, type, str, len, ret); | 0 | ||||||||||||||||||||||||
| 154 | } | - | ||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||
| 156 | static int | - | ||||||||||||||||||||||||
| 157 | x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b) | - | ||||||||||||||||||||||||
| 158 | { | - | ||||||||||||||||||||||||
| 159 | int ret; | - | ||||||||||||||||||||||||
| 160 | - | |||||||||||||||||||||||||
| 161 | ret = ((*a)->type - (*b)->type); | - | ||||||||||||||||||||||||
| 162 | if (ret
| 0-162 | ||||||||||||||||||||||||
| 163 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||||||||||||||
| 164 | switch ((*a)->type) { | - | ||||||||||||||||||||||||
| 165 | case executed 162 times by 2 tests: 1:case 1:Executed by:
executed 162 times by 2 tests: case 1:Executed by:
| 162 | ||||||||||||||||||||||||
| 166 | ret = X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509); | - | ||||||||||||||||||||||||
| 167 | break; executed 162 times by 2 tests: break;Executed by:
| 162 | ||||||||||||||||||||||||
| 168 | case never executed: 2:case 2:never executed: case 2: | 0 | ||||||||||||||||||||||||
| 169 | ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl); | - | ||||||||||||||||||||||||
| 170 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 171 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||
| 172 | - | |||||||||||||||||||||||||
| 173 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 174 | } | - | ||||||||||||||||||||||||
| 175 | return executed 162 times by 2 tests: ret;return ret;Executed by:
executed 162 times by 2 tests: return ret;Executed by:
| 162 | ||||||||||||||||||||||||
| 176 | } | - | ||||||||||||||||||||||||
| 177 | - | |||||||||||||||||||||||||
| 178 | X509_STORE * | - | ||||||||||||||||||||||||
| 179 | X509_STORE_new(void) | - | ||||||||||||||||||||||||
| 180 | { | - | ||||||||||||||||||||||||
| 181 | X509_STORE *ret; | - | ||||||||||||||||||||||||
| 182 | - | |||||||||||||||||||||||||
| 183 | if ((
| 0-218 | ||||||||||||||||||||||||
| 184 | ((void *)0)
| 0-218 | ||||||||||||||||||||||||
| 185 | ) | - | ||||||||||||||||||||||||
| 186 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 187 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 188 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 189 | ret->objs = ((struct stack_st_X509_OBJECT *)sk_new(((int (*)(const void *, const void *)) ((1 ? (x509_object_cmp) : (int (*)(const X509_OBJECT * const *, const X509_OBJECT * const *))0))))); | - | ||||||||||||||||||||||||
| 190 | ret->cache = 1; | - | ||||||||||||||||||||||||
| 191 | ret->get_cert_methods = ((struct stack_st_X509_LOOKUP *)sk_new_null()); | - | ||||||||||||||||||||||||
| 192 | ret->verify = 0; | - | ||||||||||||||||||||||||
| 193 | ret->verify_cb = 0; | - | ||||||||||||||||||||||||
| 194 | - | |||||||||||||||||||||||||
| 195 | if ((
| 0-218 | ||||||||||||||||||||||||
| 196 | ((void *)0)
| 0-218 | ||||||||||||||||||||||||
| 197 | ) | - | ||||||||||||||||||||||||
| 198 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||
| 199 | - | |||||||||||||||||||||||||
| 200 | ret->get_issuer = 0; | - | ||||||||||||||||||||||||
| 201 | ret->check_issued = 0; | - | ||||||||||||||||||||||||
| 202 | ret->check_revocation = 0; | - | ||||||||||||||||||||||||
| 203 | ret->get_crl = 0; | - | ||||||||||||||||||||||||
| 204 | ret->check_crl = 0; | - | ||||||||||||||||||||||||
| 205 | ret->cert_crl = 0; | - | ||||||||||||||||||||||||
| 206 | ret->lookup_certs = 0; | - | ||||||||||||||||||||||||
| 207 | ret->lookup_crls = 0; | - | ||||||||||||||||||||||||
| 208 | ret->cleanup = 0; | - | ||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||
| 210 | if (!CRYPTO_new_ex_data(4, ret, &ret->ex_data)
| 0-218 | ||||||||||||||||||||||||
| 211 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||
| 212 | - | |||||||||||||||||||||||||
| 213 | ret->references = 1; | - | ||||||||||||||||||||||||
| 214 | return executed 218 times by 14 tests: ret;return ret;Executed by:
executed 218 times by 14 tests: return ret;Executed by:
| 218 | ||||||||||||||||||||||||
| 215 | - | |||||||||||||||||||||||||
| 216 | err: | - | ||||||||||||||||||||||||
| 217 | X509_VERIFY_PARAM_free(ret->param); | - | ||||||||||||||||||||||||
| 218 | sk_free(((_STACK*) (1 ? (ret->get_cert_methods) : (struct stack_st_X509_LOOKUP*)0))); | - | ||||||||||||||||||||||||
| 219 | sk_free(((_STACK*) (1 ? (ret->objs) : (struct stack_st_X509_OBJECT*)0))); | - | ||||||||||||||||||||||||
| 220 | free(ret); | - | ||||||||||||||||||||||||
| 221 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 222 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 223 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 224 | } | - | ||||||||||||||||||||||||
| 225 | - | |||||||||||||||||||||||||
| 226 | static void | - | ||||||||||||||||||||||||
| 227 | X509_OBJECT_free(X509_OBJECT *a) | - | ||||||||||||||||||||||||
| 228 | { | - | ||||||||||||||||||||||||
| 229 | X509_OBJECT_free_contents(a); | - | ||||||||||||||||||||||||
| 230 | free(a); | - | ||||||||||||||||||||||||
| 231 | } executed 48 times by 2 tests: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||
| 232 | - | |||||||||||||||||||||||||
| 233 | void | - | ||||||||||||||||||||||||
| 234 | X509_STORE_free(X509_STORE *vfy) | - | ||||||||||||||||||||||||
| 235 | { | - | ||||||||||||||||||||||||
| 236 | int i; | - | ||||||||||||||||||||||||
| 237 | struct stack_st_X509_LOOKUP *sk; | - | ||||||||||||||||||||||||
| 238 | X509_LOOKUP *lu; | - | ||||||||||||||||||||||||
| 239 | - | |||||||||||||||||||||||||
| 240 | if (vfy ==
| 1-210 | ||||||||||||||||||||||||
| 241 | ((void *)0)
| 1-210 | ||||||||||||||||||||||||
| 242 | ) | - | ||||||||||||||||||||||||
| 243 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 244 | - | |||||||||||||||||||||||||
| 245 | i = CRYPTO_add_lock(&vfy->references,-1,11,__FILE__,252); | - | ||||||||||||||||||||||||
| 246 | if (i > 0
| 0-210 | ||||||||||||||||||||||||
| 247 | return; never executed: return; | 0 | ||||||||||||||||||||||||
| 248 | - | |||||||||||||||||||||||||
| 249 | sk = vfy->get_cert_methods; | - | ||||||||||||||||||||||||
| 250 | for (i = 0; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_X509_LOOKUP*)0)))
| 50-210 | ||||||||||||||||||||||||
| 251 | lu = ((X509_LOOKUP *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_X509_LOOKUP*)0)), (i))); | - | ||||||||||||||||||||||||
| 252 | X509_LOOKUP_shutdown(lu); | - | ||||||||||||||||||||||||
| 253 | X509_LOOKUP_free(lu); | - | ||||||||||||||||||||||||
| 254 | } executed 50 times by 3 tests: end of blockExecuted by:
| 50 | ||||||||||||||||||||||||
| 255 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509_LOOKUP*)0))); | - | ||||||||||||||||||||||||
| 256 | sk_pop_free(((_STACK*) (1 ? (vfy->objs) : (struct stack_st_X509_OBJECT*)0)), ((void (*)(void *)) ((1 ? (X509_OBJECT_free) : (void (*)(X509_OBJECT *))0)))); | - | ||||||||||||||||||||||||
| 257 | - | |||||||||||||||||||||||||
| 258 | CRYPTO_free_ex_data(4, vfy, &vfy->ex_data); | - | ||||||||||||||||||||||||
| 259 | X509_VERIFY_PARAM_free(vfy->param); | - | ||||||||||||||||||||||||
| 260 | free(vfy); | - | ||||||||||||||||||||||||
| 261 | } executed 210 times by 13 tests: end of blockExecuted by:
| 210 | ||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||
| 263 | int | - | ||||||||||||||||||||||||
| 264 | X509_STORE_up_ref(X509_STORE *x) | - | ||||||||||||||||||||||||
| 265 | { | - | ||||||||||||||||||||||||
| 266 | int refs = CRYPTO_add_lock(&x->references,1,11,__FILE__,273); | - | ||||||||||||||||||||||||
| 267 | return never executed: (return (refs > 1) ? 1 : 0;
never executed: return (refs > 1) ? 1 : 0; | 0 | ||||||||||||||||||||||||
| 268 | } | - | ||||||||||||||||||||||||
| 269 | - | |||||||||||||||||||||||||
| 270 | X509_LOOKUP * | - | ||||||||||||||||||||||||
| 271 | X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m) | - | ||||||||||||||||||||||||
| 272 | { | - | ||||||||||||||||||||||||
| 273 | int i; | - | ||||||||||||||||||||||||
| 274 | struct stack_st_X509_LOOKUP *sk; | - | ||||||||||||||||||||||||
| 275 | X509_LOOKUP *lu; | - | ||||||||||||||||||||||||
| 276 | - | |||||||||||||||||||||||||
| 277 | sk = v->get_cert_methods; | - | ||||||||||||||||||||||||
| 278 | for (i = 0; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_X509_LOOKUP*)0)))
| 43-50 | ||||||||||||||||||||||||
| 279 | lu = ((X509_LOOKUP *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_X509_LOOKUP*)0)), (i))); | - | ||||||||||||||||||||||||
| 280 | if (m == lu->method
| 20-23 | ||||||||||||||||||||||||
| 281 | return executed 20 times by 1 test: lu;return lu;Executed by:
executed 20 times by 1 test: return lu;Executed by:
| 20 | ||||||||||||||||||||||||
| 282 | } | - | ||||||||||||||||||||||||
| 283 | } executed 23 times by 2 tests: end of blockExecuted by:
| 23 | ||||||||||||||||||||||||
| 284 | - | |||||||||||||||||||||||||
| 285 | lu = X509_LOOKUP_new(m); | - | ||||||||||||||||||||||||
| 286 | if (lu ==
| 0-50 | ||||||||||||||||||||||||
| 287 | ((void *)0)
| 0-50 | ||||||||||||||||||||||||
| 288 | ) | - | ||||||||||||||||||||||||
| 289 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 290 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 291 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 292 | else { | - | ||||||||||||||||||||||||
| 293 | lu->store_ctx = v; | - | ||||||||||||||||||||||||
| 294 | if (sk_push(((_STACK*) (1 ? (v->get_cert_methods) : (struct stack_st_X509_LOOKUP*)0)), ((void*) (1 ? (lu) : (X509_LOOKUP*)0)))
| 0-50 | ||||||||||||||||||||||||
| 295 | return executed 50 times by 3 tests: lu;return lu;Executed by:
executed 50 times by 3 tests: return lu;Executed by:
| 50 | ||||||||||||||||||||||||
| 296 | else { | - | ||||||||||||||||||||||||
| 297 | X509_LOOKUP_free(lu); | - | ||||||||||||||||||||||||
| 298 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 299 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 300 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 301 | } | - | ||||||||||||||||||||||||
| 302 | } | - | ||||||||||||||||||||||||
| 303 | } | - | ||||||||||||||||||||||||
| 304 | - | |||||||||||||||||||||||||
| 305 | int | - | ||||||||||||||||||||||||
| 306 | X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, | - | ||||||||||||||||||||||||
| 307 | X509_OBJECT *ret) | - | ||||||||||||||||||||||||
| 308 | { | - | ||||||||||||||||||||||||
| 309 | X509_STORE *ctx = vs->ctx; | - | ||||||||||||||||||||||||
| 310 | X509_LOOKUP *lu; | - | ||||||||||||||||||||||||
| 311 | X509_OBJECT stmp, *tmp; | - | ||||||||||||||||||||||||
| 312 | int i, j; | - | ||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||
| 314 | CRYPTO_lock(1|8,11,__FILE__,315); | - | ||||||||||||||||||||||||
| 315 | tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name); | - | ||||||||||||||||||||||||
| 316 | CRYPTO_lock(2|8,11,__FILE__,317); | - | ||||||||||||||||||||||||
| 317 | - | |||||||||||||||||||||||||
| 318 | if (tmp ==
| 57-86 | ||||||||||||||||||||||||
| 319 | ((void *)0)
| 57-86 | ||||||||||||||||||||||||
| 320 | || type == 2
| 0-57 | ||||||||||||||||||||||||
| 321 | for (i = vs->current_method; | - | ||||||||||||||||||||||||
| 322 | i < sk_num(((_STACK*) (1 ? (ctx->get_cert_methods) : (struct stack_st_X509_LOOKUP*)0)))
| 0-86 | ||||||||||||||||||||||||
| 323 | lu = ((X509_LOOKUP *)sk_value(((_STACK*) (1 ? (ctx->get_cert_methods) : (struct stack_st_X509_LOOKUP*)0)), (i))); | - | ||||||||||||||||||||||||
| 324 | j = X509_LOOKUP_by_subject(lu, type, name, &stmp); | - | ||||||||||||||||||||||||
| 325 | if (j < 0
| 0 | ||||||||||||||||||||||||
| 326 | vs->current_method = j; | - | ||||||||||||||||||||||||
| 327 | return never executed: j;return j;never executed: return j; | 0 | ||||||||||||||||||||||||
| 328 | } else if (j
| 0 | ||||||||||||||||||||||||
| 329 | tmp = &stmp; | - | ||||||||||||||||||||||||
| 330 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 331 | } | - | ||||||||||||||||||||||||
| 332 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 333 | vs->current_method = 0; | - | ||||||||||||||||||||||||
| 334 | if (tmp ==
| 0-86 | ||||||||||||||||||||||||
| 335 | ((void *)0)
| 0-86 | ||||||||||||||||||||||||
| 336 | ) | - | ||||||||||||||||||||||||
| 337 | return executed 86 times by 4 tests: 0;return 0;Executed by:
executed 86 times by 4 tests: return 0;Executed by:
| 86 | ||||||||||||||||||||||||
| 338 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 339 | - | |||||||||||||||||||||||||
| 340 | - | |||||||||||||||||||||||||
| 341 | - | |||||||||||||||||||||||||
| 342 | - | |||||||||||||||||||||||||
| 343 | ret->type = tmp->type; | - | ||||||||||||||||||||||||
| 344 | ret->data.ptr = tmp->data.ptr; | - | ||||||||||||||||||||||||
| 345 | - | |||||||||||||||||||||||||
| 346 | X509_OBJECT_up_ref_count(ret); | - | ||||||||||||||||||||||||
| 347 | - | |||||||||||||||||||||||||
| 348 | return executed 57 times by 2 tests: 1;return 1;Executed by:
executed 57 times by 2 tests: return 1;Executed by:
| 57 | ||||||||||||||||||||||||
| 349 | } | - | ||||||||||||||||||||||||
| 350 | - | |||||||||||||||||||||||||
| 351 | int | - | ||||||||||||||||||||||||
| 352 | X509_STORE_add_cert(X509_STORE *ctx, X509 *x) | - | ||||||||||||||||||||||||
| 353 | { | - | ||||||||||||||||||||||||
| 354 | X509_OBJECT *obj; | - | ||||||||||||||||||||||||
| 355 | int ret = 1; | - | ||||||||||||||||||||||||
| 356 | - | |||||||||||||||||||||||||
| 357 | if (x ==
| 0-48 | ||||||||||||||||||||||||
| 358 | ((void *)0)
| 0-48 | ||||||||||||||||||||||||
| 359 | ) | - | ||||||||||||||||||||||||
| 360 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 361 | obj = malloc(sizeof(X509_OBJECT)); | - | ||||||||||||||||||||||||
| 362 | if (obj ==
| 0-48 | ||||||||||||||||||||||||
| 363 | ((void *)0)
| 0-48 | ||||||||||||||||||||||||
| 364 | ) { | - | ||||||||||||||||||||||||
| 365 | ERR_put_error(11,(0xfff),((1|64)),__FILE__,358); | - | ||||||||||||||||||||||||
| 366 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 367 | } | - | ||||||||||||||||||||||||
| 368 | obj->type = 1; | - | ||||||||||||||||||||||||
| 369 | obj->data.x509 = x; | - | ||||||||||||||||||||||||
| 370 | - | |||||||||||||||||||||||||
| 371 | CRYPTO_lock(1|8,11,__FILE__,364); | - | ||||||||||||||||||||||||
| 372 | - | |||||||||||||||||||||||||
| 373 | X509_OBJECT_up_ref_count(obj); | - | ||||||||||||||||||||||||
| 374 | - | |||||||||||||||||||||||||
| 375 | if (X509_OBJECT_retrieve_match(ctx->objs, obj)
| 0-48 | ||||||||||||||||||||||||
| 376 | ERR_put_error(11,(0xfff),(101),__FILE__,369); | - | ||||||||||||||||||||||||
| 377 | ret = 0; | - | ||||||||||||||||||||||||
| 378 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
| 379 | if (sk_push(((_STACK*) (1 ? (ctx->objs) : (struct stack_st_X509_OBJECT*)0)), ((void*) (1 ? (obj) : (X509_OBJECT*)0))) == 0
| 0-48 | ||||||||||||||||||||||||
| 380 | ERR_put_error(11,(0xfff),((1|64)),__FILE__,373); | - | ||||||||||||||||||||||||
| 381 | ret = 0; | - | ||||||||||||||||||||||||
| 382 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 383 | } executed 48 times by 2 tests: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||
| 384 | - | |||||||||||||||||||||||||
| 385 | if (ret == 0
| 0-48 | ||||||||||||||||||||||||
| 386 | X509_OBJECT_dec_ref_count(obj); never executed: X509_OBJECT_dec_ref_count(obj); | 0 | ||||||||||||||||||||||||
| 387 | - | |||||||||||||||||||||||||
| 388 | CRYPTO_lock(2|8,11,__FILE__,381); | - | ||||||||||||||||||||||||
| 389 | - | |||||||||||||||||||||||||
| 390 | if (ret == 0
| 0-48 | ||||||||||||||||||||||||
| 391 | obj->data.x509 = | - | ||||||||||||||||||||||||
| 392 | ((void *)0) | - | ||||||||||||||||||||||||
| 393 | ; | - | ||||||||||||||||||||||||
| 394 | X509_OBJECT_free(obj); | - | ||||||||||||||||||||||||
| 395 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 396 | - | |||||||||||||||||||||||||
| 397 | return executed 48 times by 2 tests: ret;return ret;Executed by:
executed 48 times by 2 tests: return ret;Executed by:
| 48 | ||||||||||||||||||||||||
| 398 | } | - | ||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||
| 400 | int | - | ||||||||||||||||||||||||
| 401 | X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x) | - | ||||||||||||||||||||||||
| 402 | { | - | ||||||||||||||||||||||||
| 403 | X509_OBJECT *obj; | - | ||||||||||||||||||||||||
| 404 | int ret = 1; | - | ||||||||||||||||||||||||
| 405 | - | |||||||||||||||||||||||||
| 406 | if (x ==
| 0 | ||||||||||||||||||||||||
| 407 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 408 | ) | - | ||||||||||||||||||||||||
| 409 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 410 | obj = malloc(sizeof(X509_OBJECT)); | - | ||||||||||||||||||||||||
| 411 | if (obj ==
| 0 | ||||||||||||||||||||||||
| 412 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 413 | ) { | - | ||||||||||||||||||||||||
| 414 | ERR_put_error(11,(0xfff),((1|64)),__FILE__,401); | - | ||||||||||||||||||||||||
| 415 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 416 | } | - | ||||||||||||||||||||||||
| 417 | obj->type = 2; | - | ||||||||||||||||||||||||
| 418 | obj->data.crl = x; | - | ||||||||||||||||||||||||
| 419 | - | |||||||||||||||||||||||||
| 420 | CRYPTO_lock(1|8,11,__FILE__,407); | - | ||||||||||||||||||||||||
| 421 | - | |||||||||||||||||||||||||
| 422 | X509_OBJECT_up_ref_count(obj); | - | ||||||||||||||||||||||||
| 423 | - | |||||||||||||||||||||||||
| 424 | if (X509_OBJECT_retrieve_match(ctx->objs, obj)
| 0 | ||||||||||||||||||||||||
| 425 | ERR_put_error(11,(0xfff),(101),__FILE__,412); | - | ||||||||||||||||||||||||
| 426 | ret = 0; | - | ||||||||||||||||||||||||
| 427 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
| 428 | if (sk_push(((_STACK*) (1 ? (ctx->objs) : (struct stack_st_X509_OBJECT*)0)), ((void*) (1 ? (obj) : (X509_OBJECT*)0))) == 0
| 0 | ||||||||||||||||||||||||
| 429 | ERR_put_error(11,(0xfff),((1|64)),__FILE__,416); | - | ||||||||||||||||||||||||
| 430 | ret = 0; | - | ||||||||||||||||||||||||
| 431 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 432 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 433 | - | |||||||||||||||||||||||||
| 434 | if (ret == 0
| 0 | ||||||||||||||||||||||||
| 435 | X509_OBJECT_dec_ref_count(obj); never executed: X509_OBJECT_dec_ref_count(obj); | 0 | ||||||||||||||||||||||||
| 436 | - | |||||||||||||||||||||||||
| 437 | CRYPTO_lock(2|8,11,__FILE__,424); | - | ||||||||||||||||||||||||
| 438 | - | |||||||||||||||||||||||||
| 439 | if (ret == 0
| 0 | ||||||||||||||||||||||||
| 440 | obj->data.crl = | - | ||||||||||||||||||||||||
| 441 | ((void *)0) | - | ||||||||||||||||||||||||
| 442 | ; | - | ||||||||||||||||||||||||
| 443 | X509_OBJECT_free(obj); | - | ||||||||||||||||||||||||
| 444 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 445 | - | |||||||||||||||||||||||||
| 446 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||||||||||||||
| 447 | } | - | ||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||
| 449 | static void | - | ||||||||||||||||||||||||
| 450 | X509_OBJECT_dec_ref_count(X509_OBJECT *a) | - | ||||||||||||||||||||||||
| 451 | { | - | ||||||||||||||||||||||||
| 452 | switch (a->type) { | - | ||||||||||||||||||||||||
| 453 | case never executed: 1:case 1:never executed: case 1: | 0 | ||||||||||||||||||||||||
| 454 | CRYPTO_add_lock(&a->data.x509->references,-1,3,__FILE__,439); | - | ||||||||||||||||||||||||
| 455 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 456 | case never executed: 2:case 2:never executed: case 2: | 0 | ||||||||||||||||||||||||
| 457 | CRYPTO_add_lock(&a->data.crl->references,-1,6,__FILE__,442); | - | ||||||||||||||||||||||||
| 458 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 459 | } | - | ||||||||||||||||||||||||
| 460 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||
| 462 | int | - | ||||||||||||||||||||||||
| 463 | X509_OBJECT_up_ref_count(X509_OBJECT *a) | - | ||||||||||||||||||||||||
| 464 | { | - | ||||||||||||||||||||||||
| 465 | switch (a->type) { | - | ||||||||||||||||||||||||
| 466 | case executed 105 times by 2 tests: 1:case 1:Executed by:
executed 105 times by 2 tests: case 1:Executed by:
| 105 | ||||||||||||||||||||||||
| 467 | return executed 105 times by 2 tests: X509_up_ref(a->data.x509);return X509_up_ref(a->data.x509);Executed by:
executed 105 times by 2 tests: return X509_up_ref(a->data.x509);Executed by:
| 105 | ||||||||||||||||||||||||
| 468 | case never executed: 2:case 2:never executed: case 2: | 0 | ||||||||||||||||||||||||
| 469 | return never executed: X509_CRL_up_ref(a->data.crl);return X509_CRL_up_ref(a->data.crl);never executed: return X509_CRL_up_ref(a->data.crl); | 0 | ||||||||||||||||||||||||
| 470 | } | - | ||||||||||||||||||||||||
| 471 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 472 | } | - | ||||||||||||||||||||||||
| 473 | - | |||||||||||||||||||||||||
| 474 | int | - | ||||||||||||||||||||||||
| 475 | X509_OBJECT_get_type(const X509_OBJECT *a) | - | ||||||||||||||||||||||||
| 476 | { | - | ||||||||||||||||||||||||
| 477 | return never executed: a->type;return a->type;never executed: return a->type; | 0 | ||||||||||||||||||||||||
| 478 | } | - | ||||||||||||||||||||||||
| 479 | - | |||||||||||||||||||||||||
| 480 | void | - | ||||||||||||||||||||||||
| 481 | X509_OBJECT_free_contents(X509_OBJECT *a) | - | ||||||||||||||||||||||||
| 482 | { | - | ||||||||||||||||||||||||
| 483 | switch (a->type) { | - | ||||||||||||||||||||||||
| 484 | case executed 48 times by 2 tests: 1:case 1:Executed by:
executed 48 times by 2 tests: case 1:Executed by:
| 48 | ||||||||||||||||||||||||
| 485 | X509_free(a->data.x509); | - | ||||||||||||||||||||||||
| 486 | break; executed 48 times by 2 tests: break;Executed by:
| 48 | ||||||||||||||||||||||||
| 487 | case never executed: 2:case 2:never executed: case 2: | 0 | ||||||||||||||||||||||||
| 488 | X509_CRL_free(a->data.crl); | - | ||||||||||||||||||||||||
| 489 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 490 | } | - | ||||||||||||||||||||||||
| 491 | } executed 48 times by 2 tests: end of blockExecuted by:
| 48 | ||||||||||||||||||||||||
| 492 | - | |||||||||||||||||||||||||
| 493 | static int | - | ||||||||||||||||||||||||
| 494 | x509_object_idx_cnt(struct stack_st_X509_OBJECT *h, int type, X509_NAME *name, | - | ||||||||||||||||||||||||
| 495 | int *pnmatch) | - | ||||||||||||||||||||||||
| 496 | { | - | ||||||||||||||||||||||||
| 497 | X509_OBJECT stmp; | - | ||||||||||||||||||||||||
| 498 | X509 x509_s; | - | ||||||||||||||||||||||||
| 499 | X509_CINF cinf_s; | - | ||||||||||||||||||||||||
| 500 | X509_CRL crl_s; | - | ||||||||||||||||||||||||
| 501 | X509_CRL_INFO crl_info_s; | - | ||||||||||||||||||||||||
| 502 | int idx; | - | ||||||||||||||||||||||||
| 503 | - | |||||||||||||||||||||||||
| 504 | stmp.type = type; | - | ||||||||||||||||||||||||
| 505 | switch (type) { | - | ||||||||||||||||||||||||
| 506 | case executed 143 times by 4 tests: 1:case 1:Executed by:
executed 143 times by 4 tests: case 1:Executed by:
| 143 | ||||||||||||||||||||||||
| 507 | stmp.data.x509 = &x509_s; | - | ||||||||||||||||||||||||
| 508 | x509_s.cert_info = &cinf_s; | - | ||||||||||||||||||||||||
| 509 | cinf_s.subject = name; | - | ||||||||||||||||||||||||
| 510 | break; executed 143 times by 4 tests: break;Executed by:
| 143 | ||||||||||||||||||||||||
| 511 | case never executed: 2:case 2:never executed: case 2: | 0 | ||||||||||||||||||||||||
| 512 | stmp.data.crl = &crl_s; | - | ||||||||||||||||||||||||
| 513 | crl_s.crl = &crl_info_s; | - | ||||||||||||||||||||||||
| 514 | crl_info_s.issuer = name; | - | ||||||||||||||||||||||||
| 515 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 516 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||
| 517 | - | |||||||||||||||||||||||||
| 518 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||
| 519 | } | - | ||||||||||||||||||||||||
| 520 | - | |||||||||||||||||||||||||
| 521 | idx = sk_find(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), ((void*) (1 ? (&stmp) : (X509_OBJECT*)0))); | - | ||||||||||||||||||||||||
| 522 | if (idx >= 0
| 0-86 | ||||||||||||||||||||||||
| 523 | int tidx; | - | ||||||||||||||||||||||||
| 524 | const X509_OBJECT *tobj, *pstmp; | - | ||||||||||||||||||||||||
| 525 | *pnmatch = 1; | - | ||||||||||||||||||||||||
| 526 | pstmp = &stmp; | - | ||||||||||||||||||||||||
| 527 | for (tidx = idx + 1; tidx < sk_num(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)))
| 0 | ||||||||||||||||||||||||
| 528 | tobj = ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (tidx))); | - | ||||||||||||||||||||||||
| 529 | if (x509_object_cmp(&tobj, &pstmp)
| 0 | ||||||||||||||||||||||||
| 530 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 531 | (*pnmatch)++; | - | ||||||||||||||||||||||||
| 532 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 533 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 534 | return executed 143 times by 4 tests: idx;return idx;Executed by:
executed 143 times by 4 tests: return idx;Executed by:
| 143 | ||||||||||||||||||||||||
| 535 | } | - | ||||||||||||||||||||||||
| 536 | - | |||||||||||||||||||||||||
| 537 | int | - | ||||||||||||||||||||||||
| 538 | X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type, X509_NAME *name) | - | ||||||||||||||||||||||||
| 539 | { | - | ||||||||||||||||||||||||
| 540 | return executed 143 times by 4 tests: x509_object_idx_cnt(h, type, name, return x509_object_idx_cnt(h, type, name, ((void *)0) );Executed by:
executed 143 times by 4 tests: return x509_object_idx_cnt(h, type, name, ((void *)0) );Executed by:
| 143 | ||||||||||||||||||||||||
| 541 | ((void *)0) executed 143 times by 4 tests: return x509_object_idx_cnt(h, type, name, ((void *)0) );Executed by:
| 143 | ||||||||||||||||||||||||
| 542 | ); executed 143 times by 4 tests: return x509_object_idx_cnt(h, type, name, ((void *)0) );Executed by:
| 143 | ||||||||||||||||||||||||
| 543 | } | - | ||||||||||||||||||||||||
| 544 | - | |||||||||||||||||||||||||
| 545 | X509_OBJECT * | - | ||||||||||||||||||||||||
| 546 | X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h, int type, | - | ||||||||||||||||||||||||
| 547 | X509_NAME *name) | - | ||||||||||||||||||||||||
| 548 | { | - | ||||||||||||||||||||||||
| 549 | int idx; | - | ||||||||||||||||||||||||
| 550 | - | |||||||||||||||||||||||||
| 551 | idx = X509_OBJECT_idx_by_subject(h, type, name); | - | ||||||||||||||||||||||||
| 552 | if (idx == -1
| 57-86 | ||||||||||||||||||||||||
| 553 | return executed 86 times by 4 tests: return ((void *)0) ;Executed by:
executed 86 times by 4 tests: return ((void *)0) ;Executed by:
| 86 | ||||||||||||||||||||||||
| 554 | ((void *)0) executed 86 times by 4 tests: return ((void *)0) ;Executed by:
| 86 | ||||||||||||||||||||||||
| 555 | ; executed 86 times by 4 tests: return ((void *)0) ;Executed by:
| 86 | ||||||||||||||||||||||||
| 556 | return executed 57 times by 2 tests: ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (idx)));return ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (idx)));Executed by:
executed 57 times by 2 tests: return ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (idx)));Executed by:
| 57 | ||||||||||||||||||||||||
| 557 | } | - | ||||||||||||||||||||||||
| 558 | - | |||||||||||||||||||||||||
| 559 | X509 * | - | ||||||||||||||||||||||||
| 560 | X509_OBJECT_get0_X509(const X509_OBJECT *xo) | - | ||||||||||||||||||||||||
| 561 | { | - | ||||||||||||||||||||||||
| 562 | if (xo !=
| 0 | ||||||||||||||||||||||||
| 563 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 564 | && xo->type == 1
| 0 | ||||||||||||||||||||||||
| 565 | return never executed: xo->data.x509;return xo->data.x509;never executed: return xo->data.x509; | 0 | ||||||||||||||||||||||||
| 566 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 567 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 568 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 569 | } | - | ||||||||||||||||||||||||
| 570 | - | |||||||||||||||||||||||||
| 571 | X509_CRL * | - | ||||||||||||||||||||||||
| 572 | X509_OBJECT_get0_X509_CRL(X509_OBJECT *xo) | - | ||||||||||||||||||||||||
| 573 | { | - | ||||||||||||||||||||||||
| 574 | if (xo !=
| 0 | ||||||||||||||||||||||||
| 575 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 576 | && xo->type == 2
| 0 | ||||||||||||||||||||||||
| 577 | return never executed: xo->data.crl;return xo->data.crl;never executed: return xo->data.crl; | 0 | ||||||||||||||||||||||||
| 578 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 579 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 580 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 581 | } | - | ||||||||||||||||||||||||
| 582 | - | |||||||||||||||||||||||||
| 583 | struct stack_st_X509 * | - | ||||||||||||||||||||||||
| 584 | X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *nm) | - | ||||||||||||||||||||||||
| 585 | { | - | ||||||||||||||||||||||||
| 586 | int i, idx, cnt; | - | ||||||||||||||||||||||||
| 587 | struct stack_st_X509 *sk; | - | ||||||||||||||||||||||||
| 588 | X509 *x; | - | ||||||||||||||||||||||||
| 589 | X509_OBJECT *obj; | - | ||||||||||||||||||||||||
| 590 | - | |||||||||||||||||||||||||
| 591 | sk = ((struct stack_st_X509 *)sk_new_null()); | - | ||||||||||||||||||||||||
| 592 | if (sk ==
| 0 | ||||||||||||||||||||||||
| 593 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 594 | ) | - | ||||||||||||||||||||||||
| 595 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 596 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 597 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 598 | CRYPTO_lock(1|8,11,__FILE__,567); | - | ||||||||||||||||||||||||
| 599 | idx = x509_object_idx_cnt(ctx->ctx->objs, 1, nm, &cnt); | - | ||||||||||||||||||||||||
| 600 | if (idx < 0
| 0 | ||||||||||||||||||||||||
| 601 | - | |||||||||||||||||||||||||
| 602 | - | |||||||||||||||||||||||||
| 603 | - | |||||||||||||||||||||||||
| 604 | X509_OBJECT xobj; | - | ||||||||||||||||||||||||
| 605 | CRYPTO_lock(2|8,11,__FILE__,574); | - | ||||||||||||||||||||||||
| 606 | if (!X509_STORE_get_by_subject(ctx, 1, nm, &xobj)
| 0 | ||||||||||||||||||||||||
| 607 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509*)0))); | - | ||||||||||||||||||||||||
| 608 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 609 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 610 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 611 | } | - | ||||||||||||||||||||||||
| 612 | X509_OBJECT_free_contents(&xobj); | - | ||||||||||||||||||||||||
| 613 | CRYPTO_lock(1|8,11,__FILE__,580); | - | ||||||||||||||||||||||||
| 614 | idx = x509_object_idx_cnt(ctx->ctx->objs, | - | ||||||||||||||||||||||||
| 615 | 1, nm, &cnt); | - | ||||||||||||||||||||||||
| 616 | if (idx < 0
| 0 | ||||||||||||||||||||||||
| 617 | CRYPTO_lock(2|8,11,__FILE__,584); | - | ||||||||||||||||||||||||
| 618 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509*)0))); | - | ||||||||||||||||||||||||
| 619 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 620 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 621 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 622 | } | - | ||||||||||||||||||||||||
| 623 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 624 | for (i = 0; i < cnt
| 0 | ||||||||||||||||||||||||
| 625 | obj = ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (ctx->ctx->objs) : (struct stack_st_X509_OBJECT*)0)), (idx))); | - | ||||||||||||||||||||||||
| 626 | x = obj->data.x509; | - | ||||||||||||||||||||||||
| 627 | CRYPTO_add_lock(&x->references,1,3,__FILE__,592); | - | ||||||||||||||||||||||||
| 628 | if (!sk_push(((_STACK*) (1 ? (sk) : (struct stack_st_X509*)0)), ((void*) (1 ? (x) : (X509*)0)))
| 0 | ||||||||||||||||||||||||
| 629 | CRYPTO_lock(2|8,11,__FILE__,594); | - | ||||||||||||||||||||||||
| 630 | X509_free(x); | - | ||||||||||||||||||||||||
| 631 | sk_pop_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509*)0)), ((void (*)(void *)) ((1 ? (X509_free) : (void (*)(X509 *))0)))); | - | ||||||||||||||||||||||||
| 632 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 633 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 634 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 635 | } | - | ||||||||||||||||||||||||
| 636 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 637 | CRYPTO_lock(2|8,11,__FILE__,600); | - | ||||||||||||||||||||||||
| 638 | return never executed: sk;return sk;never executed: return sk; | 0 | ||||||||||||||||||||||||
| 639 | - | |||||||||||||||||||||||||
| 640 | } | - | ||||||||||||||||||||||||
| 641 | - | |||||||||||||||||||||||||
| 642 | struct stack_st_X509_CRL * | - | ||||||||||||||||||||||||
| 643 | X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm) | - | ||||||||||||||||||||||||
| 644 | { | - | ||||||||||||||||||||||||
| 645 | int i, idx, cnt; | - | ||||||||||||||||||||||||
| 646 | struct stack_st_X509_CRL *sk; | - | ||||||||||||||||||||||||
| 647 | X509_CRL *x; | - | ||||||||||||||||||||||||
| 648 | X509_OBJECT *obj, xobj; | - | ||||||||||||||||||||||||
| 649 | - | |||||||||||||||||||||||||
| 650 | sk = ((struct stack_st_X509_CRL *)sk_new_null()); | - | ||||||||||||||||||||||||
| 651 | if (sk ==
| 0 | ||||||||||||||||||||||||
| 652 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 653 | ) | - | ||||||||||||||||||||||||
| 654 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 655 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 656 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 657 | CRYPTO_lock(1|8,11,__FILE__,616); | - | ||||||||||||||||||||||||
| 658 | - | |||||||||||||||||||||||||
| 659 | idx = x509_object_idx_cnt(ctx->ctx->objs, 2, nm, &cnt); | - | ||||||||||||||||||||||||
| 660 | - | |||||||||||||||||||||||||
| 661 | - | |||||||||||||||||||||||||
| 662 | - | |||||||||||||||||||||||||
| 663 | CRYPTO_lock(2|8,11,__FILE__,622); | - | ||||||||||||||||||||||||
| 664 | if (!X509_STORE_get_by_subject(ctx, 2, nm, &xobj)
| 0 | ||||||||||||||||||||||||
| 665 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509_CRL*)0))); | - | ||||||||||||||||||||||||
| 666 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 667 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 668 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 669 | } | - | ||||||||||||||||||||||||
| 670 | X509_OBJECT_free_contents(&xobj); | - | ||||||||||||||||||||||||
| 671 | CRYPTO_lock(1|8,11,__FILE__,628); | - | ||||||||||||||||||||||||
| 672 | idx = x509_object_idx_cnt(ctx->ctx->objs, 2, nm, &cnt); | - | ||||||||||||||||||||||||
| 673 | if (idx < 0
| 0 | ||||||||||||||||||||||||
| 674 | CRYPTO_lock(2|8,11,__FILE__,631); | - | ||||||||||||||||||||||||
| 675 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509_CRL*)0))); | - | ||||||||||||||||||||||||
| 676 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 677 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 678 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 679 | } | - | ||||||||||||||||||||||||
| 680 | - | |||||||||||||||||||||||||
| 681 | for (i = 0; i < cnt
| 0 | ||||||||||||||||||||||||
| 682 | obj = ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (ctx->ctx->objs) : (struct stack_st_X509_OBJECT*)0)), (idx))); | - | ||||||||||||||||||||||||
| 683 | x = obj->data.crl; | - | ||||||||||||||||||||||||
| 684 | CRYPTO_add_lock(&x->references,1,6,__FILE__,639); | - | ||||||||||||||||||||||||
| 685 | if (!sk_push(((_STACK*) (1 ? (sk) : (struct stack_st_X509_CRL*)0)), ((void*) (1 ? (x) : (X509_CRL*)0)))
| 0 | ||||||||||||||||||||||||
| 686 | CRYPTO_lock(2|8,11,__FILE__,641); | - | ||||||||||||||||||||||||
| 687 | X509_CRL_free(x); | - | ||||||||||||||||||||||||
| 688 | sk_pop_free(((_STACK*) (1 ? (sk) : (struct stack_st_X509_CRL*)0)), ((void (*)(void *)) ((1 ? (X509_CRL_free) : (void (*)(X509_CRL *))0)))); | - | ||||||||||||||||||||||||
| 689 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 690 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 691 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 692 | } | - | ||||||||||||||||||||||||
| 693 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 694 | CRYPTO_lock(2|8,11,__FILE__,647); | - | ||||||||||||||||||||||||
| 695 | return never executed: sk;return sk;never executed: return sk; | 0 | ||||||||||||||||||||||||
| 696 | } | - | ||||||||||||||||||||||||
| 697 | - | |||||||||||||||||||||||||
| 698 | X509_OBJECT * | - | ||||||||||||||||||||||||
| 699 | X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h, X509_OBJECT *x) | - | ||||||||||||||||||||||||
| 700 | { | - | ||||||||||||||||||||||||
| 701 | int idx, i; | - | ||||||||||||||||||||||||
| 702 | X509_OBJECT *obj; | - | ||||||||||||||||||||||||
| 703 | - | |||||||||||||||||||||||||
| 704 | idx = sk_find(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), ((void*) (1 ? (x) : (X509_OBJECT*)0))); | - | ||||||||||||||||||||||||
| 705 | if (idx == -1
| 0-48 | ||||||||||||||||||||||||
| 706 | return executed 48 times by 2 tests: return ((void *)0) ;Executed by:
executed 48 times by 2 tests: return ((void *)0) ;Executed by:
| 48 | ||||||||||||||||||||||||
| 707 | ((void *)0) executed 48 times by 2 tests: return ((void *)0) ;Executed by:
| 48 | ||||||||||||||||||||||||
| 708 | ; executed 48 times by 2 tests: return ((void *)0) ;Executed by:
| 48 | ||||||||||||||||||||||||
| 709 | if ((
| 0 | ||||||||||||||||||||||||
| 710 | return never executed: ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (idx)));return ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (idx)));never executed: return ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (idx))); | 0 | ||||||||||||||||||||||||
| 711 | for (i = idx; i < sk_num(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)))
| 0 | ||||||||||||||||||||||||
| 712 | obj = ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (h) : (struct stack_st_X509_OBJECT*)0)), (i))); | - | ||||||||||||||||||||||||
| 713 | if (x509_object_cmp((const X509_OBJECT **)&obj,
| 0 | ||||||||||||||||||||||||
| 714 | (const X509_OBJECT **)&x)
| 0 | ||||||||||||||||||||||||
| 715 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 716 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 717 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 718 | if (x->type == 1
| 0 | ||||||||||||||||||||||||
| 719 | if (!X509_cmp(obj->data.x509, x->data.x509)
| 0 | ||||||||||||||||||||||||
| 720 | return never executed: obj;return obj;never executed: return obj; | 0 | ||||||||||||||||||||||||
| 721 | } never executed: else if (x->type == 2end of block
| 0 | ||||||||||||||||||||||||
| 722 | if (!X509_CRL_match(obj->data.crl, x->data.crl)
| 0 | ||||||||||||||||||||||||
| 723 | return never executed: obj;return obj;never executed: return obj; | 0 | ||||||||||||||||||||||||
| 724 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||
| 725 | return never executed: obj;return obj;never executed: return obj; | 0 | ||||||||||||||||||||||||
| 726 | } | - | ||||||||||||||||||||||||
| 727 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 728 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 729 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 730 | } | - | ||||||||||||||||||||||||
| 731 | int | - | ||||||||||||||||||||||||
| 732 | X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) | - | ||||||||||||||||||||||||
| 733 | { | - | ||||||||||||||||||||||||
| 734 | X509_NAME *xn; | - | ||||||||||||||||||||||||
| 735 | X509_OBJECT obj, *pobj; | - | ||||||||||||||||||||||||
| 736 | int i, ok, idx, ret; | - | ||||||||||||||||||||||||
| 737 | - | |||||||||||||||||||||||||
| 738 | *issuer = | - | ||||||||||||||||||||||||
| 739 | ((void *)0) | - | ||||||||||||||||||||||||
| 740 | ; | - | ||||||||||||||||||||||||
| 741 | xn = X509_get_issuer_name(x); | - | ||||||||||||||||||||||||
| 742 | ok = X509_STORE_get_by_subject(ctx, 1, xn, &obj); | - | ||||||||||||||||||||||||
| 743 | if (ok != 1
| 57-86 | ||||||||||||||||||||||||
| 744 | if (ok == -1
| 0-86 | ||||||||||||||||||||||||
| 745 | X509_OBJECT_free_contents(&obj); | - | ||||||||||||||||||||||||
| 746 | ERR_put_error(11,(0xfff),(106),__FILE__,703); | - | ||||||||||||||||||||||||
| 747 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||
| 748 | } else if (ok != 0
| 0-86 | ||||||||||||||||||||||||
| 749 | X509_OBJECT_free_contents(&obj); | - | ||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||
| 751 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||
| 752 | } | - | ||||||||||||||||||||||||
| 753 | return executed 86 times by 4 tests: 0;return 0;Executed by:
executed 86 times by 4 tests: return 0;Executed by:
| 86 | ||||||||||||||||||||||||
| 754 | } | - | ||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||
| 756 | if (ctx->check_issued(ctx, x, obj.data.x509)
| 0-57 | ||||||||||||||||||||||||
| 757 | if (x509_check_cert_time(ctx, obj.data.x509, 1)
| 0-57 | ||||||||||||||||||||||||
| 758 | *issuer = obj.data.x509; | - | ||||||||||||||||||||||||
| 759 | return executed 57 times by 2 tests: 1;return 1;Executed by:
executed 57 times by 2 tests: return 1;Executed by:
| 57 | ||||||||||||||||||||||||
| 760 | } | - | ||||||||||||||||||||||||
| 761 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 762 | X509_OBJECT_free_contents(&obj); | - | ||||||||||||||||||||||||
| 763 | - | |||||||||||||||||||||||||
| 764 | - | |||||||||||||||||||||||||
| 765 | ret = 0; | - | ||||||||||||||||||||||||
| 766 | CRYPTO_lock(1|8,11,__FILE__,723); | - | ||||||||||||||||||||||||
| 767 | idx = X509_OBJECT_idx_by_subject(ctx->ctx->objs, 1, xn); | - | ||||||||||||||||||||||||
| 768 | if (idx != -1
| 0 | ||||||||||||||||||||||||
| 769 | - | |||||||||||||||||||||||||
| 770 | for (i = idx; i < sk_num(((_STACK*) (1 ? (ctx->ctx->objs) : (struct stack_st_X509_OBJECT*)0)))
| 0 | ||||||||||||||||||||||||
| 771 | pobj = ((X509_OBJECT *)sk_value(((_STACK*) (1 ? (ctx->ctx->objs) : (struct stack_st_X509_OBJECT*)0)), (i))); | - | ||||||||||||||||||||||||
| 772 | - | |||||||||||||||||||||||||
| 773 | if (pobj->type != 1
| 0 | ||||||||||||||||||||||||
| 774 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 775 | if (X509_NAME_cmp(xn,
| 0 | ||||||||||||||||||||||||
| 776 | X509_get_subject_name(pobj->data.x509))
| 0 | ||||||||||||||||||||||||
| 777 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 778 | if (ctx->check_issued(ctx, x, pobj->data.x509)
| 0 | ||||||||||||||||||||||||
| 779 | *issuer = pobj->data.x509; | - | ||||||||||||||||||||||||
| 780 | ret = 1; | - | ||||||||||||||||||||||||
| 781 | - | |||||||||||||||||||||||||
| 782 | - | |||||||||||||||||||||||||
| 783 | - | |||||||||||||||||||||||||
| 784 | - | |||||||||||||||||||||||||
| 785 | - | |||||||||||||||||||||||||
| 786 | - | |||||||||||||||||||||||||
| 787 | if (x509_check_cert_time(ctx, *issuer, 1)
| 0 | ||||||||||||||||||||||||
| 788 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 789 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 790 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 791 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 792 | CRYPTO_lock(2|8,11,__FILE__,749); | - | ||||||||||||||||||||||||
| 793 | if (*
| 0 | ||||||||||||||||||||||||
| 794 | CRYPTO_add_lock(&(*issuer)->references,1,3,__FILE__,751); never executed: CRYPTO_add_lock(&(*issuer)->references,1,3,__FILE__,751); | 0 | ||||||||||||||||||||||||
| 795 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||||||||||||||
| 796 | } | - | ||||||||||||||||||||||||
| 797 | - | |||||||||||||||||||||||||
| 798 | struct stack_st_X509_OBJECT * | - | ||||||||||||||||||||||||
| 799 | X509_STORE_get0_objects(X509_STORE *xs) | - | ||||||||||||||||||||||||
| 800 | { | - | ||||||||||||||||||||||||
| 801 | return never executed: xs->objs;return xs->objs;never executed: return xs->objs; | 0 | ||||||||||||||||||||||||
| 802 | } | - | ||||||||||||||||||||||||
| 803 | - | |||||||||||||||||||||||||
| 804 | void * | - | ||||||||||||||||||||||||
| 805 | X509_STORE_get_ex_data(X509_STORE *xs, int idx) | - | ||||||||||||||||||||||||
| 806 | { | - | ||||||||||||||||||||||||
| 807 | return never executed: CRYPTO_get_ex_data(&xs->ex_data, idx);return CRYPTO_get_ex_data(&xs->ex_data, idx);never executed: return CRYPTO_get_ex_data(&xs->ex_data, idx); | 0 | ||||||||||||||||||||||||
| 808 | } | - | ||||||||||||||||||||||||
| 809 | - | |||||||||||||||||||||||||
| 810 | int | - | ||||||||||||||||||||||||
| 811 | X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data) | - | ||||||||||||||||||||||||
| 812 | { | - | ||||||||||||||||||||||||
| 813 | return never executed: CRYPTO_set_ex_data(&xs->ex_data, idx, data);return CRYPTO_set_ex_data(&xs->ex_data, idx, data);never executed: return CRYPTO_set_ex_data(&xs->ex_data, idx, data); | 0 | ||||||||||||||||||||||||
| 814 | } | - | ||||||||||||||||||||||||
| 815 | - | |||||||||||||||||||||||||
| 816 | int | - | ||||||||||||||||||||||||
| 817 | X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags) | - | ||||||||||||||||||||||||
| 818 | { | - | ||||||||||||||||||||||||
| 819 | return never executed: X509_VERIFY_PARAM_set_flags(ctx->param, flags);return X509_VERIFY_PARAM_set_flags(ctx->param, flags);never executed: return X509_VERIFY_PARAM_set_flags(ctx->param, flags); | 0 | ||||||||||||||||||||||||
| 820 | } | - | ||||||||||||||||||||||||
| 821 | - | |||||||||||||||||||||||||
| 822 | int | - | ||||||||||||||||||||||||
| 823 | X509_STORE_set_depth(X509_STORE *ctx, int depth) | - | ||||||||||||||||||||||||
| 824 | { | - | ||||||||||||||||||||||||
| 825 | X509_VERIFY_PARAM_set_depth(ctx->param, depth); | - | ||||||||||||||||||||||||
| 826 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 827 | } | - | ||||||||||||||||||||||||
| 828 | - | |||||||||||||||||||||||||
| 829 | int | - | ||||||||||||||||||||||||
| 830 | X509_STORE_set_purpose(X509_STORE *ctx, int purpose) | - | ||||||||||||||||||||||||
| 831 | { | - | ||||||||||||||||||||||||
| 832 | return never executed: X509_VERIFY_PARAM_set_purpose(ctx->param, purpose);return X509_VERIFY_PARAM_set_purpose(ctx->param, purpose);never executed: return X509_VERIFY_PARAM_set_purpose(ctx->param, purpose); | 0 | ||||||||||||||||||||||||
| 833 | } | - | ||||||||||||||||||||||||
| 834 | - | |||||||||||||||||||||||||
| 835 | int | - | ||||||||||||||||||||||||
| 836 | X509_STORE_set_trust(X509_STORE *ctx, int trust) | - | ||||||||||||||||||||||||
| 837 | { | - | ||||||||||||||||||||||||
| 838 | return never executed: X509_VERIFY_PARAM_set_trust(ctx->param, trust);return X509_VERIFY_PARAM_set_trust(ctx->param, trust);never executed: return X509_VERIFY_PARAM_set_trust(ctx->param, trust); | 0 | ||||||||||||||||||||||||
| 839 | } | - | ||||||||||||||||||||||||
| 840 | - | |||||||||||||||||||||||||
| 841 | int | - | ||||||||||||||||||||||||
| 842 | X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *param) | - | ||||||||||||||||||||||||
| 843 | { | - | ||||||||||||||||||||||||
| 844 | return never executed: X509_VERIFY_PARAM_set1(ctx->param, param);return X509_VERIFY_PARAM_set1(ctx->param, param);never executed: return X509_VERIFY_PARAM_set1(ctx->param, param); | 0 | ||||||||||||||||||||||||
| 845 | } | - | ||||||||||||||||||||||||
| 846 | - | |||||||||||||||||||||||||
| 847 | X509_VERIFY_PARAM * | - | ||||||||||||||||||||||||
| 848 | X509_STORE_get0_param(X509_STORE *ctx) | - | ||||||||||||||||||||||||
| 849 | { | - | ||||||||||||||||||||||||
| 850 | return never executed: ctx->param;return ctx->param;never executed: return ctx->param; | 0 | ||||||||||||||||||||||||
| 851 | } | - | ||||||||||||||||||||||||
| 852 | - | |||||||||||||||||||||||||
| 853 | void | - | ||||||||||||||||||||||||
| 854 | X509_STORE_set_verify_cb(X509_STORE *ctx, | - | ||||||||||||||||||||||||
| 855 | int (*verify_cb)(int, X509_STORE_CTX *)) | - | ||||||||||||||||||||||||
| 856 | { | - | ||||||||||||||||||||||||
| 857 | ctx->verify_cb = verify_cb; | - | ||||||||||||||||||||||||
| 858 | } executed 4 times by 2 tests: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |