Boost C++ Libraries: Ticket #5453: Compile error in Boost.Asio with OPENSSL_NO_SSL2 https://svn.boost.org/trac10/ticket/5453 <p> A compile error occurs in asio/ssl/detail/openssl_context_service.hpp if OPENSSL_NO_SSL2 is defined (this is the default of Debian's OpenSSL package). openssl_context_service.hpp should check OPENSSL_NO_* macros. Show error messages below. </p> <p> $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.5.2-8' --with-bugurl=<a class="ext-link" href="file:///usr/share/doc/gcc-4.5/README.Bugs"><span class="icon">​</span>file:///usr/share/doc/gcc-4.5/README.Bugs</a> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.5.2 (Debian 4.5.2-8) </p> <p> $ g++ /usr/include/boost/asio/ssl.hpp In file included from /usr/include/boost/asio/ssl/context_service.hpp:25:0, </p> <blockquote> <p> from /usr/include/boost/asio/ssl/context.hpp:21, from /usr/include/boost/asio/ssl.hpp:19: </p> </blockquote> <p> /usr/include/boost/asio/ssl/detail/openssl_context_service.hpp: In member function ‘void boost::asio::ssl::detail::openssl_context_service::create(SSL_CTX*&amp;, boost::asio::ssl::context_base::method)’: /usr/include/boost/asio/ssl/detail/openssl_context_service.hpp:70:28: error: ‘::SSLv2_method’ has not been declared /usr/include/boost/asio/ssl/detail/openssl_context_service.hpp:73:28: error: ‘::SSLv2_client_method’ has not been declared /usr/include/boost/asio/ssl/detail/openssl_context_service.hpp:76:28: error: ‘::SSLv2_server_method’ has not been declared </p> <p> $ grep -n2 OPENSSL_NO_SSL2 /usr/include/openssl/*.h /usr/include/openssl/opensslconf.h-30-# define OPENSSL_NO_RFC3779 /usr/include/openssl/opensslconf.h-31-#endif /usr/include/openssl/opensslconf.h:32:#ifndef OPENSSL_NO_SSL2 /usr/include/openssl/opensslconf.h:33:# define OPENSSL_NO_SSL2 /usr/include/openssl/opensslconf.h-34-#endif /usr/include/openssl/opensslconf.h-35-#ifndef OPENSSL_NO_STORE -- /usr/include/openssl/opensslconf.h-75-# define NO_RFC3779 /usr/include/openssl/opensslconf.h-76-# endif /usr/include/openssl/opensslconf.h:77:# if defined(OPENSSL_NO_SSL2) &amp;&amp; !defined(NO_SSL2) /usr/include/openssl/opensslconf.h-78-# define NO_SSL2 /usr/include/openssl/opensslconf.h-79-# endif -- /usr/include/openssl/ssl.h-345-#endif /usr/include/openssl/ssl.h-346- </p> <table class="wiki"> <tr>/usr/include/openssl/ssl.h:347:#if (defined(OPENSSL_NO_RSA) <td> defined(OPENSSL_NO_MD5)) &amp;&amp; !defined(OPENSSL_NO_SSL2) </td></tr></table> <p> /usr/include/openssl/ssl.h:348:#define OPENSSL_NO_SSL2 /usr/include/openssl/ssl.h-349-#endif /usr/include/openssl/ssl.h-350- -- /usr/include/openssl/ssl.h-1630-int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth); /usr/include/openssl/ssl.h-1631- /usr/include/openssl/ssl.h:1632:#ifndef OPENSSL_NO_SSL2 /usr/include/openssl/ssl.h-1633-const SSL_METHOD *SSLv2_method(void); /* SSLv2 */ /usr/include/openssl/ssl.h-1634-const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */ </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5453 Trac 1.4.3 chris_kohlhoff Mon, 06 Jun 2011 01:38:57 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5453#comment:1 https://svn.boost.org/trac10/ticket/5453#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Should be fixed in release branch as of <a class="changeset" href="https://svn.boost.org/trac10/changeset/72428" title="Merge asio from trunk.">[72428]</a>. </p> Ticket anonymous Wed, 03 Aug 2016 17:46:55 GMT <link>https://svn.boost.org/trac10/ticket/5453#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5453#comment:2</guid> <description> <p> The same should be done for <code>OPENSSL_NO_SSL3</code>. </p> </description> <category>Ticket</category> </item> </channel> </rss>