SSLSocket.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2009, 2020 IBM Corp.
3  *
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v2.0
6  * and Eclipse Distribution License v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * https://www.eclipse.org/legal/epl-2.0/
10  * and the Eclipse Distribution License is available at
11  * http://www.eclipse.org/org/documents/edl-v10.php.
12  *
13  * Contributors:
14  * Ian Craggs, Allan Stockdill-Mander - initial implementation
15  * Ian Craggs - SNI support
16  * Ian Craggs - post connect checks and CApath
17  *******************************************************************************/
18 #if !defined(SSLSOCKET_H)
19 #define SSLSOCKET_H
20 
21 #if defined(_WIN32) || defined(_WIN64)
22  #define ssl_mutex_type HANDLE
23 #else
24  #include <pthread.h>
25  #include <semaphore.h>
26  #define ssl_mutex_type pthread_mutex_t
27 #endif
28 
29 #include <openssl/ssl.h>
30 #include "SocketBuffer.h"
31 #include "Clients.h"
32 
33 #define URI_SSL "ssl://"
34 
36 void SSLSocket_handleOpensslInit(int bool_value);
37 
38 int SSLSocket_initialize(void);
39 void SSLSocket_terminate(void);
40 int SSLSocket_setSocketForSSL(networkHandles* net, MQTTClient_SSLOptions* opts, const char* hostname, size_t hostname_len);
41 
42 int SSLSocket_getch(SSL* ssl, int socket, char* c);
43 char *SSLSocket_getdata(SSL* ssl, int socket, size_t bytes, size_t* actual_len, int* rc);
44 
46 int SSLSocket_putdatas(SSL* ssl, int socket, char* buf0, size_t buf0len, PacketBuffers bufs);
47 int SSLSocket_connect(SSL* ssl, int sock, const char* hostname, int verify, int (*cb)(const char *str, size_t len, void *u), void* u);
48 
49 int SSLSocket_getPendingRead(void);
51 
52 #endif
int SSLSocket_getch(SSL *ssl, int socket, char *c)
int SSLSocket_setSocketForSSL(networkHandles *net, MQTTClient_SSLOptions *opts, const char *hostname, size_t hostname_len)
int SSLSocket_connect(SSL *ssl, int sock, const char *hostname, int verify, int(*cb)(const char *str, size_t len, void *u), void *u)
struct pubsub_opts opts
Definition: paho_c_pub.c:42
void SSLSocket_handleOpensslInit(int bool_value)
int SSLSocket_getPendingRead(void)
void SSLSocket_terminate(void)
int SSLSocket_putdatas(SSL *ssl, int socket, char *buf0, size_t buf0len, PacketBuffers bufs)
int SSLSocket_close(networkHandles *net)
int SSLSocket_initialize(void)
MQTTClient c
Definition: test10.c:1656
enum MQTTReasonCodes rc
Definition: test10.c:1112
Definition: format.h:3618
string hostname
Definition: test2.py:6
int len
Definition: utf-8.c:46
int SSLSocket_continueWrite(pending_writes *pw)
char * SSLSocket_getdata(SSL *ssl, int socket, size_t bytes, size_t *actual_len, int *rc)


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:47