~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to iocore/net/P_SSLNetProcessor.h

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
//
51
51
//////////////////////////////////////////////////////////////////
52
52
struct SSLNetProcessor:public
53
 
#ifndef _IOCORE_WIN32_WINNT
54
53
  UnixNetProcessor
55
 
#else
56
 
  NTNetProcessor
57
 
#endif
58
54
{
59
55
public:
60
56
 
62
58
 
63
59
  void cleanup(void);
64
60
  int reconfigure();
65
 
  int initSSL(SslConfigParams * param);
66
 
  int initSSLClient(SslConfigParams * param);
67
 
  int initSSLServerCTX(SslConfigParams * param,
68
 
                       SSL_CTX * ctx, char *serverCertPtr, char *serverCaPtr, char *serverKeyPtr, bool defaultEnabled);
69
 
 
70
 
  SSL_CTX *getSSL_CTX(void) const {return ctx; }
 
61
  int initSSLClient(const SslConfigParams * param);
 
62
 
 
63
  int initSSLServerCTX(SSL_CTX * ctx,
 
64
    const SslConfigParams * param,
 
65
    const char *serverCertPtr, const char *serverCaPtr,
 
66
    const char *serverKeyPtr);
 
67
 
71
68
  SSL_CTX *getClientSSL_CTX(void) const { return client_ctx; }
72
 
  int getAcceptPort() { return accept_port_number; }
73
69
 
74
70
  static void logSSLError(const char *errStr = "", int critical = 1);
75
71
 
76
 
  SSLNetProcessor()
77
 
    : verify_depth(0), ctx(NULL), client_ctx(NULL), sslMutexArray(NULL), accept_port_number(-1)
78
 
    {  };
 
72
  SSLNetProcessor();
79
73
  virtual ~SSLNetProcessor();
80
74
 
81
 
  int verify_depth;
82
 
  SSL_CTX *ctx;
83
75
  SSL_CTX *client_ctx;
84
76
  ProxyMutex **sslMutexArray;
85
77
 
 
78
  static EventType ET_SSL;
 
79
 
86
80
  //
87
81
  // Private
88
82
  //
89
 
#if !defined (_IOCORE_WIN32_WINNT)
90
83
 
91
84
  // Virtual function allows etype
92
85
  // to be upgraded to ET_SSL for SSLNetProcessor.
97
90
  // netProcessor connect functions.
98
91
  virtual UnixNetVConnection *allocateThread(EThread * t);
99
92
  virtual void freeThread(UnixNetVConnection * vc, EThread * t);
100
 
virtual NetAccept *createNetAccept();
101
 
#else // #if defined (_IOCORE_WIN32)
102
 
 
103
 
public:
104
 
  virtual NTNetVConnection * newNetVConnection(void);
105
 
  virtual NTNetVConnection *newClientNetVConnection(void);
106
 
#endif // #if defined (_IOCORE_WIN32)
 
93
  virtual NetAccept *createNetAccept();
107
94
 
108
95
private:
109
96
  void initSSLLocks(void);
110
97
  SSLNetProcessor(const SSLNetProcessor &);
111
98
  SSLNetProcessor & operator =(const SSLNetProcessor &);
112
99
 
113
 
  int accept_port_number;
114
100
  static bool open_ssl_initialized;
115
101
};
116
102