X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fx509v3%2Fx509v3.h;h=6473b58e7ea39c95fafda2ea1bf8ef440f271e7e;hb=ea5e7bcf632bba51618ab9407409b24cc4df8fa0;hp=988cdb8d95cb7d5715a184cb34789aa05463fa5e;hpb=6d3724d3b0e0b2dff99feb815d46ef41e65db0d2;p=oweals%2Fopenssl.git diff --git a/crypto/x509v3/x509v3.h b/crypto/x509v3/x509v3.h index 988cdb8d95..6473b58e7e 100644 --- a/crypto/x509v3/x509v3.h +++ b/crypto/x509v3/x509v3.h @@ -192,7 +192,7 @@ DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) typedef struct DIST_POINT_NAME_st { /* NB: this is a CHOICE type and only one of these should be set */ STACK_OF(GENERAL_NAME) *fullname; -X509_NAME *relativename; +STACK_OF(X509_NAME_ENTRY) *relativename; } DIST_POINT_NAME; typedef struct DIST_POINT_st { @@ -329,17 +329,26 @@ DECLARE_ASN1_SET_OF(POLICYINFO) #define X509_PURPOSE_DYNAMIC_NAME 0x2 typedef struct x509_purpose_st { - int purpose_id; - int purpose_flags; + int purpose; + int trust; /* Default trust ID */ + int flags; int (*check_purpose)(struct x509_purpose_st *, X509 *, int); - char *purpose_name; - /* void *usr_data; */ /* if we enable this it needs a free function */ + char *name; + char *sname; + void *usr_data; } X509_PURPOSE; -DECLARE_STACK_OF(X509_PURPOSE) - +#define X509_PURPOSE_SSL_CLIENT 1 +#define X509_PURPOSE_SSL_SERVER 2 +#define X509_PURPOSE_NS_SSL_SERVER 3 +#define X509_PURPOSE_SMIME_SIGN 4 +#define X509_PURPOSE_SMIME_ENCRYPT 5 +#define X509_PURPOSE_CRL_SIGN 6 +#define X509_PURPOSE_MIN 1 +#define X509_PURPOSE_MAX 6 +DECLARE_STACK_OF(X509_PURPOSE) void ERR_load_X509V3_strings(void); int i2d_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS *a, unsigned char **pp); @@ -522,12 +531,18 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent); int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); int X509_check_purpose(X509 *x, int id, int ca); -int X509_PURPOSE_add(X509_PURPOSE *xp); +int X509_PURPOSE_get_count(void); +X509_PURPOSE * X509_PURPOSE_iget(int idx); +int X509_PURPOSE_get_by_sname(char *sname); +int X509_PURPOSE_get_by_id(int id); +int X509_PURPOSE_add(int id, int trust, int flags, + int (*ck)(X509_PURPOSE *, X509 *, int), + char *name, char *sname, void *arg); +char *X509_PURPOSE_iget_name(X509_PURPOSE *xp); +char *X509_PURPOSE_iget_sname(X509_PURPOSE *xp); +int X509_PURPOSE_get_trust(X509_PURPOSE *xp); void X509_PURPOSE_cleanup(void); -void X509_PURPOSE_add_standard(void); -int X509_PURPOSE_enum(int (*efunc)(X509_PURPOSE *, void *), void *usr); int X509_PURPOSE_get_id(X509_PURPOSE *); -char * X509_PURPOSE_get_name(X509_PURPOSE *); /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes