Commit c8b41850 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Kill evil casts, fix PKCS#7 and add new X509V3 Function.

parent 1c10afc3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5,6 +5,12 @@

 Changes between 0.9.2b and 0.9.3

  *) New function X509V3_EXT_i2d() to create an X509_EXTENSION structure
     from the internal representation. Various PKCS#7 fixes: remove some
     evil casts and set the enc_dig_alg field properly based on the signing
     key type.
     [Steve Henson]

  *) Allow PKCS#12 password to be set from the command line or the
     environment. Let 'ca' get its config file name from the environment
     variables "OPENSSL_CONF" or "SSLEAY_CONF" (for consistency with 'req'
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ int ASN1_TYPE_get(ASN1_TYPE *a)
		return(0);
	}

void ASN1_TYPE_set(ASN1_TYPE *a, int type, char *value)
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value)
	{
	if (a->value.ptr != NULL)
		ASN1_TYPE_component_free(a);
+1 −1
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ void ASN1_TYPE_free(ASN1_TYPE *a);
int		i2d_ASN1_TYPE(ASN1_TYPE *a,unsigned char **pp);
ASN1_TYPE *	d2i_ASN1_TYPE(ASN1_TYPE **a,unsigned char **pp,long length);
int ASN1_TYPE_get(ASN1_TYPE *a);
void ASN1_TYPE_set(ASN1_TYPE *a, int type, char *value);
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);

ASN1_OBJECT *	ASN1_OBJECT_new(void );
void		ASN1_OBJECT_free(ASN1_OBJECT *a);
+2 −2
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)

	if ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);
	if (!ASN1_OCTET_STRING_set(os,data,len)) return(0);
	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);
	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os);
	return(1);
	}

@@ -124,7 +124,7 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data,
	  i2d_ASN1_INTEGER(&in,&p);
	M_i2d_ASN1_OCTET_STRING(&os,&p);

	ASN1_TYPE_set(a,V_ASN1_SEQUENCE,(char *)osp);
	ASN1_TYPE_set(a,V_ASN1_SEQUENCE,osp);
	return(1);
	}

+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, unsigned char **pp,
	M_ASN1_D2I_Finish(a,X509_ATTRIBUTE_free,ASN1_F_D2I_X509_ATTRIBUTE);
	}

X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, char *value)
X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value)
	{
	X509_ATTRIBUTE *ret=NULL;
	ASN1_TYPE *val=NULL;
Loading