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