summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_conf.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-03-03 20:13:30 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-03-03 20:13:30 +0000
commitb5cfc2f590fd143611cc87f9fd6571dacda45e31 (patch)
tree93de82015c332800bfbc0370a84ce14b48bc1469 /crypto/x509v3/v3_conf.c
parentebaa2cf5b20d9048f47c4687b2130f8d6751a964 (diff)
option to replace extensions with new ones: mainly for creating cross-certificates
Diffstat (limited to 'crypto/x509v3/v3_conf.c')
-rw-r--r--crypto/x509v3/v3_conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c
index 24b21d4ea2..b570b6e592 100644
--- a/crypto/x509v3/v3_conf.c
+++ b/crypto/x509v3/v3_conf.c
@@ -322,10 +322,10 @@ static void delete_ext(STACK_OF(X509_EXTENSION) *sk, X509_EXTENSION *dext)
int idx;
ASN1_OBJECT *obj;
obj = X509_EXTENSION_get_object(dext);
- while ((idx = X509_EXTENSION_get_by_OBJ(sk, obj, -1)) >= 0)
+ while ((idx = X509v3_get_ext_by_OBJ(sk, obj, -1)) >= 0)
{
- X509_EXTENSION *tmpext= X509_get_ext(sk, idx);
- X509_del_ext(sk, idx);
+ X509_EXTENSION *tmpext = X509v3_get_ext(sk, idx);
+ X509v3_delete_ext(sk, idx);
X509_EXTENSION_free(tmpext);
}
}
@@ -348,7 +348,7 @@ int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section,
val = sk_CONF_VALUE_value(nval, i);
if (!(ext = X509V3_EXT_nconf(conf, ctx, val->name, val->value)))
return 0;
- if (ctx->flags == X509V3_CTX_FLAG_REPLACE)
+ if (ctx->flags == X509V3_CTX_REPLACE)
delete_ext(*sk, ext);
if (sk) X509v3_add_ext(sk, ext, -1);
X509_EXTENSION_free(ext);