#52 Can't compile in gcc 4.2 due to ASN1_dup()

closed-fixed
nobody
None
5
2009-03-02
2008-07-22
Craig McQueen
No

The source code doesn't compile under gcc 4.2 -- that is, on many recent distributions of Linux such as Ubuntu Hardy Heron.

For details, see forum thread at:
http://sourceforge.net/forum/forum.php?thread_id=1860505&forum_id=209947

There are compiler errors such as:
x509rev.cpp: In constructor 'x509rev::x509rev(const X509_REVOKED*)':
x509rev.cpp:28: error: invalid conversion from 'void*' to 'char*'
x509rev.cpp:28: error: initializing argument 3 of 'void* ASN1_dup(int (*)(void*, unsigned char**), void* (*)(void**, const unsigned char**, long int), char*)'
x509rev.cpp: In member function 'x509rev& x509rev::set(const X509_REVOKED*)':
x509rev.cpp:46: error: invalid conversion from 'void*' to 'char*'
x509rev.cpp:46: error: initializing argument 3 of 'void* ASN1_dup(int (*)(void*, unsigned char**), void* (*)(void**, const unsigned char**, long int), char*)'
x509rev.cpp: In member function 'X509_REVOKED* x509rev::get() const':
x509rev.cpp:90: error: invalid conversion from 'void*' to 'char*'
x509rev.cpp:90: error: initializing argument 3 of 'void* ASN1_dup(int (*)(void*, unsigned char**), void* (*)(void**, const unsigned char**, long int), char*)'

It looks as though it's all about ASN1_dup() function, and tighter rules in gcc 4.2. See:
http://archive.netbsd.se/?ml=openssl-dev&a=2007-06&t=4482976

So, something needs to change in the way ASN1_dup() is called, in order to compile in newer gcc versions.

Discussion

  • fixed in commit 19ae7337773f2408616bc709fbe48fb055621314
    at Thu Nov 22 20:13:59 2007 +0100

     
    • status: open --> closed
     
    • status: closed --> closed-fixed