> [[email protected] - Wed Apr 14 18:03:15 2010]: > > Yes, but the dtls1_buffer_message() function uses a PQ_64BIT pointer > to pass a PQ_64BIT struct, which is accessed directly. However, > passed is just the pointer to the array which holds the sequence > number. This is not very elegant but seems to work. The patch > recently submitted only changed s->s3->rrec.seq_num to &(s->s3- > >rrec.seq_num) when passing it to the buffering function. Since > seq_num is an array and therefore interpreted as a pointer to the > first element this was ok. It was simply used as if it were a > pointer to an PQ_64BIT struct. Changing it to &(s->s3- > >rrec.seq_num) only results in passing the very same pointer to the > buffering function. This is because the compiler also interprets > this as a pointer to the first element of the array. However, I > don't know if this is the case with every compiler because we > didn't find this construct in the C specification, i.e. referencing > an array pointer. I expected it to be the pointer to the pointer to > the first element of the array, which it is not for some reason. So > I still recommend not to change it and revert the patch for 0.9.8 > as well to be sure it keeps working or change it to create a real > PQ_64BIT struct which is then passed to the buffering function. >
As I said the 1.0.0 change has been reverted and I'm referring only to the 0.9.8 patch. The original 0.9.8 patch was made because it broke the VMS compile. If you revert it in 0.9.8 you get this warning under Unix: gcc -I../crypto -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -c -o d1_pkt.o d1_pkt.c cc1: warnings being treated as errors d1_pkt.c: In function ‘dtls1_get_record’: d1_pkt.c:628: error: passing argument 3 of ‘dtls1_buffer_record’ makes pointer from integer without a cast d1_pkt.c:168: note: expected ‘long unsigned int *’ but argument is of type ‘long unsigned int’ d1_pkt.c: In function ‘dtls1_read_bytes’: d1_pkt.c:768: error: passing argument 3 of ‘dtls1_buffer_record’ makes pointer from integer without a cast d1_pkt.c:168: note: expected ‘long unsigned int *’ but argument is of type ‘long unsigned int’ make[1]: *** [d1_pkt.o] Error 1 make[1]: Leaving directory `/home/steve/src/ossl8/ssl' make: *** [build_ssl] Error 1 Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
