| OLD | NEW |
| 1 /* pcy_cache.c */ | 1 /* pcy_cache.c */ |
| 2 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 * project 2004. | 3 * project 2004. |
| 4 */ | 4 */ |
| 5 /* ==================================================================== | 5 /* ==================================================================== |
| 6 * Copyright (c) 2004 The OpenSSL Project. All rights reserved. | 6 * Copyright (c) 2004 The OpenSSL Project. All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 ASN1_INTEGER *ext_any = NULL; | 132 ASN1_INTEGER *ext_any = NULL; |
| 133 POLICY_CONSTRAINTS *ext_pcons = NULL; | 133 POLICY_CONSTRAINTS *ext_pcons = NULL; |
| 134 CERTIFICATEPOLICIES *ext_cpols = NULL; | 134 CERTIFICATEPOLICIES *ext_cpols = NULL; |
| 135 POLICY_MAPPINGS *ext_pmaps = NULL; | 135 POLICY_MAPPINGS *ext_pmaps = NULL; |
| 136 int i; | 136 int i; |
| 137 cache = OPENSSL_malloc(sizeof(X509_POLICY_CACHE)); | 137 cache = OPENSSL_malloc(sizeof(X509_POLICY_CACHE)); |
| 138 if (!cache) | 138 if (!cache) |
| 139 return 0; | 139 return 0; |
| 140 cache->anyPolicy = NULL; | 140 cache->anyPolicy = NULL; |
| 141 cache->data = NULL; | 141 cache->data = NULL; |
| 142 cache->maps = NULL; | |
| 143 cache->any_skip = -1; | 142 cache->any_skip = -1; |
| 144 cache->explicit_skip = -1; | 143 cache->explicit_skip = -1; |
| 145 cache->map_skip = -1; | 144 cache->map_skip = -1; |
| 146 | 145 |
| 147 x->policy_cache = cache; | 146 x->policy_cache = cache; |
| 148 | 147 |
| 149 /* Handle requireExplicitPolicy *first*. Need to process this | 148 /* Handle requireExplicitPolicy *first*. Need to process this |
| 150 * even if we don't have any policies. | 149 * even if we don't have any policies. |
| 151 */ | 150 */ |
| 152 ext_pcons = X509_get_ext_d2i(x, NID_policy_constraints, &i, NULL); | 151 ext_pcons = X509_get_ext_d2i(x, NID_policy_constraints, &i, NULL); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 277 |
| 279 static int policy_cache_set_int(long *out, ASN1_INTEGER *value) | 278 static int policy_cache_set_int(long *out, ASN1_INTEGER *value) |
| 280 { | 279 { |
| 281 if (value == NULL) | 280 if (value == NULL) |
| 282 return 1; | 281 return 1; |
| 283 if (value->type == V_ASN1_NEG_INTEGER) | 282 if (value->type == V_ASN1_NEG_INTEGER) |
| 284 return 0; | 283 return 0; |
| 285 *out = ASN1_INTEGER_get(value); | 284 *out = ASN1_INTEGER_get(value); |
| 286 return 1; | 285 return 1; |
| 287 } | 286 } |
| OLD | NEW |