kicad/patches/boost_macosx_older_openssl....

56 lines
1.8 KiB
Diff
Raw Normal View History

=== modified file 'boost/asio/ssl/impl/context.ipp'
--- boost/asio/ssl/impl/context.ipp 2013-12-30 14:53:15 +0000
+++ boost/asio/ssl/impl/context.ipp 2013-12-30 19:08:01 +0000
@@ -236,19 +236,27 @@
boost::system::error_code context::clear_options(
context::options o, boost::system::error_code& ec)
{
-#if !defined(SSL_OP_NO_COMPRESSION)
+#if (OPENSSL_VERSION_NUMBER >= 0x009080DFL) \
+ && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+# if !defined(SSL_OP_NO_COMPRESSION)
if ((o & context::no_compression) != 0)
{
-#if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
handle_->comp_methods = SSL_COMP_get_compression_methods();
-#endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+# endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
o ^= context::no_compression;
}
-#endif // !defined(SSL_OP_NO_COMPRESSION)
+# endif // !defined(SSL_OP_NO_COMPRESSION)
::SSL_CTX_clear_options(handle_, o);
ec = boost::system::error_code();
+#else // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
+ // && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+ (void)o;
+ ec = boost::asio::error::operation_not_supported;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
+ // && (OPENSSL_VERSION_NUMBER != 0x00909000L)
return ec;
}
@@ -428,7 +436,8 @@
if (format == context_base::asn1)
{
- if (::SSL_CTX_use_certificate_ASN1(handle_, buffer_size(certificate),
+ if (::SSL_CTX_use_certificate_ASN1(handle_,
+ static_cast<int>(buffer_size(certificate)),
buffer_cast<const unsigned char*>(certificate)) == 1)
{
ec = boost::system::error_code();
@@ -929,7 +938,7 @@
{
return ::BIO_new_mem_buf(
const_cast<void*>(buffer_cast<const void*>(b)),
- buffer_size(b));
+ static_cast<int>(buffer_size(b)));
}
#endif // !defined(BOOST_ASIO_ENABLE_OLD_SSL)