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
callbacks.h
00001 /* callbacks.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_CALLBACKS_H 00025 #define WOLFSSL_CALLBACKS_H 00026 00027 #include <sys/time.h> 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 00034 enum { /* CALLBACK CONTSTANTS */ 00035 MAX_PACKETNAME_SZ = 24, 00036 MAX_CIPHERNAME_SZ = 24, 00037 MAX_TIMEOUT_NAME_SZ = 24, 00038 MAX_PACKETS_HANDSHAKE = 14, /* 12 for client auth plus 2 alerts */ 00039 MAX_VALUE_SZ = 128, /* all handshake packets but Cert should 00040 fit here */ 00041 }; 00042 00043 struct WOLFSSL; 00044 00045 typedef struct handShakeInfo_st { 00046 struct WOLFSSL* ssl; 00047 char cipherName[MAX_CIPHERNAME_SZ + 1]; /* negotiated cipher */ 00048 char packetNames[MAX_PACKETS_HANDSHAKE][MAX_PACKETNAME_SZ + 1]; 00049 /* SSL packet names */ 00050 int numberPackets; /* actual # of packets */ 00051 int negotiationError; /* cipher/parameter err */ 00052 } HandShakeInfo; 00053 00054 00055 typedef struct timeval Timeval; 00056 00057 00058 typedef struct packetInfo_st { 00059 char packetName[MAX_PACKETNAME_SZ + 1]; /* SSL packet name */ 00060 Timeval timestamp; /* when it occurred */ 00061 unsigned char value[MAX_VALUE_SZ]; /* if fits, it's here */ 00062 unsigned char* bufferValue; /* otherwise here (non 0) */ 00063 int valueSz; /* sz of value or buffer */ 00064 } PacketInfo; 00065 00066 00067 typedef struct timeoutInfo_st { 00068 char timeoutName[MAX_TIMEOUT_NAME_SZ + 1]; /* timeout Name */ 00069 int flags; /* for future use */ 00070 int numberPackets; /* actual # of packets */ 00071 PacketInfo packets[MAX_PACKETS_HANDSHAKE]; /* list of all packets */ 00072 Timeval timeoutValue; /* timer that caused it */ 00073 } TimeoutInfo; 00074 00075 00076 00077 #ifdef __cplusplus 00078 } /* extern "C" */ 00079 #endif 00080 00081 00082 #endif /* WOLFSSL_CALLBACKS_H */ 00083 00084
Generated on Tue Jul 12 2022 23:30:54 by
1.7.2
