~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/engine/tlssocket.h

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef __TLSSOCKET_H__
2
2
#define __TLSSOCKET_H__
3
3
 
4
 
#define ssize_t long
5
4
#include <gnutls/gnutls.h>
6
5
#include "backend.h"
7
6
#include "socket.h"
42
41
        wxString GetMacName();
43
42
 
44
43
        bool ResumedSession() const;
45
 
        
 
44
 
46
45
        // PEM formatted
47
46
        bool AddTrustedRootCertificate(const wxString& cert);
 
47
 
 
48
        static wxString ListTlsCiphers(wxString priority);
 
49
 
48
50
protected:
49
51
 
 
52
        bool InitSession();
 
53
        void UninitSession();
50
54
        bool CopySessionData(const CTlsSocket* pPrimarySocket);
51
55
 
52
56
        virtual void OnRateAvailable(enum CRateLimiter::rate_direction direction);
53
57
 
54
58
        int ContinueHandshake();
55
59
        void ContinueShutdown();
56
 
        
 
60
 
57
61
        int VerifyCertificate();
58
62
 
59
63
        enum TlsState m_tlsState;
65
69
 
66
70
        gnutls_certificate_credentials_t m_certCredentials;
67
71
 
68
 
        void LogError(int code);
 
72
        void LogError(int code, const wxString& function);
69
73
        void PrintAlert();
70
 
        
 
74
 
71
75
        // Failure logs the error, uninits the session and sends a close event
72
 
        void Failure(int code, int socket_error);
 
76
        void Failure(int code, int socket_error, const wxString& function = _T(""));
73
77
 
74
78
        static ssize_t PushFunction(gnutls_transport_ptr_t ptr, const void* data, size_t len);
75
79
        static ssize_t PullFunction(gnutls_transport_ptr_t ptr, void* data, size_t len);