~ubuntu-branches/ubuntu/oneiric/inspircd/oneiric-security

« back to all changes in this revision

Viewing changes to src/modules/extra/m_ssl_openssl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2008-11-15 20:39:50 UTC
  • mfrom: (1.1.4 upstream) (3.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081115203950-uv1pf98x2vkon7se
Tags: 1.1.21+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes: (LP: #298418)
  - debian/patches/04_include-limits-h.dpatch:
    + Explicitly include limits.h for gcc 4.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
                ctx = SSL_CTX_new( SSLv23_server_method() );
149
149
                clictx = SSL_CTX_new( SSLv23_client_method() );
150
150
 
 
151
                SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 
152
                SSL_CTX_set_mode(clictx, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 
153
 
151
154
                SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, OnVerify);
152
155
                SSL_CTX_set_verify(clictx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, OnVerify);
153
156
 
525
528
                                        {
526
529
                                                memcpy(buffer, session->inbuf, count);
527
530
                                                // Move the stuff left in inbuf to the beginning of it
528
 
                                                memcpy(session->inbuf, session->inbuf + count, (session->inbufoffset - count));
 
531
                                                memmove(session->inbuf, session->inbuf + count, (session->inbufoffset - count));
529
532
                                                // Now we need to set session->inbufoffset to the amount of data still waiting to be handed to insp.
530
533
                                                session->inbufoffset -= count;
531
534
                                                // Insp uses readresult as the count of how much data there is in buffer, so: