wolfSSL SSL/TLS library, support up to TLS1.3

Dependents:   CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more

Committer:
wolfSSL
Date:
Sat Aug 18 22:20:43 2018 +0000
Revision:
15:117db924cf7c
Child:
16:8e0d178b1d1e
wolfSSL 3.15.3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wolfSSL 15:117db924cf7c 1 /* sniffer.h
wolfSSL 15:117db924cf7c 2 *
wolfSSL 15:117db924cf7c 3 * Copyright (C) 2006-2017 wolfSSL Inc.
wolfSSL 15:117db924cf7c 4 *
wolfSSL 15:117db924cf7c 5 * This file is part of wolfSSL.
wolfSSL 15:117db924cf7c 6 *
wolfSSL 15:117db924cf7c 7 * wolfSSL is free software; you can redistribute it and/or modify
wolfSSL 15:117db924cf7c 8 * it under the terms of the GNU General Public License as published by
wolfSSL 15:117db924cf7c 9 * the Free Software Foundation; either version 2 of the License, or
wolfSSL 15:117db924cf7c 10 * (at your option) any later version.
wolfSSL 15:117db924cf7c 11 *
wolfSSL 15:117db924cf7c 12 * wolfSSL is distributed in the hope that it will be useful,
wolfSSL 15:117db924cf7c 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
wolfSSL 15:117db924cf7c 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
wolfSSL 15:117db924cf7c 15 * GNU General Public License for more details.
wolfSSL 15:117db924cf7c 16 *
wolfSSL 15:117db924cf7c 17 * You should have received a copy of the GNU General Public License
wolfSSL 15:117db924cf7c 18 * along with this program; if not, write to the Free Software
wolfSSL 15:117db924cf7c 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
wolfSSL 15:117db924cf7c 20 */
wolfSSL 15:117db924cf7c 21
wolfSSL 15:117db924cf7c 22
wolfSSL 15:117db924cf7c 23
wolfSSL 15:117db924cf7c 24 #ifndef WOLFSSL_SNIFFER_H
wolfSSL 15:117db924cf7c 25 #define WOLFSSL_SNIFFER_H
wolfSSL 15:117db924cf7c 26
wolfSSL 15:117db924cf7c 27 #include <wolfssl/wolfcrypt/settings.h>
wolfSSL 15:117db924cf7c 28
wolfSSL 15:117db924cf7c 29 #ifdef _WIN32
wolfSSL 15:117db924cf7c 30 #ifdef SSL_SNIFFER_EXPORTS
wolfSSL 15:117db924cf7c 31 #define SSL_SNIFFER_API __declspec(dllexport)
wolfSSL 15:117db924cf7c 32 #else
wolfSSL 15:117db924cf7c 33 #define SSL_SNIFFER_API __declspec(dllimport)
wolfSSL 15:117db924cf7c 34 #endif
wolfSSL 15:117db924cf7c 35 #else
wolfSSL 15:117db924cf7c 36 #define SSL_SNIFFER_API
wolfSSL 15:117db924cf7c 37 #endif /* _WIN32 */
wolfSSL 15:117db924cf7c 38
wolfSSL 15:117db924cf7c 39
wolfSSL 15:117db924cf7c 40 #ifdef __cplusplus
wolfSSL 15:117db924cf7c 41 extern "C" {
wolfSSL 15:117db924cf7c 42 #endif
wolfSSL 15:117db924cf7c 43
wolfSSL 15:117db924cf7c 44 /* @param typeK: (formerly keyType) was shadowing a global declaration in
wolfSSL 15:117db924cf7c 45 * wolfssl/wolfcrypt/asn.h line 175
wolfSSL 15:117db924cf7c 46 */
wolfSSL 15:117db924cf7c 47 WOLFSSL_API
wolfSSL 15:117db924cf7c 48 SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port,
wolfSSL 15:117db924cf7c 49 const char* keyFile, int typeK,
wolfSSL 15:117db924cf7c 50 const char* password, char* error);
wolfSSL 15:117db924cf7c 51
wolfSSL 15:117db924cf7c 52 WOLFSSL_API
wolfSSL 15:117db924cf7c 53 SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name,
wolfSSL 15:117db924cf7c 54 const char* address, int port,
wolfSSL 15:117db924cf7c 55 const char* keyFile, int typeK,
wolfSSL 15:117db924cf7c 56 const char* password, char* error);
wolfSSL 15:117db924cf7c 57
wolfSSL 15:117db924cf7c 58 WOLFSSL_API
wolfSSL 15:117db924cf7c 59 SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
wolfSSL 15:117db924cf7c 60 unsigned char** data, char* error);
wolfSSL 15:117db924cf7c 61
wolfSSL 15:117db924cf7c 62 WOLFSSL_API
wolfSSL 15:117db924cf7c 63 SSL_SNIFFER_API int ssl_FreeDecodeBuffer(unsigned char** data, char* error);
wolfSSL 15:117db924cf7c 64
wolfSSL 15:117db924cf7c 65 WOLFSSL_API
wolfSSL 15:117db924cf7c 66 SSL_SNIFFER_API int ssl_FreeZeroDecodeBuffer(unsigned char** data, int sz,
wolfSSL 15:117db924cf7c 67 char* error);
wolfSSL 15:117db924cf7c 68
wolfSSL 15:117db924cf7c 69 WOLFSSL_API
wolfSSL 15:117db924cf7c 70 SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error);
wolfSSL 15:117db924cf7c 71
wolfSSL 15:117db924cf7c 72 WOLFSSL_API
wolfSSL 15:117db924cf7c 73 SSL_SNIFFER_API int ssl_EnableRecovery(int onOff, int maxMemory, char* error);
wolfSSL 15:117db924cf7c 74
wolfSSL 15:117db924cf7c 75 WOLFSSL_API
wolfSSL 15:117db924cf7c 76 SSL_SNIFFER_API int ssl_GetSessionStats(unsigned int* active,
wolfSSL 15:117db924cf7c 77 unsigned int* total,
wolfSSL 15:117db924cf7c 78 unsigned int* peak,
wolfSSL 15:117db924cf7c 79 unsigned int* maxSessions,
wolfSSL 15:117db924cf7c 80 unsigned int* missedData,
wolfSSL 15:117db924cf7c 81 unsigned int* reassemblyMemory,
wolfSSL 15:117db924cf7c 82 char* error);
wolfSSL 15:117db924cf7c 83
wolfSSL 15:117db924cf7c 84 WOLFSSL_API void ssl_InitSniffer(void);
wolfSSL 15:117db924cf7c 85
wolfSSL 15:117db924cf7c 86 WOLFSSL_API void ssl_FreeSniffer(void);
wolfSSL 15:117db924cf7c 87
wolfSSL 15:117db924cf7c 88
wolfSSL 15:117db924cf7c 89 /* ssl_SetPrivateKey typeKs */
wolfSSL 15:117db924cf7c 90 enum {
wolfSSL 15:117db924cf7c 91 FILETYPE_PEM = 1,
wolfSSL 15:117db924cf7c 92 FILETYPE_DER = 2,
wolfSSL 15:117db924cf7c 93 };
wolfSSL 15:117db924cf7c 94
wolfSSL 15:117db924cf7c 95
wolfSSL 15:117db924cf7c 96 #ifdef __cplusplus
wolfSSL 15:117db924cf7c 97 } /* extern "C" */
wolfSSL 15:117db924cf7c 98 #endif
wolfSSL 15:117db924cf7c 99
wolfSSL 15:117db924cf7c 100 #endif /* wolfSSL_SNIFFER_H */
wolfSSL 15:117db924cf7c 101
wolfSSL 15:117db924cf7c 102