#undef PKCS7_SIGNER_INFO for Win32 to avoid clashes.
Fix so CRLDistributionPoints relativeName option uses the correct type.
This commit is contained in:
parent
2fdf5d7c23
commit
fc6be0fa56
@ -71,8 +71,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/* Under Win32 this is defined in wincrypt.h */
|
/* Under Win32 thes are defined in wincrypt.h */
|
||||||
#undef PKCS7_ISSUER_AND_SERIAL
|
#undef PKCS7_ISSUER_AND_SERIAL
|
||||||
|
#undef PKCS7_SIGNER_INFO
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -218,13 +218,13 @@ void DIST_POINT_free(DIST_POINT *a)
|
|||||||
|
|
||||||
int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp)
|
int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp)
|
||||||
{
|
{
|
||||||
int v = 0;
|
|
||||||
M_ASN1_I2D_vars(a);
|
M_ASN1_I2D_vars(a);
|
||||||
|
|
||||||
if(a->fullname) {
|
if(a->fullname) {
|
||||||
M_ASN1_I2D_len_IMP_opt (a->fullname, i2d_GENERAL_NAMES);
|
M_ASN1_I2D_len_IMP_opt (a->fullname, i2d_GENERAL_NAMES);
|
||||||
} else {
|
} else {
|
||||||
M_ASN1_I2D_len_EXP_opt (a->relativename, i2d_X509_NAME, 1, v);
|
M_ASN1_I2D_len_IMP_SET_opt_type(X509_NAME_ENTRY,
|
||||||
|
a->relativename, i2d_X509_NAME_ENTRY, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't want a SEQUENCE so... */
|
/* Don't want a SEQUENCE so... */
|
||||||
@ -234,7 +234,8 @@ int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp)
|
|||||||
if(a->fullname) {
|
if(a->fullname) {
|
||||||
M_ASN1_I2D_put_IMP_opt (a->fullname, i2d_GENERAL_NAMES, 0);
|
M_ASN1_I2D_put_IMP_opt (a->fullname, i2d_GENERAL_NAMES, 0);
|
||||||
} else {
|
} else {
|
||||||
M_ASN1_I2D_put_EXP_opt (a->relativename, i2d_X509_NAME, 1, v);
|
M_ASN1_I2D_put_IMP_SET_opt_type(X509_NAME_ENTRY,
|
||||||
|
a->relativename, i2d_X509_NAME_ENTRY, 1);
|
||||||
}
|
}
|
||||||
M_ASN1_I2D_finish();
|
M_ASN1_I2D_finish();
|
||||||
}
|
}
|
||||||
@ -253,7 +254,7 @@ DIST_POINT_NAME *DIST_POINT_NAME_new(void)
|
|||||||
void DIST_POINT_NAME_free(DIST_POINT_NAME *a)
|
void DIST_POINT_NAME_free(DIST_POINT_NAME *a)
|
||||||
{
|
{
|
||||||
if (a == NULL) return;
|
if (a == NULL) return;
|
||||||
X509_NAME_free(a->relativename);
|
sk_X509_NAME_ENTRY_pop_free(a->relativename, X509_NAME_ENTRY_free);
|
||||||
sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free);
|
sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free);
|
||||||
Free ((char *)a);
|
Free ((char *)a);
|
||||||
}
|
}
|
||||||
@ -273,7 +274,8 @@ DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp,
|
|||||||
M_ASN1_D2I_get_imp(ret->fullname, d2i_GENERAL_NAMES,
|
M_ASN1_D2I_get_imp(ret->fullname, d2i_GENERAL_NAMES,
|
||||||
V_ASN1_SEQUENCE);
|
V_ASN1_SEQUENCE);
|
||||||
} else if (tag == (1|V_ASN1_CONTEXT_SPECIFIC)) {
|
} else if (tag == (1|V_ASN1_CONTEXT_SPECIFIC)) {
|
||||||
M_ASN1_D2I_get_EXP_opt (ret->relativename, d2i_X509_NAME, 1);
|
M_ASN1_D2I_get_IMP_set_opt_type (X509_NAME_ENTRY,
|
||||||
|
ret->relativename, d2i_X509_NAME_ENTRY, X509_NAME_ENTRY_free, 1);
|
||||||
} else {
|
} else {
|
||||||
c.error = ASN1_R_BAD_TAG;
|
c.error = ASN1_R_BAD_TAG;
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -192,7 +192,7 @@ DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION)
|
|||||||
typedef struct DIST_POINT_NAME_st {
|
typedef struct DIST_POINT_NAME_st {
|
||||||
/* NB: this is a CHOICE type and only one of these should be set */
|
/* NB: this is a CHOICE type and only one of these should be set */
|
||||||
STACK_OF(GENERAL_NAME) *fullname;
|
STACK_OF(GENERAL_NAME) *fullname;
|
||||||
X509_NAME *relativename;
|
STACK_OF(X509_NAME_ENTRY) *relativename;
|
||||||
} DIST_POINT_NAME;
|
} DIST_POINT_NAME;
|
||||||
|
|
||||||
typedef struct DIST_POINT_st {
|
typedef struct DIST_POINT_st {
|
||||||
|
Loading…
Reference in New Issue
Block a user