… | |
… | |
863 | # but the openssl maintainers basically said: "trust us, it just works". |
863 | # but the openssl maintainers basically said: "trust us, it just works". |
864 | # (unfortunately, we have to hardcode constants because the abysmally misdesigned |
864 | # (unfortunately, we have to hardcode constants because the abysmally misdesigned |
865 | # and mismaintained ssleay-module doesn't even offer them). |
865 | # and mismaintained ssleay-module doesn't even offer them). |
866 | # http://www.mail-archive.com/openssl-dev@openssl.org/msg22420.html |
866 | # http://www.mail-archive.com/openssl-dev@openssl.org/msg22420.html |
867 | Net::SSLeay::CTX_set_mode ($self->{tls}, |
867 | Net::SSLeay::CTX_set_mode ($self->{tls}, |
868 | (eval { Net::SSLeay::MODE_ENABLE_PARTIAL_WRITE () } || 1) |
868 | (eval { local $SIG{__DIE__}; Net::SSLeay::MODE_ENABLE_PARTIAL_WRITE () } || 1) |
869 | | (eval { Net::SSLeay::MODE_ACCEPT_MOVING_WRITE_BUFFER () } || 2)); |
869 | | (eval { local $SIG{__DIE__}; Net::SSLeay::MODE_ACCEPT_MOVING_WRITE_BUFFER () } || 2)); |
870 | |
870 | |
871 | $self->{tls_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
871 | $self->{tls_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
872 | $self->{tls_wbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
872 | $self->{tls_wbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
873 | |
873 | |
874 | Net::SSLeay::set_bio ($ssl, $self->{tls_rbio}, $self->{tls_wbio}); |
874 | Net::SSLeay::set_bio ($ssl, $self->{tls_rbio}, $self->{tls_wbio}); |