~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to vio/viossl.c

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
{
87
87
  size_t r;
88
88
  DBUG_ENTER("vio_ssl_read");
89
 
  DBUG_PRINT("enter", ("sd: %d  buf: 0x%lx  size: %u  ssl: 0x%lx",
90
 
                       vio->sd, (long) buf, (uint) size, (long) vio->ssl_arg));
 
89
  DBUG_PRINT("enter", ("sd: %d  buf: %p  size: %u  ssl: %p",
 
90
                       vio->sd, buf, (uint) size, vio->ssl_arg));
91
91
 
92
92
  r= SSL_read((SSL*) vio->ssl_arg, buf, size);
93
93
#ifndef DBUG_OFF
103
103
{
104
104
  size_t r;
105
105
  DBUG_ENTER("vio_ssl_write");
106
 
  DBUG_PRINT("enter", ("sd: %d  buf: 0x%lx  size: %u", vio->sd,
107
 
                       (long) buf, (uint) size));
 
106
  DBUG_PRINT("enter", ("sd: %d  buf: %p  size: %u", vio->sd,
 
107
                       buf, (uint) size));
108
108
 
109
109
  r= SSL_write((SSL*) vio->ssl_arg, buf, size);
110
110
#ifndef DBUG_OFF
172
172
  vio_delete(vio);
173
173
}
174
174
 
175
 
 
 
175
#ifndef EMBEDDED_LIBRARY
176
176
static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
177
177
                  int (*connect_accept_func)(SSL*))
178
178
{
181
181
  my_bool was_blocking;
182
182
 
183
183
  DBUG_ENTER("ssl_do");
184
 
  DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d  ctx: 0x%lx",
185
 
                       (long) ptr, vio->sd, (long) ptr->ssl_context));
 
184
  DBUG_PRINT("enter", ("ptr: %p, sd: %d  ctx: %p",
 
185
                       ptr, vio->sd, ptr->ssl_context));
186
186
 
187
187
  /* Set socket to blocking if not already set */
188
188
  vio_blocking(vio, 1, &was_blocking);
194
194
    vio_blocking(vio, was_blocking, &unused);
195
195
    DBUG_RETURN(1);
196
196
  }
197
 
  DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout));
 
197
  DBUG_PRINT("info", ("ssl: %p timeout: %ld", ssl, timeout));
198
198
  SSL_clear(ssl);
199
199
  SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
200
200
  SSL_set_fd(ssl, vio->sd);
262
262
  DBUG_ENTER("sslconnect");
263
263
  DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect));
264
264
}
265
 
 
 
265
#endif  /*EMBEDDED_LIBRARY*/
266
266
 
267
267
int vio_ssl_blocking(Vio *vio __attribute__((unused)),
268
268
                     my_bool set_blocking_mode,