diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-08-12 10:32:56 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-08-12 10:32:56 +0000 |
commit | 002e66c0e81f94ac01d9a206e43eabb7f1c72a74 (patch) | |
tree | 8b27918e90406164f174b9ac457575675813f92e /crypto/x509v3/pcy_data.c | |
parent | e9746e03ee222b0123ac118f8952e161e7d48a2d (diff) |
Support for policy mappings extension.
Delete X509_POLICY_REF code.
Fix handling of invalid policy extensions to return the correct error.
Add command line option to inhibit policy mappings.
Diffstat (limited to 'crypto/x509v3/pcy_data.c')
-rw-r--r-- | crypto/x509v3/pcy_data.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/x509v3/pcy_data.c b/crypto/x509v3/pcy_data.c index 4711b1ee92..3d59f4de23 100644 --- a/crypto/x509v3/pcy_data.c +++ b/crypto/x509v3/pcy_data.c @@ -82,17 +82,21 @@ void policy_data_free(X509_POLICY_DATA *data) * another source. */ -X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, ASN1_OBJECT *id, int crit) +X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, + const ASN1_OBJECT *cid, int crit) { X509_POLICY_DATA *ret; - if (!policy && !id) + ASN1_OBJECT *id; + if (!policy && !cid) return NULL; - if (id) + if (cid) { - id = OBJ_dup(id); + id = OBJ_dup(cid); if (!id) return NULL; } + else + id = NULL; ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); if (!ret) return NULL; |