|
Packit Service |
4684c1 |
/*
|
|
Packit Service |
4684c1 |
* Copyright (C) 2014 Free Software Foundation, Inc.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* Author: Nikos Mavrogiannopoulos
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This file is part of GnuTLS.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* The GnuTLS is free software; you can redistribute it and/or
|
|
Packit Service |
4684c1 |
* modify it under the terms of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* as published by the Free Software Foundation; either version 2.1 of
|
|
Packit Service |
4684c1 |
* the License, or (at your option) any later version.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This library is distributed in the hope that it will be useful, but
|
|
Packit Service |
4684c1 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
4684c1 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
4684c1 |
* Lesser General Public License for more details.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* Prototypes for direct handling of extension data */
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#ifndef GNUTLS_X509_EXT_H
|
|
Packit Service |
4684c1 |
#define GNUTLS_X509_EXT_H
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#include <gnutls/gnutls.h>
|
|
Packit Service |
4684c1 |
#include <gnutls/x509.h>
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* *INDENT-OFF* */
|
|
Packit Service |
4684c1 |
#ifdef __cplusplus
|
|
Packit Service |
4684c1 |
extern "C" {
|
|
Packit Service |
4684c1 |
#endif
|
|
Packit Service |
4684c1 |
/* *INDENT-ON* */
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
typedef struct gnutls_subject_alt_names_st *gnutls_subject_alt_names_t;
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_subject_alt_names_init(gnutls_subject_alt_names_t *);
|
|
Packit Service |
4684c1 |
void gnutls_subject_alt_names_deinit(gnutls_subject_alt_names_t sans);
|
|
Packit Service |
4684c1 |
int gnutls_subject_alt_names_get(gnutls_subject_alt_names_t sans, unsigned int seq,
|
|
Packit Service |
4684c1 |
unsigned int *san_type, gnutls_datum_t * san,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * othername_oid);
|
|
Packit Service |
4684c1 |
int gnutls_subject_alt_names_set(gnutls_subject_alt_names_t sans,
|
|
Packit Service |
4684c1 |
unsigned int san_type,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t * san,
|
|
Packit Service |
4684c1 |
const char* othername_oid);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_subject_alt_names(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_subject_alt_names_t,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_subject_alt_names(gnutls_subject_alt_names_t,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* They are exactly the same */
|
|
Packit Service |
4684c1 |
#define gnutls_x509_ext_import_issuer_alt_name gnutls_x509_ext_import_subject_alt_name
|
|
Packit Service |
4684c1 |
#define gnutls_x509_ext_export_issuer_alt_name gnutls_x509_ext_export_subject_alt_name
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
typedef struct gnutls_x509_crl_dist_points_st *gnutls_x509_crl_dist_points_t;
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_crl_dist_points_init(gnutls_x509_crl_dist_points_t *);
|
|
Packit Service |
4684c1 |
void gnutls_x509_crl_dist_points_deinit(gnutls_x509_crl_dist_points_t);
|
|
Packit Service |
4684c1 |
int gnutls_x509_crl_dist_points_get(gnutls_x509_crl_dist_points_t, unsigned int seq,
|
|
Packit Service |
4684c1 |
unsigned int *type,
|
|
Packit Service |
4684c1 |
gnutls_datum_t *dist, unsigned int *reason_flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_crl_dist_points_set(gnutls_x509_crl_dist_points_t,
|
|
Packit Service |
4684c1 |
gnutls_x509_subject_alt_name_t type,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t *dist, unsigned int reason_flags);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_x509_crl_dist_points_t dp,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_crl_dist_points(gnutls_x509_crl_dist_points_t dp,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_name_constraints(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_x509_name_constraints_t nc,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_name_constraints(gnutls_x509_name_constraints_t nc,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
typedef struct gnutls_x509_aia_st *gnutls_x509_aia_t;
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_aia_init(gnutls_x509_aia_t *);
|
|
Packit Service |
4684c1 |
void gnutls_x509_aia_deinit(gnutls_x509_aia_t);
|
|
Packit Service |
4684c1 |
int gnutls_x509_aia_get(gnutls_x509_aia_t aia, unsigned int seq,
|
|
Packit Service |
4684c1 |
gnutls_datum_t *oid,
|
|
Packit Service |
4684c1 |
unsigned *san_type,
|
|
Packit Service |
4684c1 |
gnutls_datum_t *san);
|
|
Packit Service |
4684c1 |
int gnutls_x509_aia_set(gnutls_x509_aia_t aia,
|
|
Packit Service |
4684c1 |
const char *oid,
|
|
Packit Service |
4684c1 |
unsigned san_type,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t * san);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_aia(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_x509_aia_t,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_aia(gnutls_x509_aia_t aia,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_subject_key_id(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * id);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_subject_key_id(const gnutls_datum_t * id,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
typedef struct gnutls_x509_aki_st *gnutls_x509_aki_t;
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_authority_key_id(gnutls_x509_aki_t,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_authority_key_id(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_x509_aki_t,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_othername_to_virtual(const char *oid,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t *othername,
|
|
Packit Service |
4684c1 |
unsigned int *virt_type,
|
|
Packit Service |
4684c1 |
gnutls_datum_t *virt);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_aki_init(gnutls_x509_aki_t *);
|
|
Packit Service |
4684c1 |
int gnutls_x509_aki_get_id(gnutls_x509_aki_t, gnutls_datum_t *id);
|
|
Packit Service |
4684c1 |
int gnutls_x509_aki_get_cert_issuer(gnutls_x509_aki_t aki, unsigned int seq,
|
|
Packit Service |
4684c1 |
unsigned int *san_type, gnutls_datum_t * san,
|
|
Packit Service |
4684c1 |
gnutls_datum_t *othername_oid,
|
|
Packit Service |
4684c1 |
gnutls_datum_t *serial);
|
|
Packit Service |
4684c1 |
int gnutls_x509_aki_set_id(gnutls_x509_aki_t aki, const gnutls_datum_t *id);
|
|
Packit Service |
4684c1 |
int gnutls_x509_aki_set_cert_issuer(gnutls_x509_aki_t aki,
|
|
Packit Service |
4684c1 |
unsigned int san_type,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t * san,
|
|
Packit Service |
4684c1 |
const char *othername_oid,
|
|
Packit Service |
4684c1 |
const gnutls_datum_t * serial);
|
|
Packit Service |
4684c1 |
void gnutls_x509_aki_deinit(gnutls_x509_aki_t);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_private_key_usage_period(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
time_t * activation,
|
|
Packit Service |
4684c1 |
time_t * expiration);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_private_key_usage_period(time_t activation,
|
|
Packit Service |
4684c1 |
time_t expiration,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_basic_constraints(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
unsigned int *ca, int *pathlen);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_basic_constraints(unsigned int ca, int pathlen,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
typedef struct gnutls_x509_key_purposes_st *gnutls_x509_key_purposes_t;
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_key_purpose_init(gnutls_x509_key_purposes_t *p);
|
|
Packit Service |
4684c1 |
void gnutls_x509_key_purpose_deinit(gnutls_x509_key_purposes_t p);
|
|
Packit Service |
4684c1 |
int gnutls_x509_key_purpose_set(gnutls_x509_key_purposes_t p, const char *oid);
|
|
Packit Service |
4684c1 |
int gnutls_x509_key_purpose_get(gnutls_x509_key_purposes_t p, unsigned idx, gnutls_datum_t *oid);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_key_purposes(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_x509_key_purposes_t,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_key_purposes(gnutls_x509_key_purposes_t,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_key_usage(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
unsigned int *key_usage);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_key_usage(unsigned int key_usage,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_inhibit_anypolicy(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
unsigned int *skipcerts);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_inhibit_anypolicy(unsigned int skipcerts,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen,
|
|
Packit Service |
4684c1 |
char **policyLanguage, char **policy,
|
|
Packit Service |
4684c1 |
size_t * sizeof_policy);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_proxy(int pathLenConstraint, const char *policyLanguage,
|
|
Packit Service |
4684c1 |
const char *policy, size_t sizeof_policy,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
typedef struct gnutls_x509_policies_st *gnutls_x509_policies_t;
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_policies_init(gnutls_x509_policies_t *);
|
|
Packit Service |
4684c1 |
void gnutls_x509_policies_deinit(gnutls_x509_policies_t);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_policies_get(gnutls_x509_policies_t policies, unsigned int seq,
|
|
Packit Service |
4684c1 |
struct gnutls_x509_policy_st *policy);
|
|
Packit Service |
4684c1 |
int gnutls_x509_policies_set(gnutls_x509_policies_t policies,
|
|
Packit Service |
4684c1 |
const struct gnutls_x509_policy_st *policy);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_policies(const gnutls_datum_t * ext, gnutls_x509_policies_t
|
|
Packit Service |
4684c1 |
policies,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_policies(gnutls_x509_policies_t policies,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_import_tlsfeatures(const gnutls_datum_t * ext,
|
|
Packit Service |
4684c1 |
gnutls_x509_tlsfeatures_t,
|
|
Packit Service |
4684c1 |
unsigned int flags);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_ext_export_tlsfeatures(gnutls_x509_tlsfeatures_t f,
|
|
Packit Service |
4684c1 |
gnutls_datum_t * ext);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int gnutls_x509_tlsfeatures_add(gnutls_x509_tlsfeatures_t f, unsigned int feature);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
/* *INDENT-OFF* */
|
|
Packit Service |
4684c1 |
#ifdef __cplusplus
|
|
Packit Service |
4684c1 |
}
|
|
Packit Service |
4684c1 |
#endif
|
|
Packit Service |
4684c1 |
/* *INDENT-ON* */
|
|
Packit Service |
4684c1 |
#endif /* GNUTLS_X509_H */
|