Go to the source code of this file.
◆ cryptoLockCallback()
static void cryptoLockCallback |
( |
int |
mode, |
|
|
int |
type, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Definition at line 25 of file rlssl.cpp.
27 static int modes[CRYPTO_NUM_LOCKS];
28 if(type < 0 || type >= CRYPTO_NUM_LOCKS)
30 printf(
"cryptoLockCallback::type out of bounds\n");
34 int rw = mode & (CRYPTO_READ|CRYPTO_WRITE);
35 if(!((rw == CRYPTO_READ) || (rw == CRYPTO_WRITE)))
37 printf(
"cryptoLockCallback::invalid mode\n");
41 if(mode & CRYPTO_LOCK)
45 errstr =
"already locked";
53 else if (mode & CRYPTO_UNLOCK)
57 errstr =
"not locked";
62 errstr = (rw == CRYPTO_READ) ?
63 "CRYPTO_r_unlock on write lock" :
64 "CRYPTO_w_unlock on read lock";
◆ rlssl_available()
◆ rlssl_disconnect()
Definition at line 103 of file rlssl.cpp.
105 int ret = SSL_shutdown(rlssl->
sslStream);
106 if(ret <= 0) ret = -1;
◆ rlssl_init()
Definition at line 70 of file rlssl.cpp.
75 CRYPTO_set_id_callback(cryptoIdCallback);
77 SSL_load_error_strings();
static void cryptoLockCallback(int mode, int type, const char *file, int line)
◆ rlssl_read()
Definition at line 134 of file rlssl.cpp.
137 int ret = SSL_read(rlssl->
sslStream, &ch, 1);
140 printf(
"rlssl_read: ERROR SSL_read() ret=%d SSL_get_error=%d\n", ret, SSL_get_error(rlssl->
sslStream,ret));
◆ rlssl_starttls()
Definition at line 81 of file rlssl.cpp.
87 SSL_METHOD *meth = TLSv1_client_method();
◆ rlssl_write() [1/2]
Definition at line 123 of file rlssl.cpp.
125 unsigned char c = (
unsigned char) ch;
126 return SSL_write(rlssl->
sslStream, &c, 1);
◆ rlssl_write() [2/2]