The following commit fixes an type checking/casting issue in the
SKM_ASN1_SET_OF_i2d macro

http://cvs.openssl.org/filediff?f=openssl/crypto/stack/safestack.h&v1=1.72.2.5&v2=1.72.2.6

However, the SKM_ASN1_SET_OF_d2i needs a similar fix too:

$ diff -u openssl/safestack.h.orig openssl/safestack.h
--- openssl/safestack.h.orig    2010-05-18 18:12:20.000000000 +0200
+++ openssl/safestack.h 2010-05-27 08:31:56.905596266 +0200
@@ -179,7 +179,7 @@
        sk_is_sorted(CHECKED_STACK_OF(type, st))
 
 #define        SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, 
ex_tag, ex_class) \
-       (STACK_OF(type) *)d2i_ASN1_SET(CHECKED_STACK_OF(type, st), \
+  (STACK_OF(type) *)d2i_ASN1_SET((STACK_OF(OPENSSL_BLOCK) 
**)CHECKED_STACK_OF(type, st), \
                                pp, length, \
                                CHECKED_D2I_OF(type, d2i_func), \
                                CHECKED_SK_FREE_FUNC(type, free_func), \


--- openssl/safestack.h.orig	2010-05-18 18:12:20.000000000 +0200

+++ openssl/safestack.h	2010-05-27 08:31:56.905596266 +0200

@@ -179,7 +179,7 @@

 	sk_is_sorted(CHECKED_STACK_OF(type, st))

 

 #define	SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \

-	(STACK_OF(type) *)d2i_ASN1_SET(CHECKED_STACK_OF(type, st), \

+  (STACK_OF(type) *)d2i_ASN1_SET((STACK_OF(OPENSSL_BLOCK) **)CHECKED_STACK_OF(type, st), \

 				pp, length, \

 				CHECKED_D2I_OF(type, d2i_func), \

 				CHECKED_SK_FREE_FUNC(type, free_func), \

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to