| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/x509v3/pcy_map.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | int | - | ||||||||||||
| 8 | policy_cache_set_mapping(X509 *x, POLICY_MAPPINGS *maps) | - | ||||||||||||
| 9 | { | - | ||||||||||||
| 10 | POLICY_MAPPING *map; | - | ||||||||||||
| 11 | X509_POLICY_DATA *data; | - | ||||||||||||
| 12 | X509_POLICY_CACHE *cache = x->policy_cache; | - | ||||||||||||
| 13 | int i; | - | ||||||||||||
| 14 | int ret = 0; | - | ||||||||||||
| 15 | - | |||||||||||||
| 16 | if (sk_num(((_STACK*) (1 ? (maps) : (struct stack_st_POLICY_MAPPING*)0))) == 0
| 0 | ||||||||||||
| 17 | ret = -1; | - | ||||||||||||
| 18 | goto never executed: bad_mapping;goto bad_mapping;never executed: goto bad_mapping; | 0 | ||||||||||||
| 19 | } | - | ||||||||||||
| 20 | for (i = 0; i < sk_num(((_STACK*) (1 ? (maps) : (struct stack_st_POLICY_MAPPING*)0)))
| 0 | ||||||||||||
| 21 | map = ((POLICY_MAPPING *)sk_value(((_STACK*) (1 ? (maps) : (struct stack_st_POLICY_MAPPING*)0)), (i))); | - | ||||||||||||
| 22 | - | |||||||||||||
| 23 | if ((
| 0 | ||||||||||||
| 24 | (
| 0 | ||||||||||||
| 25 | ret = -1; | - | ||||||||||||
| 26 | goto never executed: bad_mapping;goto bad_mapping;never executed: goto bad_mapping; | 0 | ||||||||||||
| 27 | } | - | ||||||||||||
| 28 | - | |||||||||||||
| 29 | - | |||||||||||||
| 30 | data = policy_cache_find_data(cache, map->issuerDomainPolicy); | - | ||||||||||||
| 31 | - | |||||||||||||
| 32 | if (!data
| 0 | ||||||||||||
| 33 | continue; never executed: continue; | 0 | ||||||||||||
| 34 | - | |||||||||||||
| 35 | - | |||||||||||||
| 36 | if (!data
| 0 | ||||||||||||
| 37 | data = policy_data_new( | - | ||||||||||||
| 38 | ((void *)0) | - | ||||||||||||
| 39 | , map->issuerDomainPolicy, | - | ||||||||||||
| 40 | cache->anyPolicy->flags & | - | ||||||||||||
| 41 | 0x10); | - | ||||||||||||
| 42 | if (!data
| 0 | ||||||||||||
| 43 | goto never executed: bad_mapping;goto bad_mapping;never executed: goto bad_mapping; | 0 | ||||||||||||
| 44 | data->qualifier_set = cache->anyPolicy->qualifier_set; | - | ||||||||||||
| 45 | - | |||||||||||||
| 46 | data->flags |= 0x2; | - | ||||||||||||
| 47 | data->flags |= 0x4; | - | ||||||||||||
| 48 | if (!sk_push(((_STACK*) (1 ? (cache->data) : (struct stack_st_X509_POLICY_DATA*)0)), ((void*) (1 ? (data) : (X509_POLICY_DATA*)0)))
| 0 | ||||||||||||
| 49 | policy_data_free(data); | - | ||||||||||||
| 50 | goto never executed: bad_mapping;goto bad_mapping;never executed: goto bad_mapping; | 0 | ||||||||||||
| 51 | } | - | ||||||||||||
| 52 | } never executed: elseend of block | 0 | ||||||||||||
| 53 | data->flags |= 0x1; never executed: data->flags |= 0x1; | 0 | ||||||||||||
| 54 | if (!sk_push(((_STACK*) (1 ? (data->expected_policy_set) : (struct stack_st_ASN1_OBJECT*)0)), ((void*) (1 ? (map->subjectDomainPolicy) : (ASN1_OBJECT*)0)))
| 0 | ||||||||||||
| 55 | ) | - | ||||||||||||
| 56 | goto never executed: bad_mapping;goto bad_mapping;never executed: goto bad_mapping; | 0 | ||||||||||||
| 57 | map->subjectDomainPolicy = | - | ||||||||||||
| 58 | ((void *)0) | - | ||||||||||||
| 59 | ; | - | ||||||||||||
| 60 | } never executed: end of block | 0 | ||||||||||||
| 61 | - | |||||||||||||
| 62 | ret = 1; | - | ||||||||||||
| 63 | - | |||||||||||||
| 64 | bad_mapping: code before this statement never executed: bad_mapping: | 0 | ||||||||||||
| 65 | if (ret == -1
| 0 | ||||||||||||
| 66 | x->ex_flags |= 0x0800; never executed: x->ex_flags |= 0x0800; | 0 | ||||||||||||
| 67 | sk_pop_free(((_STACK*) (1 ? (maps) : (struct stack_st_POLICY_MAPPING*)0)), ((void (*)(void *)) ((1 ? (POLICY_MAPPING_free) : (void (*)(POLICY_MAPPING *))0)))); | - | ||||||||||||
| 68 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||
| 69 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |