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.
Dependents: TLS_cyassl TLS_cyassl
callbacks.h
00001 /* callbacks.h 00002 * 00003 * Copyright (C) 2013 wolfSSL Inc. 00004 * 00005 * This file is part of CyaSSL. 00006 * 00007 * CyaSSL 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 * CyaSSL 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00020 */ 00021 00022 00023 #ifndef CYASSL_CALLBACKS_H 00024 #define CYASSL_CALLBACKS_H 00025 00026 #include <time.h> 00027 #include "sockets.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 00044 typedef struct handShakeInfo_st { 00045 char cipherName[MAX_CIPHERNAME_SZ + 1]; /* negotiated cipher */ 00046 char packetNames[MAX_PACKETS_HANDSHAKE][MAX_PACKETNAME_SZ + 1]; 00047 /* SSL packet names */ 00048 int numberPackets; /* actual # of packets */ 00049 int negotiationError; /* cipher/parameter err */ 00050 } HandShakeInfo; 00051 00052 00053 typedef struct timeval Timeval; 00054 00055 00056 typedef struct packetInfo_st { 00057 char packetName[MAX_PACKETNAME_SZ + 1]; /* SSL packet name */ 00058 Timeval timestamp; /* when it occured */ 00059 unsigned char value[MAX_VALUE_SZ]; /* if fits, it's here */ 00060 unsigned char* bufferValue; /* otherwise here (non 0) */ 00061 int valueSz; /* sz of value or buffer */ 00062 } PacketInfo; 00063 00064 00065 typedef struct timeoutInfo_st { 00066 char timeoutName[MAX_TIMEOUT_NAME_SZ + 1]; /* timeout Name */ 00067 int flags; /* for future use */ 00068 int numberPackets; /* actual # of packets */ 00069 PacketInfo packets[MAX_PACKETS_HANDSHAKE]; /* list of all packets */ 00070 Timeval timeoutValue; /* timer that caused it */ 00071 } TimeoutInfo; 00072 00073 00074 00075 #ifdef __cplusplus 00076 } /* extern "C" */ 00077 #endif 00078 00079 00080 #endif /* CYASSL_CALLBACKS_H */ 00081
Generated on Thu Jul 14 2022 20:26:02 by
1.7.2