Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of wolfSSL by
sniffer.h
00001 /* sniffer.h 00002 * 00003 * Copyright (C) 2006-2016 wolfSSL Inc. 00004 * 00005 * This file is part of wolfSSL. 00006 * 00007 * wolfSSL is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * wolfSSL is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 00020 */ 00021 00022 00023 00024 #ifndef WOLFSSL_SNIFFER_H 00025 #define WOLFSSL_SNIFFER_H 00026 00027 #include <wolfssl/wolfcrypt/settings.h> 00028 00029 #ifdef _WIN32 00030 #ifdef SSL_SNIFFER_EXPORTS 00031 #define SSL_SNIFFER_API __declspec(dllexport) 00032 #else 00033 #define SSL_SNIFFER_API __declspec(dllimport) 00034 #endif 00035 #else 00036 #define SSL_SNIFFER_API 00037 #endif /* _WIN32 */ 00038 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif 00043 00044 /* @param typeK: (formerly keyType) was shadowing a global declaration in 00045 * wolfssl/wolfcrypt/asn.h line 175 00046 */ 00047 WOLFSSL_API 00048 SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port, 00049 const char* keyFile, int typeK, 00050 const char* password, char* error); 00051 00052 WOLFSSL_API 00053 SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name, 00054 const char* address, int port, 00055 const char* keyFile, int typeK, 00056 const char* password, char* error); 00057 00058 WOLFSSL_API 00059 SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length, 00060 unsigned char** data, char* error); 00061 00062 WOLFSSL_API 00063 SSL_SNIFFER_API int ssl_FreeDecodeBuffer(unsigned char** data, char* error); 00064 00065 WOLFSSL_API 00066 SSL_SNIFFER_API int ssl_FreeZeroDecodeBuffer(unsigned char** data, int sz, 00067 char* error); 00068 00069 WOLFSSL_API 00070 SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error); 00071 00072 WOLFSSL_API 00073 SSL_SNIFFER_API int ssl_EnableRecovery(int onOff, int maxMemory, char* error); 00074 00075 WOLFSSL_API 00076 SSL_SNIFFER_API int ssl_GetSessionStats(unsigned int* active, 00077 unsigned int* total, 00078 unsigned int* peak, 00079 unsigned int* maxSessions, 00080 unsigned int* missedData, 00081 unsigned int* reassemblyMemory, 00082 char* error); 00083 00084 WOLFSSL_API void ssl_InitSniffer(void); 00085 00086 WOLFSSL_API void ssl_FreeSniffer(void); 00087 00088 00089 /* ssl_SetPrivateKey typeKs */ 00090 enum { 00091 FILETYPE_PEM = 1, 00092 FILETYPE_DER = 2, 00093 }; 00094 00095 00096 #ifdef __cplusplus 00097 } /* extern "C" */ 00098 #endif 00099 00100 #endif /* wolfSSL_SNIFFER_H */ 00101 00102
Generated on Tue Jul 12 2022 23:30:59 by
1.7.2
