… | |
… | |
712 | |
712 | |
713 | # basically, this is deep magic (because SSL_read should have the same issues) |
713 | # basically, this is deep magic (because SSL_read should have the same issues) |
714 | # but the openssl maintainers basically said: "trust us, it just works". |
714 | # but the openssl maintainers basically said: "trust us, it just works". |
715 | # (unfortunately, we have to hardcode constants because the abysmally misdesigned |
715 | # (unfortunately, we have to hardcode constants because the abysmally misdesigned |
716 | # and mismaintained ssleay-module doesn't even offer them). |
716 | # and mismaintained ssleay-module doesn't even offer them). |
|
|
717 | # http://www.mail-archive.com/openssl-dev@openssl.org/msg22420.html |
717 | Net::SSLeay::CTX_set_mode ($self->{tls}, |
718 | Net::SSLeay::CTX_set_mode ($self->{tls}, |
718 | (eval { Net::SSLeay::MODE_ENABLE_PARTIAL_WRITE () } || 1) |
719 | (eval { Net::SSLeay::MODE_ENABLE_PARTIAL_WRITE () } || 1) |
719 | | (eval { Net::SSLeay::MODE_ACCEPT_MOVING_WRITE_BUFFER () } || 2)); |
720 | | (eval { Net::SSLeay::MODE_ACCEPT_MOVING_WRITE_BUFFER () } || 2)); |
720 | |
721 | |
721 | $self->{tls_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
722 | $self->{tls_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |