TLS: small updates to the tls parser

- small updates to the TLS parser after merging Gurvinders TLS work with my work.
remotes/origin/master-1.0.x
Victor Julien 16 years ago
parent 2cfa284999
commit 09dd7889a1

@ -27,10 +27,10 @@
#include "util-byte.h"
#define TLS_CHANGE_CIPHER_SPEC 0x14 /*TLS change cipher spec content type*/
#define TLS_ALERT_PROTOCOL 0x15 /*TLS alert protocol content type */
#define TLS_HANDSHAKE_PROTOCOL 0x16 /*TLS hansdshake protocol content type*/
#define TLS_APPLICATION_PROTOCOL 0x17 /*TLS application protocol content type*/
#define TLS_CHANGE_CIPHER_SPEC 0x14 /**< TLS change cipher spec content type */
#define TLS_ALERT_PROTOCOL 0x15 /**< TLS alert protocol content type */
#define TLS_HANDSHAKE_PROTOCOL 0x16 /**< TLS hansdshake protocol content type */
#define TLS_APPLICATION_PROTOCOL 0x17 /**< TLS application protocol content type */
/**
* \brief Function to store the parsed TLS content type received from the client
@ -715,9 +715,9 @@ static int TLSParserTest04(void) {
goto end;
}
if (tls_state->client_version != 0x0301) {
printf("expected version %04" PRIu16 ", got %04" PRIu16 ": ", 0x0301,
tls_state->client_version);
if (tls_state->client_version != TLS_VERSION_10) {
printf("expected version %04" PRIu16 ", got %04" PRIu16 ": ",
TLS_VERSION_10, tls_state->client_version);
result = 0;
goto end;
}
@ -799,9 +799,9 @@ static int TLSParserTest05(void) {
goto end;
}
if (tls_state->client_version != 0x0301) {
printf("expected version %04" PRIu16 ", got %04" PRIu16 ": ", 0x0301,
tls_state->client_version);
if (tls_state->client_version != TLS_VERSION_10) {
printf("expected version %04" PRIu16 ", got %04" PRIu16 ": ",
TLS_VERSION_10, tls_state->client_version);
result = 0;
goto end;
}
@ -894,9 +894,9 @@ static int TLSParserTest06(void) {
goto end;
}
if (tls_state->client_version != 0x0301) {
printf("expected version %04" PRIu16 ", got %04" PRIu16 ": ", 0x0301,
tls_state->client_version);
if (tls_state->client_version != TLS_VERSION_10) {
printf("expected version %04" PRIu16 ", got %04" PRIu16 ": ",
TLS_VERSION_10, tls_state->client_version);
result = 0;
goto end;
}

@ -1,5 +1,5 @@
#ifndef __APP_LAYER_SSL_H__
#define __APP_LAYER_SSL_H__
#ifndef __APP_LAYER_TLS_H__
#define __APP_LAYER_TLS_H__
#define TLS_FLAG_SERVER_CHANGE_CIPHER_SPEC 0x01 /**< Flag to indicate that
server will now on sends
@ -31,7 +31,6 @@ typedef struct TlsState_ {
uint8_t flags; /**< Flags to indicate the current TLS
sessoin state */
uint8_t records; /**< no of records */
} TlsState;
enum {
@ -45,5 +44,5 @@ enum {
void RegisterTLSParsers(void);
void TLSParserRegisterTests(void);
#endif /* __APP_LAYER_SSL_H__ */
#endif /* __APP_LAYER_TLS_H__ */

Loading…
Cancel
Save