summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-03-20 10:51:21 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-03-20 11:11:47 +0100
commit743eda0653266b234887e80124b1cf72531ea9e5 (patch)
tree928a192e3890a7f1913ff9f2b1799dd30fd45325
parent1dcf6fce00eea99082a5ad097d6660aa2000e75c (diff)
downloadgnutls-743eda0653266b234887e80124b1cf72531ea9e5.tar.gz
renamed some of the newly introduced functions
-rw-r--r--NEWS48
-rw-r--r--doc/Makefile.am96
-rw-r--r--doc/cha-cert-auth.texi4
-rw-r--r--doc/manpages/Makefile.am48
-rw-r--r--lib/includes/gnutls/x509-ext.h52
-rw-r--r--lib/libgnutls.map48
-rw-r--r--lib/x509/crq.c8
-rw-r--r--lib/x509/extensions.c6
-rw-r--r--lib/x509/name_constraints.c4
-rw-r--r--lib/x509/output.c6
-rw-r--r--lib/x509/x509.c24
-rw-r--r--lib/x509/x509_ext.c96
-rw-r--r--lib/x509/x509_write.c26
-rw-r--r--symbols.last48
14 files changed, 257 insertions, 257 deletions
diff --git a/NEWS b/NEWS
index 4cd4227beb..058c25e80a 100644
--- a/NEWS
+++ b/NEWS
@@ -123,52 +123,52 @@ gnutls_subject_alt_names_init: Added
gnutls_subject_alt_names_deinit: Added
gnutls_subject_alt_names_get: Added
gnutls_subject_alt_names_set: Added
-gnutls_x509_ext_get_subject_alt_names: Added
-gnutls_x509_ext_set_subject_alt_names: Added
+gnutls_x509_ext_import_subject_alt_names: Added
+gnutls_x509_ext_export_subject_alt_names: Added
gnutls_x509_crl_dist_points_init: Added
gnutls_x509_crl_dist_points_deinit: Added
gnutls_x509_crl_dist_points_get: Added
gnutls_x509_crl_dist_points_set: Added
-gnutls_x509_ext_get_crl_dist_points: Added
-gnutls_x509_ext_set_crl_dist_points: Added
-gnutls_x509_ext_get_name_constraints: Added
-gnutls_x509_ext_set_name_constraints: Added
+gnutls_x509_ext_import_crl_dist_points: Added
+gnutls_x509_ext_export_crl_dist_points: Added
+gnutls_x509_ext_import_name_constraints: Added
+gnutls_x509_ext_export_name_constraints: Added
gnutls_x509_aia_init: Added
gnutls_x509_aia_deinit: Added
gnutls_x509_aia_get: Added
gnutls_x509_aia_set: Added
-gnutls_x509_ext_get_aia: Added
-gnutls_x509_ext_set_aia: Added
-gnutls_x509_ext_get_subject_key_id: Added
-gnutls_x509_ext_set_subject_key_id: Added
-gnutls_x509_ext_set_authority_key_id: Added
-gnutls_x509_ext_get_authority_key_id: Added
+gnutls_x509_ext_import_aia: Added
+gnutls_x509_ext_export_aia: Added
+gnutls_x509_ext_import_subject_key_id: Added
+gnutls_x509_ext_export_subject_key_id: Added
+gnutls_x509_ext_export_authority_key_id: Added
+gnutls_x509_ext_import_authority_key_id: Added
gnutls_x509_aki_init: Added
gnutls_x509_aki_get_id: Added
gnutls_x509_aki_get_cert_issuer: Added
gnutls_x509_aki_set_id: Added
gnutls_x509_aki_set_cert_issuer: Added
gnutls_x509_aki_deinit: Added
-gnutls_x509_ext_get_private_key_usage_period: Added
-gnutls_x509_ext_set_private_key_usage_period: Added
-gnutls_x509_ext_get_basic_constraints: Added
-gnutls_x509_ext_set_basic_constraints: Added
-gnutls_x509_ext_get_key_usage: Added
-gnutls_x509_ext_set_key_usage: Added
-gnutls_x509_ext_get_proxy: Added
-gnutls_x509_ext_set_proxy: Added
+gnutls_x509_ext_import_private_key_usage_period: Added
+gnutls_x509_ext_export_private_key_usage_period: Added
+gnutls_x509_ext_import_basic_constraints: Added
+gnutls_x509_ext_export_basic_constraints: Added
+gnutls_x509_ext_import_key_usage: Added
+gnutls_x509_ext_export_key_usage: Added
+gnutls_x509_ext_import_proxy: Added
+gnutls_x509_ext_export_proxy: Added
gnutls_x509_policies_init: Added
gnutls_x509_policies_deinit: Added
gnutls_x509_policies_get: Added
gnutls_x509_policies_set: Added
-gnutls_x509_ext_get_policies: Added
-gnutls_x509_ext_set_policies: Added
+gnutls_x509_ext_import_policies: Added
+gnutls_x509_ext_export_policies: Added
gnutls_x509_key_purpose_init: Added
gnutls_x509_key_purpose_deinit: Added
gnutls_x509_key_purpose_set: Added
gnutls_x509_key_purpose_get: Added
-gnutls_x509_ext_get_key_purposes: Added
-gnutls_x509_ext_set_key_purposes: Added
+gnutls_x509_ext_import_key_purposes: Added
+gnutls_x509_ext_export_key_purposes: Added
gnutls_digest_self_test: Added (conditionally)
gnutls_mac_self_test: Added (conditionally)
gnutls_pk_self_test: Added (conditionally)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 7d58861278..50c7f3585b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2308,54 +2308,54 @@ FUNCS += functions/gnutls_x509_dn_oid_known
FUNCS += functions/gnutls_x509_dn_oid_known.short
FUNCS += functions/gnutls_x509_dn_oid_name
FUNCS += functions/gnutls_x509_dn_oid_name.short
-FUNCS += functions/gnutls_x509_ext_get_aia
-FUNCS += functions/gnutls_x509_ext_get_aia.short
-FUNCS += functions/gnutls_x509_ext_get_authority_key_id
-FUNCS += functions/gnutls_x509_ext_get_authority_key_id.short
-FUNCS += functions/gnutls_x509_ext_get_basic_constraints
-FUNCS += functions/gnutls_x509_ext_get_basic_constraints.short
-FUNCS += functions/gnutls_x509_ext_get_crl_dist_points
-FUNCS += functions/gnutls_x509_ext_get_crl_dist_points.short
-FUNCS += functions/gnutls_x509_ext_get_key_purposes
-FUNCS += functions/gnutls_x509_ext_get_key_purposes.short
-FUNCS += functions/gnutls_x509_ext_get_key_usage
-FUNCS += functions/gnutls_x509_ext_get_key_usage.short
-FUNCS += functions/gnutls_x509_ext_get_name_constraints
-FUNCS += functions/gnutls_x509_ext_get_name_constraints.short
-FUNCS += functions/gnutls_x509_ext_get_policies
-FUNCS += functions/gnutls_x509_ext_get_policies.short
-FUNCS += functions/gnutls_x509_ext_get_private_key_usage_period
-FUNCS += functions/gnutls_x509_ext_get_private_key_usage_period.short
-FUNCS += functions/gnutls_x509_ext_get_proxy
-FUNCS += functions/gnutls_x509_ext_get_proxy.short
-FUNCS += functions/gnutls_x509_ext_get_subject_alt_names
-FUNCS += functions/gnutls_x509_ext_get_subject_alt_names.short
-FUNCS += functions/gnutls_x509_ext_get_subject_key_id
-FUNCS += functions/gnutls_x509_ext_get_subject_key_id.short
-FUNCS += functions/gnutls_x509_ext_set_aia
-FUNCS += functions/gnutls_x509_ext_set_aia.short
-FUNCS += functions/gnutls_x509_ext_set_authority_key_id
-FUNCS += functions/gnutls_x509_ext_set_authority_key_id.short
-FUNCS += functions/gnutls_x509_ext_set_basic_constraints
-FUNCS += functions/gnutls_x509_ext_set_basic_constraints.short
-FUNCS += functions/gnutls_x509_ext_set_crl_dist_points
-FUNCS += functions/gnutls_x509_ext_set_crl_dist_points.short
-FUNCS += functions/gnutls_x509_ext_set_key_purposes
-FUNCS += functions/gnutls_x509_ext_set_key_purposes.short
-FUNCS += functions/gnutls_x509_ext_set_key_usage
-FUNCS += functions/gnutls_x509_ext_set_key_usage.short
-FUNCS += functions/gnutls_x509_ext_set_name_constraints
-FUNCS += functions/gnutls_x509_ext_set_name_constraints.short
-FUNCS += functions/gnutls_x509_ext_set_policies
-FUNCS += functions/gnutls_x509_ext_set_policies.short
-FUNCS += functions/gnutls_x509_ext_set_private_key_usage_period
-FUNCS += functions/gnutls_x509_ext_set_private_key_usage_period.short
-FUNCS += functions/gnutls_x509_ext_set_proxy
-FUNCS += functions/gnutls_x509_ext_set_proxy.short
-FUNCS += functions/gnutls_x509_ext_set_subject_alt_names
-FUNCS += functions/gnutls_x509_ext_set_subject_alt_names.short
-FUNCS += functions/gnutls_x509_ext_set_subject_key_id
-FUNCS += functions/gnutls_x509_ext_set_subject_key_id.short
+FUNCS += functions/gnutls_x509_ext_export_aia
+FUNCS += functions/gnutls_x509_ext_export_aia.short
+FUNCS += functions/gnutls_x509_ext_export_authority_key_id
+FUNCS += functions/gnutls_x509_ext_export_authority_key_id.short
+FUNCS += functions/gnutls_x509_ext_export_basic_constraints
+FUNCS += functions/gnutls_x509_ext_export_basic_constraints.short
+FUNCS += functions/gnutls_x509_ext_export_crl_dist_points
+FUNCS += functions/gnutls_x509_ext_export_crl_dist_points.short
+FUNCS += functions/gnutls_x509_ext_export_key_purposes
+FUNCS += functions/gnutls_x509_ext_export_key_purposes.short
+FUNCS += functions/gnutls_x509_ext_export_key_usage
+FUNCS += functions/gnutls_x509_ext_export_key_usage.short
+FUNCS += functions/gnutls_x509_ext_export_name_constraints
+FUNCS += functions/gnutls_x509_ext_export_name_constraints.short
+FUNCS += functions/gnutls_x509_ext_export_policies
+FUNCS += functions/gnutls_x509_ext_export_policies.short
+FUNCS += functions/gnutls_x509_ext_export_private_key_usage_period
+FUNCS += functions/gnutls_x509_ext_export_private_key_usage_period.short
+FUNCS += functions/gnutls_x509_ext_export_proxy
+FUNCS += functions/gnutls_x509_ext_export_proxy.short
+FUNCS += functions/gnutls_x509_ext_export_subject_alt_names
+FUNCS += functions/gnutls_x509_ext_export_subject_alt_names.short
+FUNCS += functions/gnutls_x509_ext_export_subject_key_id
+FUNCS += functions/gnutls_x509_ext_export_subject_key_id.short
+FUNCS += functions/gnutls_x509_ext_import_aia
+FUNCS += functions/gnutls_x509_ext_import_aia.short
+FUNCS += functions/gnutls_x509_ext_import_authority_key_id
+FUNCS += functions/gnutls_x509_ext_import_authority_key_id.short
+FUNCS += functions/gnutls_x509_ext_import_basic_constraints
+FUNCS += functions/gnutls_x509_ext_import_basic_constraints.short
+FUNCS += functions/gnutls_x509_ext_import_crl_dist_points
+FUNCS += functions/gnutls_x509_ext_import_crl_dist_points.short
+FUNCS += functions/gnutls_x509_ext_import_key_purposes
+FUNCS += functions/gnutls_x509_ext_import_key_purposes.short
+FUNCS += functions/gnutls_x509_ext_import_key_usage
+FUNCS += functions/gnutls_x509_ext_import_key_usage.short
+FUNCS += functions/gnutls_x509_ext_import_name_constraints
+FUNCS += functions/gnutls_x509_ext_import_name_constraints.short
+FUNCS += functions/gnutls_x509_ext_import_policies
+FUNCS += functions/gnutls_x509_ext_import_policies.short
+FUNCS += functions/gnutls_x509_ext_import_private_key_usage_period
+FUNCS += functions/gnutls_x509_ext_import_private_key_usage_period.short
+FUNCS += functions/gnutls_x509_ext_import_proxy
+FUNCS += functions/gnutls_x509_ext_import_proxy.short
+FUNCS += functions/gnutls_x509_ext_import_subject_alt_names
+FUNCS += functions/gnutls_x509_ext_import_subject_alt_names.short
+FUNCS += functions/gnutls_x509_ext_import_subject_key_id
+FUNCS += functions/gnutls_x509_ext_import_subject_key_id.short
FUNCS += functions/gnutls_x509_key_purpose_deinit
FUNCS += functions/gnutls_x509_key_purpose_deinit.short
FUNCS += functions/gnutls_x509_key_purpose_get
diff --git a/doc/cha-cert-auth.texi b/doc/cha-cert-auth.texi
index 2bbc8b6614..fcd089cb88 100644
--- a/doc/cha-cert-auth.texi
+++ b/doc/cha-cert-auth.texi
@@ -214,12 +214,12 @@ Complex extensions may require initializing an intermediate structure that holds
parsed extension data.
Examples of simple parsing functions are shown below.
-@showfuncD{gnutls_x509_ext_get_basic_constraints,gnutls_x509_ext_set_basic_constraints,gnutls_x509_ext_get_key_usage,gnutls_x509_ext_set_key_usage}
+@showfuncD{gnutls_x509_ext_import_basic_constraints,gnutls_x509_ext_export_basic_constraints,gnutls_x509_ext_import_key_usage,gnutls_x509_ext_export_key_usage}
More complex extensions, such as Name Constraints, require an intermediate structure, in that
case @code{gnutls_x509_name_constraints_t} to be initialized in order to store the parsed
extension data.
-@showfuncB{gnutls_x509_ext_get_name_constraints,gnutls_x509_ext_set_name_constraints}
+@showfuncB{gnutls_x509_ext_import_name_constraints,gnutls_x509_ext_export_name_constraints}
After the name constraints are extracted in the structure, the following functions
can be used to access them.
diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am
index e233007867..9175543096 100644
--- a/doc/manpages/Makefile.am
+++ b/doc/manpages/Makefile.am
@@ -945,30 +945,30 @@ APIMANS += gnutls_x509_dn_import.3
APIMANS += gnutls_x509_dn_init.3
APIMANS += gnutls_x509_dn_oid_known.3
APIMANS += gnutls_x509_dn_oid_name.3
-APIMANS += gnutls_x509_ext_get_aia.3
-APIMANS += gnutls_x509_ext_get_authority_key_id.3
-APIMANS += gnutls_x509_ext_get_basic_constraints.3
-APIMANS += gnutls_x509_ext_get_crl_dist_points.3
-APIMANS += gnutls_x509_ext_get_key_purposes.3
-APIMANS += gnutls_x509_ext_get_key_usage.3
-APIMANS += gnutls_x509_ext_get_name_constraints.3
-APIMANS += gnutls_x509_ext_get_policies.3
-APIMANS += gnutls_x509_ext_get_private_key_usage_period.3
-APIMANS += gnutls_x509_ext_get_proxy.3
-APIMANS += gnutls_x509_ext_get_subject_alt_names.3
-APIMANS += gnutls_x509_ext_get_subject_key_id.3
-APIMANS += gnutls_x509_ext_set_aia.3
-APIMANS += gnutls_x509_ext_set_authority_key_id.3
-APIMANS += gnutls_x509_ext_set_basic_constraints.3
-APIMANS += gnutls_x509_ext_set_crl_dist_points.3
-APIMANS += gnutls_x509_ext_set_key_purposes.3
-APIMANS += gnutls_x509_ext_set_key_usage.3
-APIMANS += gnutls_x509_ext_set_name_constraints.3
-APIMANS += gnutls_x509_ext_set_policies.3
-APIMANS += gnutls_x509_ext_set_private_key_usage_period.3
-APIMANS += gnutls_x509_ext_set_proxy.3
-APIMANS += gnutls_x509_ext_set_subject_alt_names.3
-APIMANS += gnutls_x509_ext_set_subject_key_id.3
+APIMANS += gnutls_x509_ext_export_aia.3
+APIMANS += gnutls_x509_ext_export_authority_key_id.3
+APIMANS += gnutls_x509_ext_export_basic_constraints.3
+APIMANS += gnutls_x509_ext_export_crl_dist_points.3
+APIMANS += gnutls_x509_ext_export_key_purposes.3
+APIMANS += gnutls_x509_ext_export_key_usage.3
+APIMANS += gnutls_x509_ext_export_name_constraints.3
+APIMANS += gnutls_x509_ext_export_policies.3
+APIMANS += gnutls_x509_ext_export_private_key_usage_period.3
+APIMANS += gnutls_x509_ext_export_proxy.3
+APIMANS += gnutls_x509_ext_export_subject_alt_names.3
+APIMANS += gnutls_x509_ext_export_subject_key_id.3
+APIMANS += gnutls_x509_ext_import_aia.3
+APIMANS += gnutls_x509_ext_import_authority_key_id.3
+APIMANS += gnutls_x509_ext_import_basic_constraints.3
+APIMANS += gnutls_x509_ext_import_crl_dist_points.3
+APIMANS += gnutls_x509_ext_import_key_purposes.3
+APIMANS += gnutls_x509_ext_import_key_usage.3
+APIMANS += gnutls_x509_ext_import_name_constraints.3
+APIMANS += gnutls_x509_ext_import_policies.3
+APIMANS += gnutls_x509_ext_import_private_key_usage_period.3
+APIMANS += gnutls_x509_ext_import_proxy.3
+APIMANS += gnutls_x509_ext_import_subject_alt_names.3
+APIMANS += gnutls_x509_ext_import_subject_key_id.3
APIMANS += gnutls_x509_key_purpose_deinit.3
APIMANS += gnutls_x509_key_purpose_get.3
APIMANS += gnutls_x509_key_purpose_init.3
diff --git a/lib/includes/gnutls/x509-ext.h b/lib/includes/gnutls/x509-ext.h
index f1d997ccbf..54759c5d6b 100644
--- a/lib/includes/gnutls/x509-ext.h
+++ b/lib/includes/gnutls/x509-ext.h
@@ -47,15 +47,15 @@ int gnutls_subject_alt_names_set(gnutls_subject_alt_names_t sans,
const char* othername_oid);
-int gnutls_x509_ext_get_subject_alt_names(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_subject_alt_names(const gnutls_datum_t * ext,
gnutls_subject_alt_names_t,
unsigned int flags);
-int gnutls_x509_ext_set_subject_alt_names(gnutls_subject_alt_names_t,
+int gnutls_x509_ext_export_subject_alt_names(gnutls_subject_alt_names_t,
gnutls_datum_t * ext);
/* They are exactly the same */
-#define gnutls_x509_ext_get_issuer_alt_name gnutls_x509_ext_get_subject_alt_name
-#define gnutls_x509_ext_set_issuer_alt_name gnutls_x509_ext_set_subject_alt_name
+#define gnutls_x509_ext_import_issuer_alt_name gnutls_x509_ext_import_subject_alt_name
+#define gnutls_x509_ext_export_issuer_alt_name gnutls_x509_ext_export_subject_alt_name
typedef struct gnutls_x509_crl_dist_points_st *gnutls_x509_crl_dist_points_t;
@@ -68,16 +68,16 @@ int gnutls_x509_crl_dist_points_set(gnutls_x509_crl_dist_points_t,
gnutls_x509_subject_alt_name_t type,
const gnutls_datum_t *dist, unsigned int reason_flags);
-int gnutls_x509_ext_get_crl_dist_points(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
gnutls_x509_crl_dist_points_t dp,
unsigned int flags);
-int gnutls_x509_ext_set_crl_dist_points(gnutls_x509_crl_dist_points_t dp,
+int gnutls_x509_ext_export_crl_dist_points(gnutls_x509_crl_dist_points_t dp,
gnutls_datum_t * ext);
-int gnutls_x509_ext_get_name_constraints(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_name_constraints(const gnutls_datum_t * ext,
gnutls_x509_name_constraints_t nc,
unsigned int flags);
-int gnutls_x509_ext_set_name_constraints(gnutls_x509_name_constraints_t nc,
+int gnutls_x509_ext_export_name_constraints(gnutls_x509_name_constraints_t nc,
gnutls_datum_t * ext);
typedef struct gnutls_x509_aia_st *gnutls_x509_aia_t;
@@ -93,22 +93,22 @@ int gnutls_x509_aia_set(gnutls_x509_aia_t aia,
unsigned san_type,
const gnutls_datum_t * san);
-int gnutls_x509_ext_get_aia(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_aia(const gnutls_datum_t * ext,
gnutls_x509_aia_t,
unsigned int flags);
-int gnutls_x509_ext_set_aia(gnutls_x509_aia_t aia,
+int gnutls_x509_ext_export_aia(gnutls_x509_aia_t aia,
gnutls_datum_t * ext);
-int gnutls_x509_ext_get_subject_key_id(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_subject_key_id(const gnutls_datum_t * ext,
gnutls_datum_t * id);
-int gnutls_x509_ext_set_subject_key_id(const gnutls_datum_t * id,
+int gnutls_x509_ext_export_subject_key_id(const gnutls_datum_t * id,
gnutls_datum_t * ext);
typedef struct gnutls_x509_aki_st *gnutls_x509_aki_t;
-int gnutls_x509_ext_set_authority_key_id(gnutls_x509_aki_t,
+int gnutls_x509_ext_export_authority_key_id(gnutls_x509_aki_t,
gnutls_datum_t * ext);
-int gnutls_x509_ext_get_authority_key_id(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_authority_key_id(const gnutls_datum_t * ext,
gnutls_x509_aki_t,
unsigned int flags);
@@ -126,16 +126,16 @@ int gnutls_x509_aki_set_cert_issuer(gnutls_x509_aki_t aki,
const gnutls_datum_t * serial);
void gnutls_x509_aki_deinit(gnutls_x509_aki_t);
-int gnutls_x509_ext_get_private_key_usage_period(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_private_key_usage_period(const gnutls_datum_t * ext,
time_t * activation,
time_t * expiration);
-int gnutls_x509_ext_set_private_key_usage_period(time_t activation,
+int gnutls_x509_ext_export_private_key_usage_period(time_t activation,
time_t expiration,
gnutls_datum_t * ext);
-int gnutls_x509_ext_get_basic_constraints(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_basic_constraints(const gnutls_datum_t * ext,
unsigned int *ca, int *pathlen);
-int gnutls_x509_ext_set_basic_constraints(unsigned int ca, int pathlen,
+int gnutls_x509_ext_export_basic_constraints(unsigned int ca, int pathlen,
gnutls_datum_t * ext);
typedef struct gnutls_x509_key_purposes_st *gnutls_x509_key_purposes_t;
@@ -145,22 +145,22 @@ void gnutls_x509_key_purpose_deinit(gnutls_x509_key_purposes_t p);
int gnutls_x509_key_purpose_set(gnutls_x509_key_purposes_t p, const char *oid);
int gnutls_x509_key_purpose_get(gnutls_x509_key_purposes_t p, unsigned idx, gnutls_datum_t *oid);
-int gnutls_x509_ext_get_key_purposes(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_key_purposes(const gnutls_datum_t * ext,
gnutls_x509_key_purposes_t,
unsigned int flags);
-int gnutls_x509_ext_set_key_purposes(gnutls_x509_key_purposes_t,
+int gnutls_x509_ext_export_key_purposes(gnutls_x509_key_purposes_t,
gnutls_datum_t * ext);
-int gnutls_x509_ext_get_key_usage(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_key_usage(const gnutls_datum_t * ext,
unsigned int *key_usage);
-int gnutls_x509_ext_set_key_usage(unsigned int key_usage,
+int gnutls_x509_ext_export_key_usage(unsigned int key_usage,
gnutls_datum_t * ext);
-int gnutls_x509_ext_get_proxy(const gnutls_datum_t * ext, int *pathlen,
+int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen,
char **policyLanguage, char **policy,
size_t * sizeof_policy);
-int gnutls_x509_ext_set_proxy(int pathLenConstraint, const char *policyLanguage,
+int gnutls_x509_ext_export_proxy(int pathLenConstraint, const char *policyLanguage,
const char *policy, size_t sizeof_policy,
gnutls_datum_t * ext);
@@ -174,10 +174,10 @@ int gnutls_x509_policies_get(gnutls_x509_policies_t policies, unsigned int seq,
int gnutls_x509_policies_set(gnutls_x509_policies_t policies,
const struct gnutls_x509_policy_st *policy);
-int gnutls_x509_ext_get_policies(const gnutls_datum_t * ext, gnutls_x509_policies_t
+int gnutls_x509_ext_import_policies(const gnutls_datum_t * ext, gnutls_x509_policies_t
policies,
unsigned int flags);
-int gnutls_x509_ext_set_policies(gnutls_x509_policies_t policies,
+int gnutls_x509_ext_export_policies(gnutls_x509_policies_t policies,
gnutls_datum_t * ext);
diff --git a/lib/libgnutls.map b/lib/libgnutls.map
index 192be4221e..2b99150e01 100644
--- a/lib/libgnutls.map
+++ b/lib/libgnutls.map
@@ -961,53 +961,53 @@ GNUTLS_3_1_0 {
gnutls_subject_alt_names_deinit;
gnutls_subject_alt_names_get;
gnutls_subject_alt_names_set;
- gnutls_x509_ext_get_subject_alt_names;
- gnutls_x509_ext_set_subject_alt_names;
+ gnutls_x509_ext_import_subject_alt_names;
+ gnutls_x509_ext_export_subject_alt_names;
gnutls_x509_crl_dist_points_init;
gnutls_x509_crl_dist_points_deinit;
gnutls_x509_crl_dist_points_get;
gnutls_x509_crl_dist_points_set;
- gnutls_x509_ext_get_crl_dist_points;
- gnutls_x509_ext_set_crl_dist_points;
- gnutls_x509_ext_get_name_constraints;
- gnutls_x509_ext_set_name_constraints;
+ gnutls_x509_ext_import_crl_dist_points;
+ gnutls_x509_ext_export_crl_dist_points;
+ gnutls_x509_ext_import_name_constraints;
+ gnutls_x509_ext_export_name_constraints;
gnutls_x509_aia_init;
gnutls_x509_aia_deinit;
gnutls_x509_aia_get;
gnutls_x509_aia_set;
- gnutls_x509_ext_get_aia;
- gnutls_x509_ext_set_aia;
- gnutls_x509_ext_get_subject_key_id;
- gnutls_x509_ext_set_subject_key_id;
- gnutls_x509_ext_set_authority_key_id;
- gnutls_x509_ext_get_authority_key_id;
+ gnutls_x509_ext_import_aia;
+ gnutls_x509_ext_export_aia;
+ gnutls_x509_ext_import_subject_key_id;
+ gnutls_x509_ext_export_subject_key_id;
+ gnutls_x509_ext_export_authority_key_id;
+ gnutls_x509_ext_import_authority_key_id;
gnutls_x509_aki_init;
gnutls_x509_aki_get_id;
gnutls_x509_aki_get_cert_issuer;
gnutls_x509_aki_set_id;
gnutls_x509_aki_set_cert_issuer;
gnutls_x509_aki_deinit;
- gnutls_x509_ext_get_private_key_usage_period;
- gnutls_x509_ext_set_private_key_usage_period;
- gnutls_x509_ext_get_basic_constraints;
- gnutls_x509_ext_set_basic_constraints;
- gnutls_x509_ext_get_key_usage;
- gnutls_x509_ext_set_key_usage;
- gnutls_x509_ext_get_proxy;
- gnutls_x509_ext_set_proxy;
+ gnutls_x509_ext_import_private_key_usage_period;
+ gnutls_x509_ext_export_private_key_usage_period;
+ gnutls_x509_ext_import_basic_constraints;
+ gnutls_x509_ext_export_basic_constraints;
+ gnutls_x509_ext_import_key_usage;
+ gnutls_x509_ext_export_key_usage;
+ gnutls_x509_ext_import_proxy;
+ gnutls_x509_ext_export_proxy;
gnutls_x509_policies_init;
gnutls_x509_policies_deinit;
gnutls_x509_policies_get;
gnutls_x509_policies_set;
- gnutls_x509_ext_get_policies;
- gnutls_x509_ext_set_policies;
+ gnutls_x509_ext_import_policies;
+ gnutls_x509_ext_export_policies;
gnutls_x509_crt_set_issuer_alt_name;
gnutls_x509_key_purpose_init;
gnutls_x509_key_purpose_deinit;
gnutls_x509_key_purpose_set;
gnutls_x509_key_purpose_get;
- gnutls_x509_ext_get_key_purposes;
- gnutls_x509_ext_set_key_purposes;
+ gnutls_x509_ext_import_key_purposes;
+ gnutls_x509_ext_export_key_purposes;
} GNUTLS_3_0_0;
GNUTLS_PRIVATE {
diff --git a/lib/x509/crq.c b/lib/x509/crq.c
index c3cba0c7cc..b73c6bf694 100644
--- a/lib/x509/crq.c
+++ b/lib/x509/crq.c
@@ -1641,7 +1641,7 @@ gnutls_x509_crq_get_key_usage(gnutls_x509_crq_t crq,
bd.data = buf;
bd.size = buf_size;
- result = gnutls_x509_ext_get_key_usage(&bd, key_usage);
+ result = gnutls_x509_ext_import_key_usage(&bd, key_usage);
if (result < 0) {
gnutls_assert();
return result;
@@ -1698,7 +1698,7 @@ gnutls_x509_crq_get_basic_constraints(gnutls_x509_crq_t crq,
bd.data = buf;
bd.size = buf_size;
- result = gnutls_x509_ext_get_basic_constraints(&bd, &tmp_ca, pathlen);
+ result = gnutls_x509_ext_import_basic_constraints(&bd, &tmp_ca, pathlen);
if (ca)
*ca = tmp_ca;
@@ -2069,7 +2069,7 @@ gnutls_x509_crq_set_basic_constraints(gnutls_x509_crq_t crq,
/* generate the extension.
*/
- result = gnutls_x509_ext_set_basic_constraints(ca, pathLenConstraint, &der_data);
+ result = gnutls_x509_ext_export_basic_constraints(ca, pathLenConstraint, &der_data);
if (result < 0) {
gnutls_assert();
return result;
@@ -2114,7 +2114,7 @@ gnutls_x509_crq_set_key_usage(gnutls_x509_crq_t crq, unsigned int usage)
/* generate the extension.
*/
result =
- gnutls_x509_ext_set_key_usage(usage, &der_data);
+ gnutls_x509_ext_export_key_usage(usage, &der_data);
if (result < 0) {
gnutls_assert();
return result;
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index f9a521e0d4..43dc25714b 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -790,7 +790,7 @@ _gnutls_x509_ext_gen_subject_alt_name(gnutls_x509_subject_alt_name_t
if (prev_der_ext && prev_der_ext->data != NULL &&
prev_der_ext->size != 0) {
- ret = gnutls_x509_ext_get_subject_alt_names(prev_der_ext, sans, 0);
+ ret = gnutls_x509_ext_import_subject_alt_names(prev_der_ext, sans, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -805,7 +805,7 @@ _gnutls_x509_ext_gen_subject_alt_name(gnutls_x509_subject_alt_name_t
goto cleanup;
}
- ret = gnutls_x509_ext_set_subject_alt_names(sans, der_ext);
+ ret = gnutls_x509_ext_export_subject_alt_names(sans, der_ext);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -841,7 +841,7 @@ _gnutls_x509_ext_gen_auth_key_id(const void *id, size_t id_size,
goto cleanup;
}
- ret = gnutls_x509_ext_set_authority_key_id(aki, der_ext);
+ ret = gnutls_x509_ext_export_authority_key_id(aki, der_ext);
if (ret < 0) {
gnutls_assert();
goto cleanup;
diff --git a/lib/x509/name_constraints.c b/lib/x509/name_constraints.c
index 1f006361b3..cd7341cd0d 100644
--- a/lib/x509/name_constraints.c
+++ b/lib/x509/name_constraints.c
@@ -157,7 +157,7 @@ int gnutls_x509_crt_get_name_constraints(gnutls_x509_crt_t crt,
if (der.size == 0 || der.data == NULL)
return gnutls_assert_val(GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE);
- ret = gnutls_x509_ext_get_name_constraints(&der, nc, flags);
+ ret = gnutls_x509_ext_import_name_constraints(&der, nc, flags);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -337,7 +337,7 @@ int gnutls_x509_crt_set_name_constraints(gnutls_x509_crt_t crt,
int ret;
gnutls_datum_t der;
- ret = gnutls_x509_ext_set_name_constraints(nc, &der);
+ ret = gnutls_x509_ext_export_name_constraints(nc, &der);
if (ret < 0)
return gnutls_assert_val(ret);
diff --git a/lib/x509/output.c b/lib/x509/output.c
index 46bd03e489..cbfcdef820 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2007-2014 Free Software Foundation, Inc.
*
- * Author: Simon Josefsson
+ * Author: Simon Josefsson, Nikos Mavrogiannopoulos
*
* This file is part of GnuTLS.
*
@@ -216,7 +216,7 @@ static void print_aia(gnutls_buffer_st * str, const gnutls_datum_t *der)
if (err < 0)
return;
- err = gnutls_x509_ext_get_aia(der, aia, 0);
+ err = gnutls_x509_ext_import_aia(der, aia, 0);
if (err < 0) {
addf(str, "error: get_aia: %s\n",
gnutls_strerror(err));
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index d80b4770f8..8b1f0172a1 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -733,7 +733,7 @@ gnutls_x509_crt_get_private_key_usage_period(gnutls_x509_crt_t cert,
gnutls_assert_val
(GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE);
- ret = gnutls_x509_ext_get_private_key_usage_period(&der, activation, expiration);
+ ret = gnutls_x509_ext_import_private_key_usage_period(&der, activation, expiration);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -824,7 +824,7 @@ gnutls_x509_crt_get_subject_key_id(gnutls_x509_crt_t cert, void *ret,
return result;
}
- result = gnutls_x509_ext_get_subject_key_id(&der, &id);
+ result = gnutls_x509_ext_import_subject_key_id(&der, &id);
if (result < 0) {
gnutls_assert();
goto cleanup;
@@ -913,7 +913,7 @@ gnutls_x509_crt_get_authority_key_gn_serial(gnutls_x509_crt_t cert,
goto cleanup;
}
- ret = gnutls_x509_ext_get_authority_key_id(&der, aki, 0);
+ ret = gnutls_x509_ext_import_authority_key_id(&der, aki, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1000,7 +1000,7 @@ gnutls_x509_crt_get_authority_key_id(gnutls_x509_crt_t cert, void *id,
goto cleanup;
}
- ret = gnutls_x509_ext_get_authority_key_id(&der, aki, 0);
+ ret = gnutls_x509_ext_import_authority_key_id(&der, aki, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1301,7 +1301,7 @@ get_alt_name(gnutls_x509_crt_t cert, const char *extension_id,
goto cleanup;
}
- ret = gnutls_x509_ext_get_subject_alt_names(&dnsname, sans, 0);
+ ret = gnutls_x509_ext_import_subject_alt_names(&dnsname, sans, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1618,7 +1618,7 @@ gnutls_x509_crt_get_basic_constraints(gnutls_x509_crt_t cert,
return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
}
- result = gnutls_x509_ext_get_basic_constraints(&basicConstraints, &tmp_ca, pathlen);
+ result = gnutls_x509_ext_import_basic_constraints(&basicConstraints, &tmp_ca, pathlen);
if (ca)
*ca = tmp_ca;
@@ -1702,7 +1702,7 @@ gnutls_x509_crt_get_key_usage(gnutls_x509_crt_t cert,
return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
}
- result = gnutls_x509_ext_get_key_usage(&keyUsage, key_usage);
+ result = gnutls_x509_ext_import_key_usage(&keyUsage, key_usage);
_gnutls_free_datum(&keyUsage);
if (result < 0) {
@@ -1757,7 +1757,7 @@ gnutls_x509_crt_get_proxy(gnutls_x509_crt_t cert,
return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
}
- result = gnutls_x509_ext_get_proxy(&proxyCertInfo, pathlen,
+ result = gnutls_x509_ext_import_proxy(&proxyCertInfo, pathlen,
policyLanguage,
policy,
sizeof_policy);
@@ -1839,7 +1839,7 @@ gnutls_x509_crt_get_policy(gnutls_x509_crt_t crt, int indx,
goto cleanup;
}
- ret = gnutls_x509_ext_get_policies(&tmpd, policies, 0);
+ ret = gnutls_x509_ext_import_policies(&tmpd, policies, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -2870,7 +2870,7 @@ gnutls_x509_crt_get_crl_dist_points(gnutls_x509_crt_t cert,
goto cleanup;
}
- ret = gnutls_x509_ext_get_crl_dist_points(&dist_points, cdp, 0);
+ ret = gnutls_x509_ext_import_crl_dist_points(&dist_points, cdp, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -2956,7 +2956,7 @@ gnutls_x509_crt_get_key_purpose_oid(gnutls_x509_crt_t cert,
goto cleanup;
}
- ret = gnutls_x509_ext_get_key_purposes(&ext, p, 0);
+ ret = gnutls_x509_ext_import_key_purposes(&ext, p, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -3560,7 +3560,7 @@ legacy_parse_aia(ASN1_TYPE src,
* @critical: pointer to output integer that is set to non-0 if the extension is marked as critical (may be %NULL)
*
* Note that a simpler API to access the authority info data is provided
- * by gnutls_x509_aia_get() and gnutls_x509_ext_get_aia().
+ * by gnutls_x509_aia_get() and gnutls_x509_ext_import_aia().
*
* This function extracts the Authority Information Access (AIA)
* extension, see RFC 5280 section 4.2.2.1 for more information. The
diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
index 70d232f736..ac6567433e 100644
--- a/lib/x509/x509_ext.c
+++ b/lib/x509/x509_ext.c
@@ -203,7 +203,7 @@ int gnutls_subject_alt_names_set(gnutls_subject_alt_names_t sans,
}
/**
- * gnutls_x509_ext_get_subject_alt_names:
+ * gnutls_x509_ext_import_subject_alt_names:
* @ext: The DER-encoded extension data
* @sans: The alternative names structure
* @flags: should be zero
@@ -219,7 +219,7 @@ int gnutls_subject_alt_names_set(gnutls_subject_alt_names_t sans,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_subject_alt_names(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_subject_alt_names(const gnutls_datum_t * ext,
gnutls_subject_alt_names_t sans,
unsigned int flags)
{
@@ -285,7 +285,7 @@ int gnutls_x509_ext_get_subject_alt_names(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_subject_alt_names:
+ * gnutls_x509_ext_export_subject_alt_names:
* @sans: The alternative names structure
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -297,7 +297,7 @@ int gnutls_x509_ext_get_subject_alt_names(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_subject_alt_names(gnutls_subject_alt_names_t sans,
+int gnutls_x509_ext_export_subject_alt_names(gnutls_subject_alt_names_t sans,
gnutls_datum_t * ext)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -340,7 +340,7 @@ int gnutls_x509_ext_set_subject_alt_names(gnutls_subject_alt_names_t sans,
}
/**
- * gnutls_x509_ext_get_name_constraints:
+ * gnutls_x509_ext_import_name_constraints:
* @ext: a DER encoded extension
* @nc: The nameconstraints intermediate structure
* @flags: zero or %GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND
@@ -363,7 +363,7 @@ int gnutls_x509_ext_set_subject_alt_names(gnutls_subject_alt_names_t sans,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_name_constraints(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_name_constraints(const gnutls_datum_t * ext,
gnutls_x509_name_constraints_t nc,
unsigned int flags)
{
@@ -412,7 +412,7 @@ int gnutls_x509_ext_get_name_constraints(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_name_constraints:
+ * gnutls_x509_ext_export_name_constraints:
* @nc: The nameconstraints structure
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -424,7 +424,7 @@ int gnutls_x509_ext_get_name_constraints(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_name_constraints(gnutls_x509_name_constraints_t nc,
+int gnutls_x509_ext_export_name_constraints(gnutls_x509_name_constraints_t nc,
gnutls_datum_t * ext)
{
int ret, result;
@@ -551,7 +551,7 @@ int gnutls_x509_ext_set_name_constraints(gnutls_x509_name_constraints_t nc,
}
/**
- * gnutls_x509_ext_get_subject_key_id:
+ * gnutls_x509_ext_import_subject_key_id:
* @ext: a DER encoded extension
* @id: will contain the subject key ID
*
@@ -564,7 +564,7 @@ int gnutls_x509_ext_set_name_constraints(gnutls_x509_name_constraints_t nc,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_subject_key_id(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_subject_key_id(const gnutls_datum_t * ext,
gnutls_datum_t * id)
{
int result, ret;
@@ -604,7 +604,7 @@ int gnutls_x509_ext_get_subject_key_id(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_subject_key_id:
+ * gnutls_x509_ext_export_subject_key_id:
* @id: The key identifier
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -617,7 +617,7 @@ int gnutls_x509_ext_get_subject_key_id(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_subject_key_id(const gnutls_datum_t * id,
+int gnutls_x509_ext_export_subject_key_id(const gnutls_datum_t * id,
gnutls_datum_t * ext)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -839,7 +839,7 @@ int gnutls_x509_aki_get_cert_issuer(gnutls_x509_aki_t aki, unsigned int seq,
}
/**
- * gnutls_x509_ext_get_authority_key_id:
+ * gnutls_x509_ext_import_authority_key_id:
* @ext: a DER encoded extension
* @aki: An initialized authority key identifier structure
* @flags: should be zero
@@ -852,7 +852,7 @@ int gnutls_x509_aki_get_cert_issuer(gnutls_x509_aki_t aki, unsigned int seq,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_authority_key_id(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_authority_key_id(const gnutls_datum_t * ext,
gnutls_x509_aki_t aki,
unsigned int flags)
{
@@ -944,7 +944,7 @@ int gnutls_x509_ext_get_authority_key_id(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_authority_key_id:
+ * gnutls_x509_ext_export_authority_key_id:
* @aki: An initialized authority key identifier structure
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -957,7 +957,7 @@ int gnutls_x509_ext_get_authority_key_id(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_authority_key_id(gnutls_x509_aki_t aki,
+int gnutls_x509_ext_export_authority_key_id(gnutls_x509_aki_t aki,
gnutls_datum_t * ext)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -1033,7 +1033,7 @@ int gnutls_x509_ext_set_authority_key_id(gnutls_x509_aki_t aki,
}
/**
- * gnutls_x509_ext_get_key_usage:
+ * gnutls_x509_ext_import_key_usage:
* @ext: the DER encoded extension data
* @key_usage: where the key usage bits will be stored
*
@@ -1052,7 +1052,7 @@ int gnutls_x509_ext_set_authority_key_id(gnutls_x509_aki_t aki,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_key_usage(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_key_usage(const gnutls_datum_t * ext,
unsigned int *key_usage)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -1091,7 +1091,7 @@ int gnutls_x509_ext_get_key_usage(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_key_usage:
+ * gnutls_x509_ext_export_key_usage:
* @usage: an ORed sequence of the GNUTLS_KEY_* elements.
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -1104,7 +1104,7 @@ int gnutls_x509_ext_get_key_usage(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_key_usage(unsigned int usage, gnutls_datum_t * ext)
+int gnutls_x509_ext_export_key_usage(unsigned int usage, gnutls_datum_t * ext)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
int result;
@@ -1139,7 +1139,7 @@ int gnutls_x509_ext_set_key_usage(unsigned int usage, gnutls_datum_t * ext)
}
/**
- * gnutls_x509_ext_get_private_key_usage_period:
+ * gnutls_x509_ext_import_private_key_usage_period:
* @ext: the DER encoded extension data
* @activation: Will hold the activation time
* @expiration: Will hold the expiration time
@@ -1153,7 +1153,7 @@ int gnutls_x509_ext_set_key_usage(unsigned int usage, gnutls_datum_t * ext)
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_private_key_usage_period(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_private_key_usage_period(const gnutls_datum_t * ext,
time_t * activation,
time_t * expiration)
{
@@ -1190,7 +1190,7 @@ int gnutls_x509_ext_get_private_key_usage_period(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_private_key_usage_period:
+ * gnutls_x509_ext_export_private_key_usage_period:
* @activation: The activation time
* @expiration: The expiration time
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
@@ -1206,7 +1206,7 @@ int gnutls_x509_ext_get_private_key_usage_period(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_private_key_usage_period(time_t activation,
+int gnutls_x509_ext_export_private_key_usage_period(time_t activation,
time_t expiration,
gnutls_datum_t * ext)
{
@@ -1247,7 +1247,7 @@ int gnutls_x509_ext_set_private_key_usage_period(time_t activation,
}
/**
- * gnutls_x509_ext_get_basic_constraints:
+ * gnutls_x509_ext_import_basic_constraints:
* @ext: the DER encoded extension data
* @ca: will be non zero if the CA status is true
* @pathlen: the path length constraint; will be set to -1 for no limit
@@ -1260,7 +1260,7 @@ int gnutls_x509_ext_set_private_key_usage_period(time_t activation,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_basic_constraints(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_basic_constraints(const gnutls_datum_t * ext,
unsigned int *ca, int *pathlen)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -1312,7 +1312,7 @@ int gnutls_x509_ext_get_basic_constraints(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_basic_constraints:
+ * gnutls_x509_ext_export_basic_constraints:
* @ca: non-zero for a CA
* @pathlen: The path length constraint (set to -1 for no constraint)
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
@@ -1328,7 +1328,7 @@ int gnutls_x509_ext_get_basic_constraints(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_basic_constraints(unsigned int ca, int pathlen,
+int gnutls_x509_ext_export_basic_constraints(unsigned int ca, int pathlen,
gnutls_datum_t * ext)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -1383,7 +1383,7 @@ int gnutls_x509_ext_set_basic_constraints(unsigned int ca, int pathlen,
}
/**
- * gnutls_x509_ext_get_proxy:
+ * gnutls_x509_ext_import_proxy:
* @ext: the DER encoded extension data
* @pathlen: pointer to output integer indicating path length (may be
* NULL), non-negative error codes indicate a present pCPathLenConstraint
@@ -1400,7 +1400,7 @@ int gnutls_x509_ext_set_basic_constraints(unsigned int ca, int pathlen,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_proxy(const gnutls_datum_t * ext, int *pathlen,
+int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen,
char **policyLanguage, char **policy,
size_t * sizeof_policy)
{
@@ -1475,7 +1475,7 @@ int gnutls_x509_ext_get_proxy(const gnutls_datum_t * ext, int *pathlen,
}
/**
- * gnutls_x509_ext_set_proxy:
+ * gnutls_x509_ext_export_proxy:
* @pathLenConstraint: non-negative error codes indicate maximum length of path,
* and negative error codes indicate that the pathLenConstraints field should
* not be present.
@@ -1494,7 +1494,7 @@ int gnutls_x509_ext_get_proxy(const gnutls_datum_t * ext, int *pathlen,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_proxy(int pathLenConstraint, const char *policyLanguage,
+int gnutls_x509_ext_export_proxy(int pathLenConstraint, const char *policyLanguage,
const char *policy, size_t sizeof_policy,
gnutls_datum_t * ext)
{
@@ -1756,7 +1756,7 @@ int gnutls_x509_policies_set(gnutls_x509_policies_t policies,
}
/**
- * gnutls_x509_ext_get_policies:
+ * gnutls_x509_ext_import_policies:
* @ext: the DER encoded extension data
* @policies: A pointer to an initialized policies structures.
* @flags: should be zero
@@ -1768,7 +1768,7 @@ int gnutls_x509_policies_set(gnutls_x509_policies_t policies,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_policies(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_policies(const gnutls_datum_t * ext,
gnutls_x509_policies_t policies,
unsigned int flags)
{
@@ -1963,7 +1963,7 @@ static int encode_user_notice(const gnutls_datum_t * txt,
}
/**
- * gnutls_x509_ext_set_policies:
+ * gnutls_x509_ext_export_policies:
* @policies: A pointer to an initialized policies structure.
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -1976,7 +1976,7 @@ static int encode_user_notice(const gnutls_datum_t * txt,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_policies(gnutls_x509_policies_t policies,
+int gnutls_x509_ext_export_policies(gnutls_x509_policies_t policies,
gnutls_datum_t * ext)
{
int result;
@@ -2256,7 +2256,7 @@ int gnutls_x509_crl_dist_points_set(gnutls_x509_crl_dist_points_t cdp,
}
/**
- * gnutls_x509_ext_get_crl_dist_points:
+ * gnutls_x509_ext_import_crl_dist_points:
* @ext: the DER encoded extension data
* @cdp: A pointer to an initialized CRL distribution points structure.
* @flags: should be zero
@@ -2268,7 +2268,7 @@ int gnutls_x509_crl_dist_points_set(gnutls_x509_crl_dist_points_t cdp,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_crl_dist_points(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
gnutls_x509_crl_dist_points_t cdp,
unsigned int flags)
{
@@ -2361,7 +2361,7 @@ int gnutls_x509_ext_get_crl_dist_points(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_crl_dist_points:
+ * gnutls_x509_ext_export_crl_dist_points:
* @cdp: A pointer to an initialized CRL distribution points structure.
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -2374,7 +2374,7 @@ int gnutls_x509_ext_get_crl_dist_points(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_crl_dist_points(gnutls_x509_crl_dist_points_t cdp,
+int gnutls_x509_ext_export_crl_dist_points(gnutls_x509_crl_dist_points_t cdp,
gnutls_datum_t * ext)
{
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
@@ -2666,7 +2666,7 @@ static int parse_aia(ASN1_TYPE c2, gnutls_x509_aia_t aia)
}
/**
- * gnutls_x509_ext_get_aia:
+ * gnutls_x509_ext_import_aia:
* @ext: The DER-encoded extension data
* @aia: The authority info access structure
* @flags: should be zero
@@ -2680,7 +2680,7 @@ static int parse_aia(ASN1_TYPE c2, gnutls_x509_aia_t aia)
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_aia(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_aia(const gnutls_datum_t * ext,
gnutls_x509_aia_t aia,
unsigned int flags)
{
@@ -2719,7 +2719,7 @@ int gnutls_x509_ext_get_aia(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_aia:
+ * gnutls_x509_ext_export_aia:
* @aia: The authority info access structure
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -2732,7 +2732,7 @@ int gnutls_x509_ext_get_aia(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_aia(gnutls_x509_aia_t aia,
+int gnutls_x509_ext_export_aia(gnutls_x509_aia_t aia,
gnutls_datum_t * ext)
{
int ret, result;
@@ -2892,7 +2892,7 @@ int gnutls_x509_key_purpose_get(gnutls_x509_key_purposes_t p, unsigned idx, gnut
}
/**
- * gnutls_x509_ext_get_key_purposes:
+ * gnutls_x509_ext_import_key_purposes:
* @ext: The DER-encoded extension data
* @p: The key purposes structure
* @flags: should be zero
@@ -2905,7 +2905,7 @@ int gnutls_x509_key_purpose_get(gnutls_x509_key_purposes_t p, unsigned idx, gnut
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_get_key_purposes(const gnutls_datum_t * ext,
+int gnutls_x509_ext_import_key_purposes(const gnutls_datum_t * ext,
gnutls_x509_key_purposes_t p,
unsigned int flags)
{
@@ -2966,7 +2966,7 @@ int gnutls_x509_ext_get_key_purposes(const gnutls_datum_t * ext,
}
/**
- * gnutls_x509_ext_set_key_purposes:
+ * gnutls_x509_ext_export_key_purposes:
* @p: The key purposes structure
* @ext: The DER-encoded extension data; must be freed using gnutls_free().
*
@@ -2978,7 +2978,7 @@ int gnutls_x509_ext_get_key_purposes(const gnutls_datum_t * ext,
*
* Since: 3.3.0
**/
-int gnutls_x509_ext_set_key_purposes(gnutls_x509_key_purposes_t p,
+int gnutls_x509_ext_export_key_purposes(gnutls_x509_key_purposes_t p,
gnutls_datum_t * ext)
{
int result, ret;
diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c
index 4caaca673a..c6a43bc628 100644
--- a/lib/x509/x509_write.c
+++ b/lib/x509/x509_write.c
@@ -442,7 +442,7 @@ gnutls_x509_crt_set_basic_constraints(gnutls_x509_crt_t crt,
/* generate the extension.
*/
- result = gnutls_x509_ext_set_basic_constraints(ca, pathLenConstraint, &der_data);
+ result = gnutls_x509_ext_export_basic_constraints(ca, pathLenConstraint, &der_data);
if (result < 0) {
gnutls_assert();
return result;
@@ -504,7 +504,7 @@ gnutls_x509_crt_set_key_usage(gnutls_x509_crt_t crt, unsigned int usage)
/* generate the extension.
*/
result =
- gnutls_x509_ext_set_key_usage(usage, &der_data);
+ gnutls_x509_ext_export_key_usage(usage, &der_data);
if (result < 0) {
gnutls_assert();
return result;
@@ -770,7 +770,7 @@ gnutls_x509_crt_set_proxy(gnutls_x509_crt_t crt,
/* generate the extension.
*/
- result = gnutls_x509_ext_set_proxy(pathLenConstraint,
+ result = gnutls_x509_ext_export_proxy(pathLenConstraint,
policyLanguage,
policy, sizeof_policy,
&der_data);
@@ -818,7 +818,7 @@ gnutls_x509_crt_set_private_key_usage_period(gnutls_x509_crt_t crt,
return GNUTLS_E_INVALID_REQUEST;
}
- result = gnutls_x509_ext_set_private_key_usage_period(activation,
+ result = gnutls_x509_ext_export_private_key_usage_period(activation,
expiration, &der_data);
if (result < 0) {
gnutls_assert();
@@ -1091,7 +1091,7 @@ gnutls_x509_crt_set_crl_dist_points2(gnutls_x509_crt_t crt,
&critical);
if (ret >= 0 && old_der.data != NULL) {
- ret = gnutls_x509_ext_get_crl_dist_points(&old_der, cdp, 0);
+ ret = gnutls_x509_ext_import_crl_dist_points(&old_der, cdp, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1109,7 +1109,7 @@ gnutls_x509_crt_set_crl_dist_points2(gnutls_x509_crt_t crt,
/* generate the extension.
*/
ret =
- gnutls_x509_ext_set_crl_dist_points(cdp, &der_data);
+ gnutls_x509_ext_export_crl_dist_points(cdp, &der_data);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1229,7 +1229,7 @@ gnutls_x509_crt_set_subject_key_id(gnutls_x509_crt_t cert,
d_id.data = (void*)id;
d_id.size = id_size;
- result = gnutls_x509_ext_set_subject_key_id(&d_id, &der_data);
+ result = gnutls_x509_ext_export_subject_key_id(&d_id, &der_data);
if (result < 0) {
gnutls_assert();
return result;
@@ -1353,7 +1353,7 @@ gnutls_x509_crt_set_key_purpose_oid(gnutls_x509_crt_t cert,
NULL);
if (ret >= 0) {
- ret = gnutls_x509_ext_get_key_purposes(&old_id, p, 0);
+ ret = gnutls_x509_ext_import_key_purposes(&old_id, p, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1366,7 +1366,7 @@ gnutls_x509_crt_set_key_purpose_oid(gnutls_x509_crt_t cert,
goto cleanup;
}
- ret = gnutls_x509_ext_set_key_purposes(p, &der);
+ ret = gnutls_x509_ext_export_key_purposes(p, &der);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1481,7 +1481,7 @@ gnutls_x509_crt_set_authority_info_access(gnutls_x509_crt_t crt,
ret = _gnutls_x509_crt_get_extension(crt, GNUTLS_OID_AIA, 0, &der,
&c);
if (ret >= 0) { /* decode it */
- ret = gnutls_x509_ext_get_aia(&der, aia_ctx, 0);
+ ret = gnutls_x509_ext_import_aia(&der, aia_ctx, 0);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1500,7 +1500,7 @@ gnutls_x509_crt_set_authority_info_access(gnutls_x509_crt_t crt,
goto cleanup;
}
- ret = gnutls_x509_ext_set_aia(aia_ctx, &new_der);
+ ret = gnutls_x509_ext_export_aia(aia_ctx, &new_der);
if (ret < 0) {
gnutls_assert();
goto cleanup;
@@ -1572,7 +1572,7 @@ gnutls_x509_crt_set_policy(gnutls_x509_crt_t crt,
if (ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
- ret = gnutls_x509_ext_get_policies(&prev_der_data,
+ ret = gnutls_x509_ext_import_policies(&prev_der_data,
policies, 0);
if (ret < 0) {
gnutls_assert();
@@ -1586,7 +1586,7 @@ gnutls_x509_crt_set_policy(gnutls_x509_crt_t crt,
goto cleanup;
}
- ret = gnutls_x509_ext_set_policies(policies, &der_data);
+ ret = gnutls_x509_ext_export_policies(policies, &der_data);
if (ret < 0) {
gnutls_assert();
goto cleanup;
diff --git a/symbols.last b/symbols.last
index 284bf9b62f..bd9a37754b 100644
--- a/symbols.last
+++ b/symbols.last
@@ -908,30 +908,30 @@ gnutls_x509_dn_import@GNUTLS_1_4
gnutls_x509_dn_init@GNUTLS_1_4
gnutls_x509_dn_oid_known@GNUTLS_1_4
gnutls_x509_dn_oid_name@GNUTLS_3_0_0
-gnutls_x509_ext_get_aia@GNUTLS_3_1_0
-gnutls_x509_ext_get_authority_key_id@GNUTLS_3_1_0
-gnutls_x509_ext_get_basic_constraints@GNUTLS_3_1_0
-gnutls_x509_ext_get_crl_dist_points@GNUTLS_3_1_0
-gnutls_x509_ext_get_key_purposes@GNUTLS_3_1_0
-gnutls_x509_ext_get_key_usage@GNUTLS_3_1_0
-gnutls_x509_ext_get_name_constraints@GNUTLS_3_1_0
-gnutls_x509_ext_get_policies@GNUTLS_3_1_0
-gnutls_x509_ext_get_private_key_usage_period@GNUTLS_3_1_0
-gnutls_x509_ext_get_proxy@GNUTLS_3_1_0
-gnutls_x509_ext_get_subject_alt_names@GNUTLS_3_1_0
-gnutls_x509_ext_get_subject_key_id@GNUTLS_3_1_0
-gnutls_x509_ext_set_aia@GNUTLS_3_1_0
-gnutls_x509_ext_set_authority_key_id@GNUTLS_3_1_0
-gnutls_x509_ext_set_basic_constraints@GNUTLS_3_1_0
-gnutls_x509_ext_set_crl_dist_points@GNUTLS_3_1_0
-gnutls_x509_ext_set_key_purposes@GNUTLS_3_1_0
-gnutls_x509_ext_set_key_usage@GNUTLS_3_1_0
-gnutls_x509_ext_set_name_constraints@GNUTLS_3_1_0
-gnutls_x509_ext_set_policies@GNUTLS_3_1_0
-gnutls_x509_ext_set_private_key_usage_period@GNUTLS_3_1_0
-gnutls_x509_ext_set_proxy@GNUTLS_3_1_0
-gnutls_x509_ext_set_subject_alt_names@GNUTLS_3_1_0
-gnutls_x509_ext_set_subject_key_id@GNUTLS_3_1_0
+gnutls_x509_ext_export_aia@GNUTLS_3_1_0
+gnutls_x509_ext_export_authority_key_id@GNUTLS_3_1_0
+gnutls_x509_ext_export_basic_constraints@GNUTLS_3_1_0
+gnutls_x509_ext_export_crl_dist_points@GNUTLS_3_1_0
+gnutls_x509_ext_export_key_purposes@GNUTLS_3_1_0
+gnutls_x509_ext_export_key_usage@GNUTLS_3_1_0
+gnutls_x509_ext_export_name_constraints@GNUTLS_3_1_0
+gnutls_x509_ext_export_policies@GNUTLS_3_1_0
+gnutls_x509_ext_export_private_key_usage_period@GNUTLS_3_1_0
+gnutls_x509_ext_export_proxy@GNUTLS_3_1_0
+gnutls_x509_ext_export_subject_alt_names@GNUTLS_3_1_0
+gnutls_x509_ext_export_subject_key_id@GNUTLS_3_1_0
+gnutls_x509_ext_import_aia@GNUTLS_3_1_0
+gnutls_x509_ext_import_authority_key_id@GNUTLS_3_1_0
+gnutls_x509_ext_import_basic_constraints@GNUTLS_3_1_0
+gnutls_x509_ext_import_crl_dist_points@GNUTLS_3_1_0
+gnutls_x509_ext_import_key_purposes@GNUTLS_3_1_0
+gnutls_x509_ext_import_key_usage@GNUTLS_3_1_0
+gnutls_x509_ext_import_name_constraints@GNUTLS_3_1_0
+gnutls_x509_ext_import_policies@GNUTLS_3_1_0
+gnutls_x509_ext_import_private_key_usage_period@GNUTLS_3_1_0
+gnutls_x509_ext_import_proxy@GNUTLS_3_1_0
+gnutls_x509_ext_import_subject_alt_names@GNUTLS_3_1_0
+gnutls_x509_ext_import_subject_key_id@GNUTLS_3_1_0
gnutls_x509_key_purpose_deinit@GNUTLS_3_1_0
gnutls_x509_key_purpose_get@GNUTLS_3_1_0
gnutls_x509_key_purpose_init@GNUTLS_3_1_0