commit
5fd77f9571
|
@ -60,6 +60,7 @@ android/wolfssljni-ndk-sample/proguard-project.txt
|
||||||
|
|
||||||
/tls/client-tcp
|
/tls/client-tcp
|
||||||
/tls/client-tls
|
/tls/client-tls
|
||||||
|
/tls/client-tls-cacb
|
||||||
/tls/client-tls-callback
|
/tls/client-tls-callback
|
||||||
/tls/client-tls-ecdhe
|
/tls/client-tls-ecdhe
|
||||||
/tls/client-tls-nonblocking
|
/tls/client-tls-nonblocking
|
||||||
|
|
|
@ -19,11 +19,15 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_CLIENT) && !defined(NO_WOLFSSL_SERVER)
|
||||||
|
|
||||||
/* I/O buffer size - wolfSSL buffers messages internally as well. */
|
/* I/O buffer size - wolfSSL buffers messages internally as well. */
|
||||||
#define BUFFER_SIZE 2048
|
#define BUFFER_SIZE 2048
|
||||||
|
@ -478,3 +482,14 @@ int main(int argc, char* argv[])
|
||||||
return (ret == 0) ? 0 : 1;
|
return (ret == 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Must build wolfSSL with client and server enabled for this example\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,11 +21,16 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_SERVER) && !defined(WOLFSSL_NO_TLS12)
|
||||||
|
|
||||||
/* I/O buffer size - wolfSSL buffers messages internally as well. */
|
/* I/O buffer size - wolfSSL buffers messages internally as well. */
|
||||||
#define BUFFER_SIZE 2048
|
#define BUFFER_SIZE 2048
|
||||||
/* Size of static buffer for dynamic memory allocation. */
|
/* Size of static buffer for dynamic memory allocation. */
|
||||||
|
@ -296,3 +301,15 @@ int main(int argc, char* argv[])
|
||||||
return (ret == 0) ? 0 : 1;
|
return (ret == 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Must build wolfSSL with TLS v1.2 and server enabled for this example\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,7 +19,10 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
#include <wolfssl/error-ssl.h>
|
#include <wolfssl/error-ssl.h>
|
||||||
|
|
||||||
|
@ -27,6 +30,8 @@
|
||||||
#include "tls-info.h"
|
#include "tls-info.h"
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_CLIENT)
|
||||||
|
|
||||||
/* Application data to send. */
|
/* Application data to send. */
|
||||||
static const char msgHTTPGet[] = "GET /index.html HTTP/1.0\r\n\r\n";
|
static const char msgHTTPGet[] = "GET /index.html HTTP/1.0\r\n\r\n";
|
||||||
|
|
||||||
|
@ -264,3 +269,15 @@ int main(int argc, char* argv[])
|
||||||
return (ret == 0) ? 0 : 1;
|
return (ret == 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Must build wolfSSL with client enabled for this example\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,7 +19,10 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
#include <wolfssl/error-ssl.h>
|
#include <wolfssl/error-ssl.h>
|
||||||
|
|
||||||
|
@ -27,6 +30,8 @@
|
||||||
#include "tls-info.h"
|
#include "tls-info.h"
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_CLIENT)
|
||||||
|
|
||||||
/* Application data to send. */
|
/* Application data to send. */
|
||||||
static const char msgHTTPGet[] = "GET /index.html HTTP/1.0\r\n\r\n";
|
static const char msgHTTPGet[] = "GET /index.html HTTP/1.0\r\n\r\n";
|
||||||
|
|
||||||
|
@ -244,3 +249,14 @@ int main(int argc, char* argv[])
|
||||||
return (ret == 0) ? 0 : 1;
|
return (ret == 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Must build wolfSSL with client enabled for this example\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,13 +19,18 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#include "sockets.h"
|
#include "sockets.h"
|
||||||
#include "tls-info.h"
|
#include "tls-info.h"
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_SERVER)
|
||||||
|
|
||||||
/* Application data to send. */
|
/* Application data to send. */
|
||||||
static const char msgHTTPIndex[] =
|
static const char msgHTTPIndex[] =
|
||||||
"HTTP/1.1 200 OK\n"
|
"HTTP/1.1 200 OK\n"
|
||||||
|
@ -296,3 +301,14 @@ int main(int argc, char* argv[])
|
||||||
return (ret == 0) ? 0 : 1;
|
return (ret == 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Must build wolfSSL with server enabled for this example\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,13 +19,18 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#include "sockets.h"
|
#include "sockets.h"
|
||||||
#include "tls-info.h"
|
#include "tls-info.h"
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_SERVER)
|
||||||
|
|
||||||
/* Application data to send. */
|
/* Application data to send. */
|
||||||
static const char msgHTTPIndex[] =
|
static const char msgHTTPIndex[] =
|
||||||
"HTTP/1.1 200 OK\n"
|
"HTTP/1.1 200 OK\n"
|
||||||
|
@ -282,3 +287,14 @@ int main(int argc, char* argv[])
|
||||||
return (ret == 0) ? 0 : 1;
|
return (ret == 0) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Must build wolfSSL with server enabled for this example\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,10 +19,14 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#ifndef SINGLE_THREADED
|
#if !defined(SINGLE_THREADED) && !defined(NO_WOLFSSL_CLIENT) && \
|
||||||
|
!defined(NO_WOLFSSL_SERVER)
|
||||||
|
|
||||||
#include "sockets.h"
|
#include "sockets.h"
|
||||||
#include "threading.h"
|
#include "threading.h"
|
||||||
|
@ -460,9 +464,8 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
printf("Threading required - compile wolfSSL without SINGLE_THREAED\n");
|
printf("Threading and TLS client and server required - compile wolfSSL without SINGLE_THREAED\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,14 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/options.h>
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
|
#include <wolfssl/options.h>
|
||||||
|
#endif
|
||||||
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#ifndef SINGLE_THREADED
|
#if !defined(SINGLE_THREADED) && !defined(NO_WOLFSSL_CLIENT) && \
|
||||||
|
!defined(NO_WOLFSSL_SERVER)
|
||||||
|
|
||||||
#include "threading.h"
|
#include "threading.h"
|
||||||
#include "certs.h"
|
#include "certs.h"
|
||||||
|
@ -487,7 +491,9 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
printf("Requires threading - compile wolfssl without SINGLE_THREADED\n");
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
printf("Threading and TLS client and server required - compile wolfSSL without SINGLE_THREAED\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue