Created attachment 375537 [details] Simple test program that illustrates the issue. Description of problem: The openssl/asn1.h header file is buggy. For a C program this causes compiler warnings. For a C++ program this causes compiler errors, because C++ is a strongly typed language. Version-Release number of selected component (if applicable): openssl-devel-1.0.0-0.13.beta4.fc12.x86_64 How reproducible: Always. Steps to Reproduce: 1. Compile the attatched test program. Actual results: 2. With gcc it compiles but gives warnings: [ellert@localhost ~]$ LANG=C gcc -o test test.c -lssl test.c: In function 'main': test.c:12: warning: passing argument 1 of 'i2d_ASN1_SET' from incompatible pointer type /usr/include/openssl/asn1.h:894: note: expected 'struct stack_st_OPENSSL_BLOCK *' but argument is of type 'struct _STACK *' test.c:14: warning: passing argument 1 of 'i2d_ASN1_SET' from incompatible pointer type /usr/include/openssl/asn1.h:894: note: expected 'struct stack_st_OPENSSL_BLOCK *' but argument is of type 'struct _STACK *' 3. With g++ it fails to compile, because the type mismatches are considered errors: [ellert@localhost ~]$ LANG=C g++ -o test test.c -lssl test.c: In function 'int main()': test.c:12: error: cannot convert '_STACK*' to 'stack_st_OPENSSL_BLOCK*' for argument '1' to 'int i2d_ASN1_SET(stack_st_OPENSSL_BLOCK*, unsigned char**, int (*)(void*, unsigned char**), int, int, int)' test.c:14: error: cannot convert '_STACK*' to 'stack_st_OPENSSL_BLOCK*' for argument '1' to 'int i2d_ASN1_SET(stack_st_OPENSSL_BLOCK*, unsigned char**, int (*)(void*, unsigned char**), int, int, int)' Expected results: No warnings in C, working compilation in C++. Additional info: There are 4 macros in openssl/asn1.h which are defined using STACK_OF(OPENSSL_BLOCK). However, by the time theses macros are being resolved all the arguments have been put through the CHECKED_xxx macros and been anonymized and are simply _STACK pointers. The 4 macros are: i2d_ASN1_SET, d2i_ASN1_SET, ASN1_seq_unpack, and ASN1_seq_pack.
Created attachment 375568 [details] Workaround fro the bug This is a rather clumsy workaround for the bug. This compiles without warnings/error for C and C++: [ellert@localhost ~]$ gcc -o test test-wo.c -lssl [ellert@localhost ~]$ g++ -o test test-wo.c -lssl [ellert@localhost ~]$
Can you please report that upstream to the openssl RT by sending e-mail with the bug report to rt? Thank you.
I have tried to send a mail to rt. It doesn't work. My report didn't make it into the RT tracker. And I didn't get any reply at all from the server - not even a reject message. I have tried it twice with 5 hours between the attempts. Is there a know problem with the server?
The RT queue is moderated so the report will make it to the RT tracker as soon as the moderator comes to look at the queue. Thanks for your effort.
Here it is: http://rt.openssl.org/index.html?q=2123
openssl-1.0.0-4.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/openssl-1.0.0-4.fc12
openssl-1.0.0-4.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update openssl'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/openssl-1.0.0-4.fc12
openssl-1.0.0-4.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.