Subversion Repositories tpanel

Rev

Rev 380 | Rev 401 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 380 Rev 391
Line 84... Line 84...
84
 
84
 
85
    if (mp_ftphandle->buf == NULL)
85
    if (mp_ftphandle->buf == NULL)
86
    {
86
    {
87
        errorHandler("calloc", errno, __LINE__);
87
        errorHandler("calloc", errno, __LINE__);
88
        free(mp_ftphandle);
88
        free(mp_ftphandle);
-
 
89
        mp_ftphandle = nullptr;
-
 
90
        return;
89
    }
91
    }
90
 
92
 
91
#ifndef NOSSL
93
#ifndef NOSSL
92
    mp_ftphandle->ctx = SSL_CTX_new(TLS_client_method());
94
    mp_ftphandle->ctx = SSL_CTX_new(TLS_client_method());
93
    SSL_CTX_set_verify(mp_ftphandle->ctx, SSL_VERIFY_NONE, NULL);
95
    SSL_CTX_set_verify(mp_ftphandle->ctx, SSL_VERIFY_NONE, NULL);
Line 775... Line 777...
775
            return 0;
777
            return 0;
776
        }
778
        }
777
    }
779
    }
778
 
780
 
779
#ifndef NOSSL
781
#ifndef NOSSL
780
 
-
 
781
    if (nControl->tlsdata)
782
    if (nControl->tlsdata)
782
    {
783
    {
783
        (*nData)->ssl = SSL_new(nControl->ctx);
784
        (*nData)->ssl = SSL_new(nControl->ctx);
784
        (*nData)->sbio = BIO_new_socket((*nData)->handle, BIO_NOCLOSE);
785
        (*nData)->sbio = BIO_new_socket((*nData)->handle, BIO_NOCLOSE);
785
        SSL_set_bio((*nData)->ssl, (*nData)->sbio, (*nData)->sbio);
786
        SSL_set_bio((*nData)->ssl, (*nData)->sbio, (*nData)->sbio);
Line 925... Line 926...
925
 
926
 
926
    if (!FtpSendCmd(cmd, '1', nControl))
927
    if (!FtpSendCmd(cmd, '1', nControl))
927
    {
928
    {
928
        FtpClose(*nData);
929
        FtpClose(*nData);
929
        *nData = NULL;
930
        *nData = NULL;
-
 
931
        free(ctrl);
930
        return -1;
932
        return -1;
931
    }
933
    }
932
 
934
 
933
    ctrl->handle = sData;
935
    ctrl->handle = sData;
934
    ctrl->dir = dir;
936
    ctrl->dir = dir;