diff options
| author | djm <> | 2009-01-09 12:14:11 +0000 |
|---|---|---|
| committer | djm <> | 2009-01-09 12:14:11 +0000 |
| commit | a0fdc9ec41594852f67ec77dfad9cb06bacc4186 (patch) | |
| tree | c43f6b3a4d93ad2cb3dcf93275295679d895a033 /src/lib/libcrypto/x509v3 | |
| parent | 5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80 (diff) | |
| download | openbsd-a0fdc9ec41594852f67ec77dfad9cb06bacc4186.tar.gz openbsd-a0fdc9ec41594852f67ec77dfad9cb06bacc4186.tar.bz2 openbsd-a0fdc9ec41594852f67ec77dfad9cb06bacc4186.zip | |
import openssl-0.9.8j
Diffstat (limited to 'src/lib/libcrypto/x509v3')
34 files changed, 73 insertions, 55 deletions
diff --git a/src/lib/libcrypto/x509v3/ext_dat.h b/src/lib/libcrypto/x509v3/ext_dat.h index 5c063ac65d..3eaec46f8a 100644 --- a/src/lib/libcrypto/x509v3/ext_dat.h +++ b/src/lib/libcrypto/x509v3/ext_dat.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* ext_dat.h */ | 1 | /* ext_dat.h */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/pcy_cache.c b/src/lib/libcrypto/x509v3/pcy_cache.c index c18beb89f5..1030931b71 100644 --- a/src/lib/libcrypto/x509v3/pcy_cache.c +++ b/src/lib/libcrypto/x509v3/pcy_cache.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_cache.c */ | 1 | /* pcy_cache.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/pcy_data.c b/src/lib/libcrypto/x509v3/pcy_data.c index 614d2b4935..fb392b901f 100644 --- a/src/lib/libcrypto/x509v3/pcy_data.c +++ b/src/lib/libcrypto/x509v3/pcy_data.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_data.c */ | 1 | /* pcy_data.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
| @@ -87,6 +87,12 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, ASN1_OBJECT *id, int crit) | |||
| 87 | X509_POLICY_DATA *ret; | 87 | X509_POLICY_DATA *ret; |
| 88 | if (!policy && !id) | 88 | if (!policy && !id) |
| 89 | return NULL; | 89 | return NULL; |
| 90 | if (id) | ||
| 91 | { | ||
| 92 | id = OBJ_dup(id); | ||
| 93 | if (!id) | ||
| 94 | return NULL; | ||
| 95 | } | ||
| 90 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); | 96 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); |
| 91 | if (!ret) | 97 | if (!ret) |
| 92 | return NULL; | 98 | return NULL; |
| @@ -94,6 +100,8 @@ X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, ASN1_OBJECT *id, int crit) | |||
| 94 | if (!ret->expected_policy_set) | 100 | if (!ret->expected_policy_set) |
| 95 | { | 101 | { |
| 96 | OPENSSL_free(ret); | 102 | OPENSSL_free(ret); |
| 103 | if (id) | ||
| 104 | ASN1_OBJECT_free(id); | ||
| 97 | return NULL; | 105 | return NULL; |
| 98 | } | 106 | } |
| 99 | 107 | ||
diff --git a/src/lib/libcrypto/x509v3/pcy_int.h b/src/lib/libcrypto/x509v3/pcy_int.h index ba62a209da..3780de4fcd 100644 --- a/src/lib/libcrypto/x509v3/pcy_int.h +++ b/src/lib/libcrypto/x509v3/pcy_int.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_int.h */ | 1 | /* pcy_int.h */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/pcy_lib.c b/src/lib/libcrypto/x509v3/pcy_lib.c index dae4840bc5..93bfd92703 100644 --- a/src/lib/libcrypto/x509v3/pcy_lib.c +++ b/src/lib/libcrypto/x509v3/pcy_lib.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_lib.c */ | 1 | /* pcy_lib.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/pcy_map.c b/src/lib/libcrypto/x509v3/pcy_map.c index 35221e8ba8..f28796e6d4 100644 --- a/src/lib/libcrypto/x509v3/pcy_map.c +++ b/src/lib/libcrypto/x509v3/pcy_map.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_map.c */ | 1 | /* pcy_map.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/pcy_node.c b/src/lib/libcrypto/x509v3/pcy_node.c index dcc1554e29..6587cb05ab 100644 --- a/src/lib/libcrypto/x509v3/pcy_node.c +++ b/src/lib/libcrypto/x509v3/pcy_node.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_node.c */ | 1 | /* pcy_node.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/pcy_tree.c b/src/lib/libcrypto/x509v3/pcy_tree.c index 4fda1d419a..6c87a7f506 100644 --- a/src/lib/libcrypto/x509v3/pcy_tree.c +++ b/src/lib/libcrypto/x509v3/pcy_tree.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* pcy_tree.c */ | 1 | /* pcy_tree.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) 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 | /* ==================================================================== |
| @@ -130,9 +130,9 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, | |||
| 130 | ret = 2; | 130 | ret = 2; |
| 131 | if (explicit_policy > 0) | 131 | if (explicit_policy > 0) |
| 132 | { | 132 | { |
| 133 | explicit_policy--; | 133 | if (!(x->ex_flags & EXFLAG_SI)) |
| 134 | if (!(x->ex_flags & EXFLAG_SS) | 134 | explicit_policy--; |
| 135 | && (cache->explicit_skip != -1) | 135 | if ((cache->explicit_skip != -1) |
| 136 | && (cache->explicit_skip < explicit_policy)) | 136 | && (cache->explicit_skip < explicit_policy)) |
| 137 | explicit_policy = cache->explicit_skip; | 137 | explicit_policy = cache->explicit_skip; |
| 138 | } | 138 | } |
| @@ -197,13 +197,14 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, | |||
| 197 | /* Any matching allowed if certificate is self | 197 | /* Any matching allowed if certificate is self |
| 198 | * issued and not the last in the chain. | 198 | * issued and not the last in the chain. |
| 199 | */ | 199 | */ |
| 200 | if (!(x->ex_flags & EXFLAG_SS) || (i == 0)) | 200 | if (!(x->ex_flags & EXFLAG_SI) || (i == 0)) |
| 201 | level->flags |= X509_V_FLAG_INHIBIT_ANY; | 201 | level->flags |= X509_V_FLAG_INHIBIT_ANY; |
| 202 | } | 202 | } |
| 203 | else | 203 | else |
| 204 | { | 204 | { |
| 205 | any_skip--; | 205 | if (!(x->ex_flags & EXFLAG_SI)) |
| 206 | if ((cache->any_skip > 0) | 206 | any_skip--; |
| 207 | if ((cache->any_skip >= 0) | ||
| 207 | && (cache->any_skip < any_skip)) | 208 | && (cache->any_skip < any_skip)) |
| 208 | any_skip = cache->any_skip; | 209 | any_skip = cache->any_skip; |
| 209 | } | 210 | } |
| @@ -213,7 +214,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, | |||
| 213 | else | 214 | else |
| 214 | { | 215 | { |
| 215 | map_skip--; | 216 | map_skip--; |
| 216 | if ((cache->map_skip > 0) | 217 | if ((cache->map_skip >= 0) |
| 217 | && (cache->map_skip < map_skip)) | 218 | && (cache->map_skip < map_skip)) |
| 218 | map_skip = cache->map_skip; | 219 | map_skip = cache->map_skip; |
| 219 | } | 220 | } |
| @@ -310,7 +311,8 @@ static int tree_link_any(X509_POLICY_LEVEL *curr, | |||
| 310 | 311 | ||
| 311 | if (data == NULL) | 312 | if (data == NULL) |
| 312 | return 0; | 313 | return 0; |
| 313 | data->qualifier_set = curr->anyPolicy->data->qualifier_set; | 314 | /* Curr may not have anyPolicy */ |
| 315 | data->qualifier_set = cache->anyPolicy->qualifier_set; | ||
| 314 | data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS; | 316 | data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS; |
| 315 | if (!level_add_node(curr, data, node, tree)) | 317 | if (!level_add_node(curr, data, node, tree)) |
| 316 | { | 318 | { |
diff --git a/src/lib/libcrypto/x509v3/v3_akey.c b/src/lib/libcrypto/x509v3/v3_akey.c index ac0548b775..c6b68ee221 100644 --- a/src/lib/libcrypto/x509v3/v3_akey.c +++ b/src/lib/libcrypto/x509v3/v3_akey.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_akey.c */ | 1 | /* v3_akey.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_akeya.c b/src/lib/libcrypto/x509v3/v3_akeya.c index 2aafa26ba7..2c50f7360e 100644 --- a/src/lib/libcrypto/x509v3/v3_akeya.c +++ b/src/lib/libcrypto/x509v3/v3_akeya.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_akey_asn1.c */ | 1 | /* v3_akey_asn1.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_alt.c b/src/lib/libcrypto/x509v3/v3_alt.c index bb2f5bc54e..58b2952478 100644 --- a/src/lib/libcrypto/x509v3/v3_alt.c +++ b/src/lib/libcrypto/x509v3/v3_alt.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_alt.c */ | 1 | /* v3_alt.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
| @@ -527,7 +527,8 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, | |||
| 527 | return gen; | 527 | return gen; |
| 528 | 528 | ||
| 529 | err: | 529 | err: |
| 530 | GENERAL_NAME_free(gen); | 530 | if (!out) |
| 531 | GENERAL_NAME_free(gen); | ||
| 531 | return NULL; | 532 | return NULL; |
| 532 | } | 533 | } |
| 533 | 534 | ||
diff --git a/src/lib/libcrypto/x509v3/v3_bcons.c b/src/lib/libcrypto/x509v3/v3_bcons.c index 74b1233071..82aa488f75 100644 --- a/src/lib/libcrypto/x509v3/v3_bcons.c +++ b/src/lib/libcrypto/x509v3/v3_bcons.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_bcons.c */ | 1 | /* v3_bcons.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_bitst.c b/src/lib/libcrypto/x509v3/v3_bitst.c index cf31f0816e..058d0d4dce 100644 --- a/src/lib/libcrypto/x509v3/v3_bitst.c +++ b/src/lib/libcrypto/x509v3/v3_bitst.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_bitst.c */ | 1 | /* v3_bitst.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_conf.c b/src/lib/libcrypto/x509v3/v3_conf.c index 2b867305fb..11eb6b7fd5 100644 --- a/src/lib/libcrypto/x509v3/v3_conf.c +++ b/src/lib/libcrypto/x509v3/v3_conf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_conf.c */ | 1 | /* v3_conf.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_cpols.c b/src/lib/libcrypto/x509v3/v3_cpols.c index a40f490aa9..95596055ab 100644 --- a/src/lib/libcrypto/x509v3/v3_cpols.c +++ b/src/lib/libcrypto/x509v3/v3_cpols.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_cpols.c */ | 1 | /* v3_cpols.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_crld.c b/src/lib/libcrypto/x509v3/v3_crld.c index c6e3ebae7b..181a8977b1 100644 --- a/src/lib/libcrypto/x509v3/v3_crld.c +++ b/src/lib/libcrypto/x509v3/v3_crld.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_crld.c */ | 1 | /* v3_crld.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_enum.c b/src/lib/libcrypto/x509v3/v3_enum.c index a236cb22e1..36576eaa4d 100644 --- a/src/lib/libcrypto/x509v3/v3_enum.c +++ b/src/lib/libcrypto/x509v3/v3_enum.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_enum.c */ | 1 | /* v3_enum.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_extku.c b/src/lib/libcrypto/x509v3/v3_extku.c index a4efe0031e..c0d14500ed 100644 --- a/src/lib/libcrypto/x509v3/v3_extku.c +++ b/src/lib/libcrypto/x509v3/v3_extku.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_extku.c */ | 1 | /* v3_extku.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_genn.c b/src/lib/libcrypto/x509v3/v3_genn.c index 650b510980..84b4b1c881 100644 --- a/src/lib/libcrypto/x509v3/v3_genn.c +++ b/src/lib/libcrypto/x509v3/v3_genn.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_genn.c */ | 1 | /* v3_genn.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_ia5.c b/src/lib/libcrypto/x509v3/v3_ia5.c index b739ccd036..4ff12b52b5 100644 --- a/src/lib/libcrypto/x509v3/v3_ia5.c +++ b/src/lib/libcrypto/x509v3/v3_ia5.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_ia5.c */ | 1 | /* v3_ia5.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_info.c b/src/lib/libcrypto/x509v3/v3_info.c index e0ef69de42..e1b8699f92 100644 --- a/src/lib/libcrypto/x509v3/v3_info.c +++ b/src/lib/libcrypto/x509v3/v3_info.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_info.c */ | 1 | /* v3_info.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_int.c b/src/lib/libcrypto/x509v3/v3_int.c index 9a48dc1508..4bfd14cf46 100644 --- a/src/lib/libcrypto/x509v3/v3_int.c +++ b/src/lib/libcrypto/x509v3/v3_int.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_int.c */ | 1 | /* v3_int.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_lib.c b/src/lib/libcrypto/x509v3/v3_lib.c index f3015ea610..df3a48f43e 100644 --- a/src/lib/libcrypto/x509v3/v3_lib.c +++ b/src/lib/libcrypto/x509v3/v3_lib.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_lib.c */ | 1 | /* v3_lib.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_ncons.c b/src/lib/libcrypto/x509v3/v3_ncons.c index 42e7f5a879..4e706be3e1 100644 --- a/src/lib/libcrypto/x509v3/v3_ncons.c +++ b/src/lib/libcrypto/x509v3/v3_ncons.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_ncons.c */ | 1 | /* v3_ncons.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c index 62aac06335..e426ea930c 100644 --- a/src/lib/libcrypto/x509v3/v3_ocsp.c +++ b/src/lib/libcrypto/x509v3/v3_ocsp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_ocsp.c */ | 1 | /* v3_ocsp.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_pcons.c b/src/lib/libcrypto/x509v3/v3_pcons.c index 13248c2ada..86c0ff70e6 100644 --- a/src/lib/libcrypto/x509v3/v3_pcons.c +++ b/src/lib/libcrypto/x509v3/v3_pcons.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_pcons.c */ | 1 | /* v3_pcons.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_pku.c b/src/lib/libcrypto/x509v3/v3_pku.c index 5c4626e89b..076f3ff48e 100644 --- a/src/lib/libcrypto/x509v3/v3_pku.c +++ b/src/lib/libcrypto/x509v3/v3_pku.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_pku.c */ | 1 | /* v3_pku.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_pmaps.c b/src/lib/libcrypto/x509v3/v3_pmaps.c index 626303264f..da03bbc35d 100644 --- a/src/lib/libcrypto/x509v3/v3_pmaps.c +++ b/src/lib/libcrypto/x509v3/v3_pmaps.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_pmaps.c */ | 1 | /* v3_pmaps.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c index 20bd9bda19..c1bb17f105 100644 --- a/src/lib/libcrypto/x509v3/v3_prn.c +++ b/src/lib/libcrypto/x509v3/v3_prn.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_prn.c */ | 1 | /* v3_prn.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c index b2f5cdfa05..e18751e01c 100644 --- a/src/lib/libcrypto/x509v3/v3_purp.c +++ b/src/lib/libcrypto/x509v3/v3_purp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_purp.c */ | 1 | /* v3_purp.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2001. | 3 | * project 2001. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
| @@ -291,7 +291,9 @@ int X509_supported_extension(X509_EXTENSION *ex) | |||
| 291 | NID_sbgp_ipAddrBlock, /* 290 */ | 291 | NID_sbgp_ipAddrBlock, /* 290 */ |
| 292 | NID_sbgp_autonomousSysNum, /* 291 */ | 292 | NID_sbgp_autonomousSysNum, /* 291 */ |
| 293 | #endif | 293 | #endif |
| 294 | NID_proxyCertInfo /* 661 */ | 294 | NID_policy_constraints, /* 401 */ |
| 295 | NID_proxyCertInfo, /* 661 */ | ||
| 296 | NID_inhibit_any_policy /* 748 */ | ||
| 295 | }; | 297 | }; |
| 296 | 298 | ||
| 297 | int ex_nid; | 299 | int ex_nid; |
| @@ -325,7 +327,7 @@ static void x509v3_cache_extensions(X509 *x) | |||
| 325 | #endif | 327 | #endif |
| 326 | /* Does subject name match issuer ? */ | 328 | /* Does subject name match issuer ? */ |
| 327 | if(!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) | 329 | if(!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) |
| 328 | x->ex_flags |= EXFLAG_SS; | 330 | x->ex_flags |= EXFLAG_SI; |
| 329 | /* V1 should mean no extensions ... */ | 331 | /* V1 should mean no extensions ... */ |
| 330 | if(!X509_get_version(x)) x->ex_flags |= EXFLAG_V1; | 332 | if(!X509_get_version(x)) x->ex_flags |= EXFLAG_V1; |
| 331 | /* Handle basic constraints */ | 333 | /* Handle basic constraints */ |
diff --git a/src/lib/libcrypto/x509v3/v3_skey.c b/src/lib/libcrypto/x509v3/v3_skey.c index da0a3558f6..202c9e4896 100644 --- a/src/lib/libcrypto/x509v3/v3_skey.c +++ b/src/lib/libcrypto/x509v3/v3_skey.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_skey.c */ | 1 | /* v3_skey.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_sxnet.c b/src/lib/libcrypto/x509v3/v3_sxnet.c index eaea9ea01b..2a6bf11b65 100644 --- a/src/lib/libcrypto/x509v3/v3_sxnet.c +++ b/src/lib/libcrypto/x509v3/v3_sxnet.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_sxnet.c */ | 1 | /* v3_sxnet.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c index ac171ca940..a4236bbb6d 100644 --- a/src/lib/libcrypto/x509v3/v3_utl.c +++ b/src/lib/libcrypto/x509v3/v3_utl.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* v3_utl.c */ | 1 | /* v3_utl.c */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
| @@ -736,17 +736,20 @@ static int ipv6_from_asc(unsigned char *v6, const char *in) | |||
| 736 | 736 | ||
| 737 | /* Format result */ | 737 | /* Format result */ |
| 738 | 738 | ||
| 739 | /* Copy initial part */ | 739 | if (v6stat.zero_pos >= 0) |
| 740 | if (v6stat.zero_pos > 0) | 740 | { |
| 741 | /* Copy initial part */ | ||
| 741 | memcpy(v6, v6stat.tmp, v6stat.zero_pos); | 742 | memcpy(v6, v6stat.tmp, v6stat.zero_pos); |
| 742 | /* Zero middle */ | 743 | /* Zero middle */ |
| 743 | if (v6stat.total != 16) | ||
| 744 | memset(v6 + v6stat.zero_pos, 0, 16 - v6stat.total); | 744 | memset(v6 + v6stat.zero_pos, 0, 16 - v6stat.total); |
| 745 | /* Copy final part */ | 745 | /* Copy final part */ |
| 746 | if (v6stat.total != v6stat.zero_pos) | 746 | if (v6stat.total != v6stat.zero_pos) |
| 747 | memcpy(v6 + v6stat.zero_pos + 16 - v6stat.total, | 747 | memcpy(v6 + v6stat.zero_pos + 16 - v6stat.total, |
| 748 | v6stat.tmp + v6stat.zero_pos, | 748 | v6stat.tmp + v6stat.zero_pos, |
| 749 | v6stat.total - v6stat.zero_pos); | 749 | v6stat.total - v6stat.zero_pos); |
| 750 | } | ||
| 751 | else | ||
| 752 | memcpy(v6, v6stat.tmp, 16); | ||
| 750 | 753 | ||
| 751 | return 1; | 754 | return 1; |
| 752 | } | 755 | } |
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h index db2b0482c1..9ef83da755 100644 --- a/src/lib/libcrypto/x509v3/x509v3.h +++ b/src/lib/libcrypto/x509v3/x509v3.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* x509v3.h */ | 1 | /* x509v3.h */ |
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
| @@ -363,6 +363,8 @@ DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) | |||
| 363 | #define EXFLAG_NSCERT 0x8 | 363 | #define EXFLAG_NSCERT 0x8 |
| 364 | 364 | ||
| 365 | #define EXFLAG_CA 0x10 | 365 | #define EXFLAG_CA 0x10 |
| 366 | /* Really self issued not necessarily self signed */ | ||
| 367 | #define EXFLAG_SI 0x20 | ||
| 366 | #define EXFLAG_SS 0x20 | 368 | #define EXFLAG_SS 0x20 |
| 367 | #define EXFLAG_V1 0x40 | 369 | #define EXFLAG_V1 0x40 |
| 368 | #define EXFLAG_INVALID 0x80 | 370 | #define EXFLAG_INVALID 0x80 |
| @@ -370,7 +372,7 @@ DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) | |||
| 370 | #define EXFLAG_CRITICAL 0x200 | 372 | #define EXFLAG_CRITICAL 0x200 |
| 371 | #define EXFLAG_PROXY 0x400 | 373 | #define EXFLAG_PROXY 0x400 |
| 372 | 374 | ||
| 373 | #define EXFLAG_INVALID_POLICY 0x400 | 375 | #define EXFLAG_INVALID_POLICY 0x800 |
| 374 | 376 | ||
| 375 | #define KU_DIGITAL_SIGNATURE 0x0080 | 377 | #define KU_DIGITAL_SIGNATURE 0x0080 |
| 376 | #define KU_NON_REPUDIATION 0x0040 | 378 | #define KU_NON_REPUDIATION 0x0040 |
