~brianaker/gearmand/1196552

« back to all changes in this revision

Viewing changes to libgearman-server/struct/gearmand.h

  • Committer: Continuous Integration
  • Date: 2013-08-09 19:42:53 UTC
  • mfrom: (847.2.5 gearmand-1.2)
  • Revision ID: ci@tangent.org-20130809194253-7qi3duw695qkhlwz
Merge lp:~brianaker/gearmand/ssl-update Build: jenkins-Gearmand-817

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#pragma once
39
39
 
40
40
#include "libgearman-server/struct/server.h"
41
 
#if defined(HAVE_CYASSL) && HAVE_CYASSL
42
 
# include <cyassl/ssl.h>
43
 
#endif
 
41
#include "libgearman/ssl.h"
44
42
 
45
43
#include "libgearman-server/struct/port.h"
46
44
 
137
135
  struct event wakeup_event;
138
136
  std::vector<gearmand_port_st> _port_list;
139
137
  private:
140
 
  struct CYASSL_CTX* _ctx_ssl;
 
138
  SSL_CTX* _ctx_ssl;
141
139
  public:
142
140
 
143
141
  gearmand_st(const char *host_,
175
173
 
176
174
  void init_ssl()
177
175
  {
178
 
#if defined(HAVE_CYASSL) && HAVE_CYASSL
179
 
    CyaSSL_Init();
180
 
    _ctx_ssl= CyaSSL_CTX_new(CyaSSLv23_server_method());
 
176
#if defined(HAVE_SSL) && HAVE_SSL
 
177
    SSL_load_error_strings();
 
178
    SSL_library_init();
 
179
 
 
180
    _ctx_ssl= SSL_CTX_new(SSLv23_server_method());
181
181
#endif
182
182
  }
183
183
 
184
 
  struct CYASSL_CTX* ctx_ssl()
 
184
  SSL_CTX* ctx_ssl()
185
185
  {
186
186
    return _ctx_ssl;
187
187
  }
193
193
      free(host);
194
194
    }
195
195
 
196
 
#if defined(HAVE_CYASSL) && HAVE_CYASSL
197
 
    CyaSSL_CTX_free(_ctx_ssl);
 
196
#if defined(HAVE_SSL) && HAVE_SSL
 
197
    SSL_CTX_free(_ctx_ssl);
198
198
#endif
199
199
  }
200
200