diff --git a/FILES b/FILES deleted file mode 100644 index a072604..0000000 --- a/FILES +++ /dev/null @@ -1,9 +0,0 @@ -record-fmt.txt -record_analyze.c -record_analyze.h -targets.mk - -CVS: -Entries -Repository -Root diff --git a/ssl/Attic/ciphersuites.h b/ssl/Attic/ciphersuites.h deleted file mode 100644 index 74fe097..0000000 --- a/ssl/Attic/ciphersuites.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - ciphersuites.h - - - Copyright (C) 1999-2000 RTFM, Inc. - All Rights Reserved - - This package is a SSLv3/TLS protocol analyzer written by Eric Rescorla - and licensed by RTFM, Inc. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - - This product includes software developed by Eric Rescorla for - RTFM, Inc. - - 4. Neither the name of RTFM, Inc. nor the name of Eric Rescorla may be - used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY ERIC RESCORLA AND RTFM, INC. ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMAGE. - - $Id: ciphersuites.h,v 1.2 2000/10/17 16:10:01 ekr Exp $ - - - ekr@rtfm.com Sat Sep 23 18:01:27 2000 - */ - - -#ifndef _ciphersuites_h -#define _ciphersuites_h - -int ssl_find_cipher PROTO_LIST((int num,SSL_CipherSuite **cs)); -#endif - diff --git a/ssl/Attic/lex.yy.c b/ssl/Attic/lex.yy.c deleted file mode 100644 index e0d141d..0000000 --- a/ssl/Attic/lex.yy.c +++ /dev/null @@ -1,1783 +0,0 @@ -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header: /usr/local/CVS/ssldump/ssl/lex.yy.c,v 1.2 2002/04/15 16:53:59 ekr Exp $ - * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - -#define YY_USES_REJECT -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern int yylineno; -int yylineno = 1; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 32 -#define YY_END_OF_BUFFER 33 -static yyconst short int yy_acclist[153] = - { 0, - 33, 31, 32, 12, 31, 32, 12, 32, 18, 31, - 32, 19, 31, 32, 26, 31, 32, 29, 31, 32, - 27, 31, 32, 31, 32, 14, 31, 32, 14, 31, - 32, 25, 31, 32, 24, 31, 32, 22, 31, 32, - 30, 31, 32, 23, 31, 32, 31, 32, 20, 31, - 32, 21, 31, 32, 28, 31, 32, 31, 32, 31, - 32, 31, 32, 31, 32, 31, 32, 31, 32, 16, - 31, 32, 17, 31, 32, 12, 1, 14, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 15, 13, 13, - 13, 13, 13, 13, 13, 13, 10, 9, 13, 13, - - 13, 2, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 11, 13, 13, 4, 13, 13, 5, - 13, 3, 13, 13, 13, 13, 6, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 7, 13, 13, 13, 13, 13, - 8, 13 - } ; - -static yyconst short int yy_accept[110] = - { 0, - 1, 1, 1, 2, 4, 7, 9, 12, 15, 18, - 21, 24, 26, 29, 32, 35, 38, 41, 44, 47, - 49, 52, 55, 58, 60, 62, 64, 66, 68, 70, - 73, 76, 77, 78, 78, 79, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 88, 88, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 97, 98, - 100, 101, 102, 104, 105, 106, 107, 108, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 119, 120, - 122, 124, 125, 126, 127, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - - 144, 145, 147, 148, 149, 150, 151, 153, 153 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, - 5, 6, 1, 7, 8, 9, 10, 11, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 13, 14, 15, - 16, 17, 1, 18, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 20, 1, 21, 22, 23, 1, 24, 25, 26, 27, - - 28, 19, 29, 19, 30, 19, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 19, 19, 42, - 43, 19, 44, 1, 45, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[46] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 4, 4, 1, 1, 1, 1, 1, 5, 4, 1, - 1, 1, 2, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1 - } ; - -static yyconst short int yy_base[113] = - { 0, - 0, 0, 141, 142, 44, 46, 142, 142, 142, 142, - 131, 133, 39, 41, 142, 142, 142, 142, 142, 0, - 142, 142, 142, 30, 108, 103, 100, 94, 27, 116, - 142, 54, 142, 127, 47, 0, 0, 93, 97, 101, - 88, 104, 102, 94, 87, 0, 118, 54, 0, 95, - 83, 91, 87, 82, 86, 89, 75, 97, 142, 0, - 74, 73, 0, 71, 81, 84, 83, 63, 83, 82, - 77, 78, 63, 62, 142, 67, 68, 0, 91, 0, - 0, 58, 65, 65, 0, 52, 66, 79, 40, 41, - 71, 48, 49, 47, 41, 40, 47, 44, 33, 43, - - 26, 0, 32, 26, 35, 35, 0, 142, 80, 84, - 57, 89 - } ; - -static yyconst short int yy_def[113] = - { 0, - 108, 1, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 109, - 108, 108, 108, 109, 109, 109, 109, 109, 109, 108, - 108, 108, 108, 110, 108, 111, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 112, 110, 110, 111, 109, - 109, 109, 109, 109, 109, 109, 109, 112, 108, 109, - 109, 109, 109, 109, 109, 109, 109, 108, 109, 109, - 109, 109, 109, 109, 108, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - - 109, 109, 109, 109, 109, 109, 109, 0, 108, 108, - 108, 108 - } ; - -static yyconst short int yy_nxt[188] = - { 0, - 4, 5, 6, 7, 8, 4, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 4, 20, 21, - 22, 23, 4, 20, 20, 24, 25, 26, 20, 20, - 20, 20, 20, 20, 27, 28, 20, 20, 29, 20, - 20, 20, 20, 30, 31, 32, 32, 32, 32, 35, - 35, 35, 35, 38, 44, 32, 32, 35, 35, 48, - 49, 107, 106, 59, 39, 105, 45, 104, 103, 102, - 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, - 36, 37, 91, 37, 47, 47, 90, 47, 47, 58, - 58, 58, 58, 89, 88, 87, 86, 85, 84, 83, - - 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, - 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, - 62, 61, 60, 48, 57, 56, 55, 54, 53, 52, - 51, 50, 48, 46, 43, 42, 41, 40, 34, 33, - 108, 3, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108 - } ; - -static yyconst short int yy_chk[188] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 5, 6, 6, 13, - 13, 14, 14, 24, 29, 32, 32, 35, 35, 48, - 111, 106, 105, 48, 24, 104, 29, 103, 101, 100, - 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, - 13, 109, 89, 109, 110, 110, 88, 110, 110, 112, - 112, 112, 112, 87, 86, 84, 83, 82, 79, 77, - - 76, 74, 73, 72, 71, 70, 69, 68, 67, 66, - 65, 64, 62, 61, 58, 57, 56, 55, 54, 53, - 52, 51, 50, 47, 45, 44, 43, 42, 41, 40, - 39, 38, 34, 30, 28, 27, 26, 25, 12, 11, - 3, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108 - } ; - -static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; -static char *yy_full_match; -static int yy_lp; -#define REJECT \ -{ \ -*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ -yy_cp = yy_full_match; /* restore poss. backed-over text */ \ -++yy_lp; \ -goto find_rule; \ -} -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "ssl.l" -#define INITIAL 0 -#line 4 "ssl.l" -#include "y.tab.h" - -#if 0 -#define RETURN(x) printf("TOK:%s\n",#x); return(x) -#else -#define RETURN return -#endif - -long strtol(); -#line 479 "lex.yy.c" - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 23 "ssl.l" - - -#line 633 "lex.yy.c" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 109 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 142 ); - -yy_find_action: - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; -find_rule: /* we branch to this label when backing up */ - for ( ; ; ) /* until we find what rule we matched */ - { - if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) - { - yy_act = yy_acclist[yy_lp]; - { - yy_full_match = yy_cp; - break; - } - } - --yy_cp; - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - if ( yy_act != YY_END_OF_BUFFER ) - { - int yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - ++yylineno; - } - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -YY_RULE_SETUP -#line 25 "ssl.l" -{RETURN(DOT_DOT_);} - YY_BREAK -case 2: -YY_RULE_SETUP -#line 26 "ssl.l" -{RETURN(ENUM_);} - YY_BREAK -case 3: -YY_RULE_SETUP -#line 27 "ssl.l" -{RETURN(STRUCT_);} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 28 "ssl.l" -{mkname();RETURN(OPAQUE_);} - YY_BREAK -case 5: -YY_RULE_SETUP -#line 29 "ssl.l" -{RETURN(SELECT_);} - YY_BREAK -case 6: -YY_RULE_SETUP -#line 30 "ssl.l" -{RETURN(CONSTANT_);} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 31 "ssl.l" -{/* Do nothing*/} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 32 "ssl.l" -{/* Do nothing*/} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 33 "ssl.l" -{RETURN(CASE_);} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 34 "ssl.l" -{ /*Do nothing*/} - YY_BREAK -case 11: -YY_RULE_SETUP -#line 35 "ssl.l" -{ strcpy(yylval.str,yytext); RETURN(CODE_);} - YY_BREAK -case 12: -YY_RULE_SETUP -#line 37 "ssl.l" -{/*do nothing*/} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 38 "ssl.l" -{mkname();RETURN(NAME_);} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 39 "ssl.l" -{yylval.val=atoi(yytext); RETURN(NUM_);} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 40 "ssl.l" -{yylval.val=strtol(yytext,0,16); RETURN(NUM_);} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 41 "ssl.l" -{ RETURN('{'); } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 42 "ssl.l" -{ RETURN('}'); } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 43 "ssl.l" -{ RETURN('('); } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 44 "ssl.l" -{ RETURN(')'); } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 45 "ssl.l" -{ RETURN('['); } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 46 "ssl.l" -{ RETURN(']'); } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 47 "ssl.l" -{ RETURN('<'); } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 48 "ssl.l" -{ RETURN('>'); } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 49 "ssl.l" -{ RETURN(';'); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 50 "ssl.l" -{ RETURN(':'); } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 51 "ssl.l" -{ RETURN(','); } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 52 "ssl.l" -{ RETURN('.'); } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 53 "ssl.l" -{ RETURN('^'); } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 54 "ssl.l" -{ RETURN('-'); } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 55 "ssl.l" -{ RETURN('='); } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 56 "ssl.l" -{ fprintf(stderr,"Invalid input token: %s at %d!!!\n",yytext,yylineno); - exit(1); - } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 60 "ssl.l" -ECHO; - YY_BREAK -#line 886 "lex.yy.c" - case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int -yy_get_next_buffer (void) - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type -yy_get_previous_state (void) - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 109 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - - register YY_CHAR yy_c = 1; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 109 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 108); - if ( ! yy_is_jam ) - *yy_state_ptr++ = yy_current_state; - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - if ( c == '\n' ) - --yylineno; - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - if ( c == '\n' ) - ++yylineno; - - return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void -yy_pop_state (void) - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int -yy_top_state (void) - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } - -#if YY_MAIN -int -main (void) - { - yylex(); - return 0; - } -#endif -#line 60 "ssl.l" - -int -mkname (void) -{ -#if 0 -printf("%s\n",yytext); -#endif -strcpy(yylval.str,yytext); -} diff --git a/ssl/Attic/main.c b/ssl/Attic/main.c deleted file mode 100644 index db9008c..0000000 --- a/ssl/Attic/main.c +++ /dev/null @@ -1,98 +0,0 @@ -/** - main.c - - - Copyright (C) 1999-2000 RTFM, Inc. - All Rights Reserved - - This package is a SSLv3/TLS protocol analyzer written by Eric Rescorla - and licensed by RTFM, Inc. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - - This product includes software developed by Eric Rescorla for - RTFM, Inc. - - 4. Neither the name of RTFM, Inc. nor the name of Eric Rescorla may be - used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY ERIC RESCORLA AND RTFM, INC. ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMAGE. - - $Id: main.c,v 1.2 2000/10/17 16:10:01 ekr Exp $ - - - ekr@rtfm.com Mon Jan 18 16:28:43 1999 - */ - - - -#include -#include - -extern int yydebug; - -FILE *doth,*dotc; - -int verr_exit(char *fmt,...) - { - va_list ap; - - va_start(ap,fmt); - vfprintf(stderr,fmt,ap); - exit(1); - } - - -int -main (int argc, char **argv) - { - char name[100]; - FILE *in; - - if(!(in=freopen(argv[1],"r",stdin))) - verr_exit("Couldn't open input file %s\n",argv[1]); - - sprintf(name,"%s.c",argv[1]); - dotc=fopen(name,"w"); - sprintf(name,"%s.h",argv[1]); - doth=fopen(name,"w"); - - fprintf(dotc,"#include \"network.h\"\n#include \"ssl_h.h\"\n#include \"sslprint.h\"\n#include \"sslxprint.h\"\n#ifdef OPENSSL\n#include \n#endif\n"); - fprintf(dotc,"#include \"%s\"\n",name); - - yyparse(); - } - - -extern int yylineno; - -int -yywrap (void) -{ -;} - -int -yyerror (char *s) - { - printf("Parse error %s at line %d\n",s,yylineno); - exit(1); - } diff --git a/ssl/Attic/ssl.enums b/ssl/Attic/ssl.enums deleted file mode 100644 index 12fada8..0000000 --- a/ssl/Attic/ssl.enums +++ /dev/null @@ -1,749 +0,0 @@ - select { - ChangeCipherSpec(20) -{@ - ssl_process_change_cipher_spec(ssl,ssl->decoder,dir); - - if(dir==DIR_I2R){ - ssl->i_state=SSL_ST_SENT_CHANGE_CIPHER_SPEC; - } - else{ - ssl->r_state=SSL_ST_SENT_CHANGE_CIPHER_SPEC; - } - - printf("\n"); - return(0); -@} -, Alert(21) -{@ - int r; - - if(ssl->record_encryption==REC_CIPHERTEXT){ - printf("\n"); - return(0); - } - - if(data->len!=2){ - fprintf(stderr,"Wrong length for alert message: %d\n", - data->len); - ERETURN(R_EOD); - } - - P_(P_HL){ - printf("\n"); - SSL_DECODE_ENUM(ssl,"level",1,AlertLevel_decoder,P_HL,data,0); - printf("\n"); - SSL_DECODE_ENUM(ssl,"value",1,AlertDescription_decoder,P_HL,data,0); - printf("\n"); - } - else { - SSL_DECODE_ENUM(ssl,0,1,AlertLevel_decoder,SSL_PRINT_ALL,data,0); - SSL_DECODE_ENUM(ssl,0,1,AlertDescription_decoder,SSL_PRINT_ALL,data,0); - printf("\n"); - } - return(0); - -@}, - Handshake(22) -{@ - extern decoder HandshakeType_decoder[]; - int r; - UINT4 t,l; - int rs=0; - Data d; - - if(ssl->record_encryption==REC_CIPHERTEXT){ - printf("\n"); - return(0); - } - - while(data->len>0){ - SSL_DECODE_UINT8(ssl,0,0,data,&t); - SSL_DECODE_UINT24(ssl,0,0,data,&l); - - if(data->lenlen); - ERETURN(R_EOD); - } - - d.data=data->data; - d.len=l; - data->len-=l; - data->data+=l; - P_(P_HL){ - if(!rs){ - printf("\n"); - rs=1; - } - } - ssl_decode_switch(ssl,HandshakeType_decoder,t,dir,seg,&d); - } - return(0); -@}, - application_data(23) -{@ - int r; - Data d; - - SSL_DECODE_OPAQUE_ARRAY(ssl,"data",data->len,0,data,&d); - - P_(P_AD){ - print_data(ssl,&d); - } - else { - printf("\n"); - } - return(0); -@} -, (255) - } ContentType; - - select { - HelloRequest(0) -{@ - printf("\n"); -@}, -ClientHello(1) -{@ - UINT4 vj,vn,cs,cslen,complen,comp; - Data session_id,random; - int r; - - extern decoder cipher_suite_decoder[]; - extern decoder compression_method_decoder[]; - - printf("\n"); - SSL_DECODE_UINT8(ssl,0,0,data,&vj); - SSL_DECODE_UINT8(ssl,0,0,data,&vn); - - P_(P_HL) {explain(ssl,"Version %d.%d ",vj,vn); - printf("\n"); - } - - SSL_DECODE_OPAQUE_ARRAY(ssl,"random",32,P_ND,data,&random); - ssl_set_client_random(ssl->decoder,random.data,random.len); - - SSL_DECODE_OPAQUE_ARRAY(ssl,"session_id",-32,0,data,&session_id); - ssl_set_client_session_id(ssl->decoder,session_id.data,session_id.len); - - P_(P_HL){ - if(session_id.len) - exdump(ssl,"resume ",&session_id); - } - - P_(P_HL){ - SSL_DECODE_UINT16(ssl,"cipher Suites len",0,data,&cslen); - explain(ssl,"cipher suites\n"); - - for(;cslen;cslen-=2){ - ssl_decode_enum(ssl,0,2,cipher_suite_decoder, - 0,data,&cs); - ssl_print_cipher_suite(ssl,(vj<<8)|vn,P_HL,cs); - printf("\n"); - } - } - - SSL_DECODE_UINT8(ssl,"compressionMethod len",0,data,&complen); - if(complen){ - explain(ssl,"compression methods\n"); - for(;complen;complen--){ - SSL_DECODE_ENUM(ssl,0,1,compression_method_decoder,P_HL,data,&comp); - printf("\n"); - } - } - return(0); -@}, - ServerHello(2) -{@ - int r; - Data rnd,session_id; - UINT4 vj,vn; - printf("\n"); - SSL_DECODE_UINT8(ssl,0,0,data,&vj); - SSL_DECODE_UINT8(ssl,0,0,data,&vn); - - ssl->version=vj*256+vn; - P_(P_HL) {explain(ssl,"Version %d.%d ",vj,vn); - printf("\n"); - } - - - SSL_DECODE_OPAQUE_ARRAY(ssl,"random",32,P_ND,data,&rnd); - ssl_set_server_random(ssl->decoder,rnd.data,rnd.len); - SSL_DECODE_OPAQUE_ARRAY(ssl,"session_id",-32,P_HL,data,&session_id); - SSL_DECODE_ENUM(ssl,"cipherSuite",2,cipher_suite_decoder, - 0,data,&ssl->cipher_suite); - P_(P_HL){ - explain(ssl,"cipherSuite "); - ssl_print_cipher_suite(ssl,ssl->version,P_HL,ssl->cipher_suite); - } - ssl_find_cipher(ssl->cipher_suite,&ssl->cs); - - ssl_process_server_session_id(ssl,ssl->decoder,session_id.data, - session_id.len); - - P_(P_HL) printf("\n"); - SSL_DECODE_ENUM(ssl,"compressionMethod",1,compression_method_decoder,P_HL,data,0); - P_(P_HL) printf("\n"); - return(0); -@}, -Certificate(11) -{@ - UINT4 len; - Data cert; - int r; - - printf("\n"); - SSL_DECODE_UINT24(ssl,"certificates len",0,data,&len); - - while(len){ - SSL_DECODE_OPAQUE_ARRAY(ssl,"certificate",-((1<<23)-1), - 0,data,&cert); - sslx_print_certificate(ssl,&cert,P_ND); - len-=(cert.len + 3); - } - - return(0); -@}, -ServerKeyExchange (12) -{@ - int r; - - printf("\n"); - - if(ssl->cs){ - P_(P_ND){ - explain(ssl,"params\n"); - } - INDENT_INCR; - - switch(ssl->cs->kex){ - case KEX_DH: - SSL_DECODE_OPAQUE_ARRAY(ssl,"DH_p",-((1<<15)-1),P_ND,data,0); - SSL_DECODE_OPAQUE_ARRAY(ssl,"DH_g",-((1<<15)-1),P_ND,data,0); - SSL_DECODE_OPAQUE_ARRAY(ssl,"DH_Ys",-((1<<15)-1),P_ND,data,0); - break; - case KEX_RSA: - SSL_DECODE_OPAQUE_ARRAY(ssl,"RSA_modulus",-((1<<15)-1),P_ND,data,0); - SSL_DECODE_OPAQUE_ARRAY(ssl,"RSA_exponent",-((1<<15)-1),P_ND,data,0); - break; - } - INDENT_POP; - SSL_DECODE_OPAQUE_ARRAY(ssl,"signature",-((1<<15)-1),P_ND,data,0); - } - - return(0); -@} -, -CertificateRequest(13) -{@ - UINT4 len; - Data ca; - int r; - - printf("\n"); - SSL_DECODE_UINT8(ssl,"certificate_types len",0,data,&len); - for(;len;len--){ - SSL_DECODE_ENUM(ssl,"certificate_types",1, - client_certificate_type_decoder, P_HL,data,0); - P_(P_HL){ - printf("\n"); - } - }; - - SSL_DECODE_UINT16(ssl,"certificate_authorities len",0,data,&len); - while(len){ - SSL_DECODE_OPAQUE_ARRAY(ssl,"certificate_authorities", - -((1<<15)-1),0,data,&ca); - explain(ssl,"certificate_authority\n"); - INDENT_INCR; - sslx_print_dn(ssl,&ca,P_HL); - INDENT_POP; - len-=(ca.len + 2); - } - return(0); -@} -, ServerHelloDone(14) -{@ - printf("\n"); -@}, -CertificateVerify(15) -{@ - int r; - printf("\n"); - SSL_DECODE_OPAQUE_ARRAY(ssl,"Signature",-(1<<15-1),P_HL,data,0); - return(0); -@} -, -ClientKeyExchange(16) -{@ - int r; - Data pms; - - printf("\n"); - if(ssl->cs){ - switch(ssl->cs->kex){ - - case KEX_RSA: - if(ssl->version > 768) { - SSL_DECODE_OPAQUE_ARRAY(ssl,"EncryptedPreMasterSecret",-(1<<15-1), - P_ND,data,&pms); - - } - else { - SSL_DECODE_OPAQUE_ARRAY(ssl,"EncryptedPreMasterSecret",data->len,P_ND,data,&pms); - } - ssl_process_client_key_exchange(ssl, - ssl->decoder,pms.data,pms.len); - - break; - case KEX_DH: - SSL_DECODE_OPAQUE_ARRAY(ssl,"DiffieHellmanClientPublicValue", - -(1<<15-1),P_HL,data,0); - } - } - return(0); -@} -, - Finished(20) -{@ - int r; - - printf("\n"); - switch(ssl->version){ - case 0x300: - SSL_DECODE_OPAQUE_ARRAY(ssl,"md5_hash",16,P_ND,data,0); - - SSL_DECODE_OPAQUE_ARRAY(ssl,"sha_hash",20,P_ND,data,0); - break; - case 0x301: - SSL_DECODE_OPAQUE_ARRAY(ssl,"verify_data",12,P_ND,data,0); - P_(P_ND) - printf("\n"); - break; - } - - return (0); -@} -, (255) - } HandshakeType; - - constant { - // https://www.iana.org/assignments/tls-parameters/tls-parameters.txt - CipherSuite TLS_NULL_WITH_NULL_NULL = { 0x00,0x00 }; - CipherSuite TLS_RSA_WITH_NULL_MD5 = { 0x00,0x01 }; - CipherSuite TLS_RSA_WITH_NULL_SHA = { 0x00,0x02 }; - CipherSuite TLS_RSA_EXPORT_WITH_RC4_40_MD5 = { 0x00,0x03 }; - CipherSuite TLS_RSA_WITH_RC4_128_MD5 = { 0x00,0x04 }; - CipherSuite TLS_RSA_WITH_RC4_128_SHA = { 0x00,0x05 }; - CipherSuite TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = { 0x00,0x06 }; - CipherSuite TLS_RSA_WITH_IDEA_CBC_SHA = { 0x00,0x07 }; - CipherSuite TLS_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x08 }; - CipherSuite TLS_RSA_WITH_DES_CBC_SHA = { 0x00,0x09 }; - CipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x0A }; - CipherSuite TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x0B }; - CipherSuite TLS_DH_DSS_WITH_DES_CBC_SHA = { 0x00,0x0C }; - CipherSuite TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x0D }; - CipherSuite TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x0E }; - CipherSuite TLS_DH_RSA_WITH_DES_CBC_SHA = { 0x00,0x0F }; - CipherSuite TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x10 }; - CipherSuite TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x11 }; - CipherSuite TLS_DHE_DSS_WITH_DES_CBC_SHA = { 0x00,0x12 }; - CipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x13 }; - CipherSuite TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x14 }; - CipherSuite TLS_DHE_RSA_WITH_DES_CBC_SHA = { 0x00,0x15 }; - CipherSuite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x16 }; - CipherSuite TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 = { 0x00,0x17 }; - CipherSuite TLS_DH_anon_WITH_RC4_128_MD5 = { 0x00,0x18 }; - CipherSuite TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x19 }; - CipherSuite TLS_DH_anon_WITH_DES_CBC_SHA = { 0x00,0x1A }; - CipherSuite TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = { 0x00,0x1B }; - CipherSuite TLS_KRB5_WITH_DES_CBC_SHA = { 0x00,0x1E }; - CipherSuite TLS_KRB5_WITH_3DES_EDE_CBC_SHA = { 0x00,0x1F }; - CipherSuite TLS_KRB5_WITH_RC4_128_SHA = { 0x00,0x20 }; - CipherSuite TLS_KRB5_WITH_IDEA_CBC_SHA = { 0x00,0x21 }; - CipherSuite TLS_KRB5_WITH_DES_CBC_MD5 = { 0x00,0x22 }; - CipherSuite TLS_KRB5_WITH_3DES_EDE_CBC_MD5 = { 0x00,0x23 }; - CipherSuite TLS_KRB5_WITH_RC4_128_MD5 = { 0x00,0x24 }; - CipherSuite TLS_KRB5_WITH_IDEA_CBC_MD5 = { 0x00,0x25 }; - CipherSuite TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA = { 0x00,0x26 }; - CipherSuite TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA = { 0x00,0x27 }; - CipherSuite TLS_KRB5_EXPORT_WITH_RC4_40_SHA = { 0x00,0x28 }; - CipherSuite TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 = { 0x00,0x29 }; - CipherSuite TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 = { 0x00,0x2A }; - CipherSuite TLS_KRB5_EXPORT_WITH_RC4_40_MD5 = { 0x00,0x2B }; - CipherSuite TLS_PSK_WITH_NULL_SHA = { 0x00,0x2C }; - CipherSuite TLS_DHE_PSK_WITH_NULL_SHA = { 0x00,0x2D }; - CipherSuite TLS_RSA_PSK_WITH_NULL_SHA = { 0x00,0x2E }; - CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x2F }; - CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA = { 0x00,0x30 }; - CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x31 }; - CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = { 0x00,0x32 }; - CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x33 }; - CipherSuite TLS_DH_anon_WITH_AES_128_CBC_SHA = { 0x00,0x34 }; - CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x35 }; - CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA = { 0x00,0x36 }; - CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x37 }; - CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = { 0x00,0x38 }; - CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x39 }; - CipherSuite TLS_DH_anon_WITH_AES_256_CBC_SHA = { 0x00,0x3A }; - CipherSuite TLS_RSA_WITH_NULL_SHA256 = { 0x00,0x3B }; - CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = { 0x00,0x3C }; - CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = { 0x00,0x3D }; - CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = { 0x00,0x3E }; - CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = { 0x00,0x3F }; - CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = { 0x00,0x40 }; - CipherSuite TLS_RSA_WITH_CAMELLIA_128_CBC_SHA = { 0x00,0x41 }; - CipherSuite TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA = { 0x00,0x42 }; - CipherSuite TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA = { 0x00,0x43 }; - CipherSuite TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA = { 0x00,0x44 }; - CipherSuite TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA = { 0x00,0x45 }; - CipherSuite TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA = { 0x00,0x46 }; - CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = { 0x00,0x67 }; - CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = { 0x00,0x68 }; - CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = { 0x00,0x69 }; - CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = { 0x00,0x6A }; - CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = { 0x00,0x6B }; - CipherSuite TLS_DH_anon_WITH_AES_128_CBC_SHA256 = { 0x00,0x6C }; - CipherSuite TLS_DH_anon_WITH_AES_256_CBC_SHA256 = { 0x00,0x6D }; - CipherSuite TLS_RSA_WITH_CAMELLIA_256_CBC_SHA = { 0x00,0x84 }; - CipherSuite TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA = { 0x00,0x85 }; - CipherSuite TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA = { 0x00,0x86 }; - CipherSuite TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA = { 0x00,0x87 }; - CipherSuite TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA = { 0x00,0x88 }; - CipherSuite TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA = { 0x00,0x89 }; - CipherSuite TLS_PSK_WITH_RC4_128_SHA = { 0x00,0x8A }; - CipherSuite TLS_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00,0x8B }; - CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA = { 0x00,0x8C }; - CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA = { 0x00,0x8D }; - CipherSuite TLS_DHE_PSK_WITH_RC4_128_SHA = { 0x00,0x8E }; - CipherSuite TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00,0x8F }; - CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA = { 0x00,0x90 }; - CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA = { 0x00,0x91 }; - CipherSuite TLS_RSA_PSK_WITH_RC4_128_SHA = { 0x00,0x92 }; - CipherSuite TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00,0x93 }; - CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA = { 0x00,0x94 }; - CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA = { 0x00,0x95 }; - CipherSuite TLS_RSA_WITH_SEED_CBC_SHA = { 0x00,0x96 }; - CipherSuite TLS_DH_DSS_WITH_SEED_CBC_SHA = { 0x00,0x97 }; - CipherSuite TLS_DH_RSA_WITH_SEED_CBC_SHA = { 0x00,0x98 }; - CipherSuite TLS_DHE_DSS_WITH_SEED_CBC_SHA = { 0x00,0x99 }; - CipherSuite TLS_DHE_RSA_WITH_SEED_CBC_SHA = { 0x00,0x9A }; - CipherSuite TLS_DH_anon_WITH_SEED_CBC_SHA = { 0x00,0x9B }; - CipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = { 0x00,0x9C }; - CipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = { 0x00,0x9D }; - CipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = { 0x00,0x9E }; - CipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = { 0x00,0x9F }; - CipherSuite TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = { 0x00,0xA0 }; - CipherSuite TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = { 0x00,0xA1 }; - CipherSuite TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = { 0x00,0xA2 }; - CipherSuite TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = { 0x00,0xA3 }; - CipherSuite TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = { 0x00,0xA4 }; - CipherSuite TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = { 0x00,0xA5 }; - CipherSuite TLS_DH_anon_WITH_AES_128_GCM_SHA256 = { 0x00,0xA6 }; - CipherSuite TLS_DH_anon_WITH_AES_256_GCM_SHA384 = { 0x00,0xA7 }; - CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = { 0x00,0xA8 }; - CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = { 0x00,0xA9 }; - CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = { 0x00,0xAA }; - CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = { 0x00,0xAB }; - CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = { 0x00,0xAC }; - CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = { 0x00,0xAD }; - CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = { 0x00,0xAE }; - CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = { 0x00,0xAF }; - CipherSuite TLS_PSK_WITH_NULL_SHA256 = { 0x00,0xB0 }; - CipherSuite TLS_PSK_WITH_NULL_SHA384 = { 0x00,0xB1 }; - CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = { 0x00,0xB2 }; - CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = { 0x00,0xB3 }; - CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = { 0x00,0xB4 }; - CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = { 0x00,0xB5 }; - CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = { 0x00,0xB6 }; - CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = { 0x00,0xB7 }; - CipherSuite TLS_RSA_PSK_WITH_NULL_SHA256 = { 0x00,0xB8 }; - CipherSuite TLS_RSA_PSK_WITH_NULL_SHA384 = { 0x00,0xB9 }; - CipherSuite TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0x00,0xBA }; - CipherSuite TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 = { 0x00,0xBB }; - CipherSuite TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0x00,0xBC }; - CipherSuite TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 = { 0x00,0xBD }; - CipherSuite TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0x00,0xBE }; - CipherSuite TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 = { 0x00,0xBF }; - CipherSuite TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 = { 0x00,0xC0 }; - CipherSuite TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 = { 0x00,0xC1 }; - CipherSuite TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 = { 0x00,0xC2 }; - CipherSuite TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 = { 0x00,0xC3 }; - CipherSuite TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 = { 0x00,0xC4 }; - CipherSuite TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 = { 0x00,0xC5 }; - CipherSuite TLS_EMPTY_RENEGOTIATION_INFO_SCSV = { 0x00,0xFF }; - CipherSuite TLS_ECDH_ECDSA_WITH_NULL_SHA = { 0xC0,0x01 }; - CipherSuite TLS_ECDH_ECDSA_WITH_RC4_128_SHA = { 0xC0,0x02 }; - CipherSuite TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x03 }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = { 0xC0,0x04 }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = { 0xC0,0x05 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_NULL_SHA = { 0xC0,0x06 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = { 0xC0,0x07 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x08 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = { 0xC0,0x09 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = { 0xC0,0x0A }; - CipherSuite TLS_ECDH_RSA_WITH_NULL_SHA = { 0xC0,0x0B }; - CipherSuite TLS_ECDH_RSA_WITH_RC4_128_SHA = { 0xC0,0x0C }; - CipherSuite TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x0D }; - CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = { 0xC0,0x0E }; - CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = { 0xC0,0x0F }; - CipherSuite TLS_ECDHE_RSA_WITH_NULL_SHA = { 0xC0,0x10 }; - CipherSuite TLS_ECDHE_RSA_WITH_RC4_128_SHA = { 0xC0,0x11 }; - CipherSuite TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x12 }; - CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = { 0xC0,0x13 }; - CipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = { 0xC0,0x14 }; - CipherSuite TLS_ECDH_anon_WITH_NULL_SHA = { 0xC0,0x15 }; - CipherSuite TLS_ECDH_anon_WITH_RC4_128_SHA = { 0xC0,0x16 }; - CipherSuite TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x17 }; - CipherSuite TLS_ECDH_anon_WITH_AES_128_CBC_SHA = { 0xC0,0x18 }; - CipherSuite TLS_ECDH_anon_WITH_AES_256_CBC_SHA = { 0xC0,0x19 }; - CipherSuite TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x1A }; - CipherSuite TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x1B }; - CipherSuite TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x1C }; - CipherSuite TLS_SRP_SHA_WITH_AES_128_CBC_SHA = { 0xC0,0x1D }; - CipherSuite TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA = { 0xC0,0x1E }; - CipherSuite TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA = { 0xC0,0x1F }; - CipherSuite TLS_SRP_SHA_WITH_AES_256_CBC_SHA = { 0xC0,0x20 }; - CipherSuite TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA = { 0xC0,0x21 }; - CipherSuite TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA = { 0xC0,0x22 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = { 0xC0,0x23 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = { 0xC0,0x24 }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = { 0xC0,0x25 }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = { 0xC0,0x26 }; - CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = { 0xC0,0x27 }; - CipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = { 0xC0,0x28 }; - CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = { 0xC0,0x29 }; - CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = { 0xC0,0x2A }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = { 0xC0,0x2B }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = { 0xC0,0x2C }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = { 0xC0,0x2D }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = { 0xC0,0x2E }; - CipherSuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = { 0xC0,0x2F }; - CipherSuite TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = { 0xC0,0x30 }; - CipherSuite TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = { 0xC0,0x31 }; - CipherSuite TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = { 0xC0,0x32 }; - CipherSuite TLS_ECDHE_PSK_WITH_RC4_128_SHA = { 0xC0,0x33 }; - CipherSuite TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA = { 0xC0,0x34 }; - CipherSuite TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = { 0xC0,0x35 }; - CipherSuite TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = { 0xC0,0x36 }; - CipherSuite TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 = { 0xC0,0x37 }; - CipherSuite TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 = { 0xC0,0x38 }; - CipherSuite TLS_ECDHE_PSK_WITH_NULL_SHA = { 0xC0,0x39 }; - CipherSuite TLS_ECDHE_PSK_WITH_NULL_SHA256 = { 0xC0,0x3A }; - CipherSuite TLS_ECDHE_PSK_WITH_NULL_SHA384 = { 0xC0,0x3B }; - CipherSuite TLS_RSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x3C }; - CipherSuite TLS_RSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x3D }; - CipherSuite TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x3E }; - CipherSuite TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x3F }; - CipherSuite TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x40 }; - CipherSuite TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x41 }; - CipherSuite TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x42 }; - CipherSuite TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x43 }; - CipherSuite TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x44 }; - CipherSuite TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x45 }; - CipherSuite TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x46 }; - CipherSuite TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x47 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x48 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x49 }; - CipherSuite TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x4A }; - CipherSuite TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x4B }; - CipherSuite TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x4C }; - CipherSuite TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x4D }; - CipherSuite TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x4E }; - CipherSuite TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x4F }; - CipherSuite TLS_RSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x50 }; - CipherSuite TLS_RSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x51 }; - CipherSuite TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x52 }; - CipherSuite TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x53 }; - CipherSuite TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x54 }; - CipherSuite TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x55 }; - CipherSuite TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x56 }; - CipherSuite TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x57 }; - CipherSuite TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x58 }; - CipherSuite TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x59 }; - CipherSuite TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x5A }; - CipherSuite TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x5B }; - CipherSuite TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x5C }; - CipherSuite TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x5D }; - CipherSuite TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x5E }; - CipherSuite TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x5F }; - CipherSuite TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x60 }; - CipherSuite TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x61 }; - CipherSuite TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x62 }; - CipherSuite TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x63 }; - CipherSuite TLS_PSK_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x64 }; - CipherSuite TLS_PSK_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x65 }; - CipherSuite TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x66 }; - CipherSuite TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x67 }; - CipherSuite TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x68 }; - CipherSuite TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x69 }; - CipherSuite TLS_PSK_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x6A }; - CipherSuite TLS_PSK_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x6B }; - CipherSuite TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x6C }; - CipherSuite TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x6D }; - CipherSuite TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 = { 0xC0,0x6E }; - CipherSuite TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 = { 0xC0,0x6F }; - CipherSuite TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 = { 0xC0,0x70 }; - CipherSuite TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 = { 0xC0,0x71 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x72 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x73 }; - CipherSuite TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x74 }; - CipherSuite TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x75 }; - CipherSuite TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x76 }; - CipherSuite TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x77 }; - CipherSuite TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x78 }; - CipherSuite TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x79 }; - CipherSuite TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x7A }; - CipherSuite TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x7B }; - CipherSuite TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x7C }; - CipherSuite TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x7D }; - CipherSuite TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x7E }; - CipherSuite TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x7F }; - CipherSuite TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x80 }; - CipherSuite TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x81 }; - CipherSuite TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x82 }; - CipherSuite TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x83 }; - CipherSuite TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x84 }; - CipherSuite TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x85 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x86 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x87 }; - CipherSuite TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x88 }; - CipherSuite TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x89 }; - CipherSuite TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x8A }; - CipherSuite TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x8B }; - CipherSuite TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x8C }; - CipherSuite TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x8D }; - CipherSuite TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x8E }; - CipherSuite TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x8F }; - CipherSuite TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x90 }; - CipherSuite TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x91 }; - CipherSuite TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 = { 0xC0,0x92 }; - CipherSuite TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 = { 0xC0,0x93 }; - CipherSuite TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x94 }; - CipherSuite TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x95 }; - CipherSuite TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x96 }; - CipherSuite TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x97 }; - CipherSuite TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x98 }; - CipherSuite TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x99 }; - CipherSuite TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 = { 0xC0,0x9A }; - CipherSuite TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 = { 0xC0,0x9B }; - CipherSuite TLS_RSA_WITH_AES_128_CCM = { 0xC0,0x9C }; - CipherSuite TLS_RSA_WITH_AES_256_CCM = { 0xC0,0x9D }; - CipherSuite TLS_DHE_RSA_WITH_AES_128_CCM = { 0xC0,0x9E }; - CipherSuite TLS_DHE_RSA_WITH_AES_256_CCM = { 0xC0,0x9F }; - CipherSuite TLS_RSA_WITH_AES_128_CCM_8 = { 0xC0,0xA0 }; - CipherSuite TLS_RSA_WITH_AES_256_CCM_8 = { 0xC0,0xA1 }; - CipherSuite TLS_DHE_RSA_WITH_AES_128_CCM_8 = { 0xC0,0xA2 }; - CipherSuite TLS_DHE_RSA_WITH_AES_256_CCM_8 = { 0xC0,0xA3 }; - CipherSuite TLS_PSK_WITH_AES_128_CCM = { 0xC0,0xA4 }; - CipherSuite TLS_PSK_WITH_AES_256_CCM = { 0xC0,0xA5 }; - CipherSuite TLS_DHE_PSK_WITH_AES_128_CCM = { 0xC0,0xA6 }; - CipherSuite TLS_DHE_PSK_WITH_AES_256_CCM = { 0xC0,0xA7 }; - CipherSuite TLS_PSK_WITH_AES_128_CCM_8 = { 0xC0,0xA8 }; - CipherSuite TLS_PSK_WITH_AES_256_CCM_8 = { 0xC0,0xA9 }; - CipherSuite TLS_PSK_DHE_WITH_AES_128_CCM_8 = { 0xC0,0xAA }; - CipherSuite TLS_PSK_DHE_WITH_AES_256_CCM_8 = { 0xC0,0xAB }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CCM = { 0xC0,0xAC }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CCM = { 0xC0,0xAD }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = { 0xC0,0xAE }; - CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 = { 0xC0,0xAF }; - CipherSuite TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xA8 }; - CipherSuite TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xA9 }; - CipherSuite TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xAA }; - CipherSuite TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xAB }; - CipherSuite TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xAC }; - CipherSuite TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xAD }; - CipherSuite TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 = { 0xCC,0xAE }; - CipherSuite TLS_FALLBACK_SCSV = { 0x56,0x00 }; - // New PSK ciphers introduced by TLS 1.3 - // https://tlswg.github.io/tls13-spec/#rfc.appendix.A.4 - CipherSuite TLS_AES_128_GCM_SHA256 = { 0x13,0x01 }; - CipherSuite TLS_AES_256_GCM_SHA384 = { 0x13,0x02 }; - CipherSuite TLS_CHACHA20_POLY1305_SHA256 = { 0x13,0x03 }; - CipherSuite TLS_AES_128_CCM_SHA256 = { 0x13,0x04 }; - CipherSuite TLS_AES_128_CCM_8_SHA256 = { 0x13,0x05 }; - // DRAFT-IETF-TLS-ECC - CipherSuite TLS_ECDH_ECDSA_WITH_NULL_SHA = { 0x00,0x47 }; - CipherSuite TLS_ECDH_ECDSA_WITH_RC4_128_SHA = { 0x00,0x48 }; - CipherSuite TLS_ECDH_ECDSA_WITH_DES_CBC_SHA = { 0x00,0x49 }; - CipherSuite TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x4A }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = { 0x00,0x4B }; - CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = { 0x00,0x4C }; - CipherSuite TLS_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA = { 0x00,0x4B }; - CipherSuite TLS_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA = { 0x00,0x4C }; - CipherSuite TLS_ECDH_RSA_WITH_NULL_SHA = { 0x00,0x4D }; - CipherSuite TLS_ECDH_RSA_WITH_RC4_128_SHA = { 0x00,0x4E }; - CipherSuite TLS_ECDH_RSA_WITH_DES_CBC_SHA = { 0x00,0x4F }; - CipherSuite TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x50 }; - CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x51 }; - CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x52 }; - CipherSuite TLS_ECDH_RSA_EXPORT_WITH_RC4_40_SHA = { 0x00,0x53 }; - CipherSuite TLS_ECDH_RSA_EXPORT_WITH_RC4_56_SHA = { 0x00,0x54 }; - CipherSuite TLS_ECDH_anon_NULL_WITH_SHA = { 0x00,0x55 }; - CipherSuite TLS_ECDH_anon_WITH_RC4_128_SHA = { 0x00,0x56 }; - CipherSuite TLS_ECDH_anon_WITH_DES_CBC_SHA = { 0x00,0x57 }; - CipherSuite TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = { 0x00,0x58 }; - CipherSuite TLS_ECDH_anon_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x59 }; - CipherSuite TLS_ECDH_anon_EXPORT_WITH_RC4_40_SHA = { 0x00,0x5A }; - // DRAFT-IETF-TLS-56-BIT-CIPHERSUITES - CipherSuite TLS_RSA_EXPORT1024_WITH_RC4_56_MD5 = { 0x00,0x60 }; - CipherSuite TLS_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 = { 0x00,0x61 }; - CipherSuite TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA = { 0x00,0x62 }; - CipherSuite TLS_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA = { 0x00,0x63 }; - CipherSuite TLS_RSA_EXPORT1024_WITH_RC4_56_SHA = { 0x00,0x64 }; - CipherSuite TLS_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA = { 0x00,0x65 }; - CipherSuite TLS_DHE_DSS_WITH_RC4_128_SHA = { 0x00,0x66 }; - // FIPS SSL (Netscape) - CipherSuite SSL_RSA_FIPS_WITH_DES_CBC_SHA = { 0xFE,0xFE }; - CipherSuite SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA = { 0xFE,0xFF }; - // SSL 2.0 - CipherSuite SSL2_RC4_128_WITH_MD5 = { 0x01,0x00,0x80 }; - CipherSuite SSL2_RC4_128_EXPORT40_WITH_MD5 = { 0x02,0x00,0x80 }; - CipherSuite SSL2_RC2_CBC_128_CBC_WITH_MD5 = { 0x03,0x00,0x80 }; - CipherSuite SSL2_RC2_128_CBC_EXPORT40_WITH_MD5 = { 0x04,0x00,0x80 }; - CipherSuite SSL2_IDEA_128_CBC_WITH_MD5 = { 0x05,0x00,0x80 }; - CipherSuite SSL2_DES_64_CBC_WITH_MD5 = { 0x06,0x00,0x40 }; - CipherSuite SSL2_DES_64_CBC_WITH_SHA = { 0x06,0x01,0x40 }; - CipherSuite SSL2_DES_192_EDE3_CBC_WITH_MD5 = { 0x07,0x00,0xc0 }; - CipherSuite SSL2_DES_192_EDE3_CBC_WITH_SHA = { 0x07,0x01,0xc0 }; - CipherSuite SSL2_RC4_64_WITH_MD5 = { 0x08,0x00,0x80 }; - } cipher_suite; - - - select { warning(1), fatal(2), (255) } AlertLevel; - select { - close_notify(0), - unexpected_message(10), - bad_record_mac(20), - decryption_failed(21), - record_overflow(22), - decompression_failure(30), - handshake_failure(40), - bad_certificate(42), - unsupported_certificate(43), - certificate_revoked(44), - certificate_expired(45), - certificate_unknown(46), - illegal_parameter(47), - unknown_ca(48), - access_denied(49), - decode_error(50), - decrypt_error(51), - export_restriction(60), - protocol_version(70), - insufficient_security(71), - internal_error(80), - user_canceled(90), - no_renegotiation(100), - (255) - } AlertDescription; - - constant { - CompressionMethod NULL={0}; - } compression_method; - - select { - rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4), - (255) - } client_certificate_type; diff --git a/ssl/Attic/ssl.l b/ssl/Attic/ssl.l deleted file mode 100644 index a9f9960..0000000 --- a/ssl/Attic/ssl.l +++ /dev/null @@ -1,67 +0,0 @@ -%option yylineno - -%{ -#include "y.tab.h" - -#if 0 -#define RETURN(x) printf("TOK:%s\n",#x); return(x) -#else -#define RETURN return -#endif - -long strtol(); -%} - -IDCHAR [a-zA-Z0-9_\-\.] -NUMCHAR [0-9] -S [ \t\n\r\f]+ -NAME [a-zA-Z]{IDCHAR}+ -NUM {NUMCHAR}+ -HEXNUM "0x"[0-9A-Za-z]+ -COMMENT "/*"("*"?[^/]+)*("*/") -CODE "{@"[^@]+"@}" -%% - -".." {RETURN(DOT_DOT_);} -"enum" {RETURN(ENUM_);} -"struct" {RETURN(STRUCT_);} -"opaque" {mkname();RETURN(OPAQUE_);} -"select" {RETURN(SELECT_);} -"constant" {RETURN(CONSTANT_);} -"digitally-signed" {/* Do nothing*/} -"public-key-encrypted" {/* Do nothing*/} -"case" {RETURN(CASE_);} -{COMMENT} { /*Do nothing*/} -{CODE} { strcpy(yylval.str,yytext); RETURN(CODE_);} - -{S} {/*do nothing*/} -{NAME} {mkname();RETURN(NAME_);} -{NUM} {yylval.val=atoi(yytext); RETURN(NUM_);} -{HEXNUM} {yylval.val=strtol(yytext,0,16); RETURN(NUM_);} -"{" { RETURN('{'); } -"}" { RETURN('}'); } -"(" { RETURN('('); } -")" { RETURN(')'); } -"[" { RETURN('['); } -"]" { RETURN(']'); } -"<" { RETURN('<'); } -">" { RETURN('>'); } -";" { RETURN(';'); } -":" { RETURN(':'); } -"," { RETURN(','); } -"." { RETURN('.'); } -"^" { RETURN('^'); } -"-" { RETURN('-'); } -"=" { RETURN('='); } -. { fprintf(stderr,"Invalid input token: %s at %d!!!\n",yytext,yylineno); - exit(1); - } - -%% -int mkname() -{ -#if 0 -printf("%s\n",yytext); -#endif -strcpy(yylval.str,yytext); -} diff --git a/ssl/Attic/ssl.y b/ssl/Attic/ssl.y deleted file mode 100644 index 5e90588..0000000 --- a/ssl/Attic/ssl.y +++ /dev/null @@ -1,241 +0,0 @@ -/** - ssl.y - - Copyright (C) 1998, RTFM, Inc. - All Rights Reserved. - - ekr@rtfm.com Fri Dec 25 20:33:47 1998 - */ - - -%{ - -typedef struct select_st_ { - char *name; - char *code; - int val; - struct select_st_ *next; -} select_st; - - -select_st *select_base; -select_st *select_ptr; - -select_st *constant_base; -select_st *constant_ptr; - -#include - -extern FILE *dotc; -extern FILE *doth; - -%} -%union { - int val; - unsigned char str[8192]; -} - - -/*These tokens have attributes*/ -%token NAME_ -%token NUM_ - -/*Tokens*/ -%token DOT_DOT_ -%token STRUCT_ -%token SELECT_ -%token OPAQUE_ -%token SELECT_ -%token ENUM_ -%token DIGITALLY_SIGNED_ -%token COMMENT_START_ -%token CODE_ -%token COMMENT_END_ -%token CASE_ -%token CONSTANT_ -/*Types for nonterminals*/ -%type module -%type typelist -%type definition -%type selecttype -%type constant_type -%type selecterateds -%type selectmax -%type constval -/*%type selecterated*/ -%% -module: typelist - -typelist: {$$=1}; - | definition typelist - { - $$=1; - } -; - -definition: selecttype - | constant_type -; - -selecttype: SELECT_ '{' selecterateds ',' selectmax '}' NAME_ ';' - { - select_st *en; - char filename[100]; - - for(en=select_base;en;en=en->next){ - fprintf(dotc,"static int decode_%s_%s(ssl,dir,seg,data)\n", - $7,en->name); - fprintf(dotc," ssl_obj *ssl;\n"); - fprintf(dotc," int dir;\n"); - fprintf(dotc," segment *seg;\n"); - fprintf(dotc," Data *data;\n"); - fprintf(dotc," {\n"); - if(en->code){ - en->code+=2; - en->code[strlen(en->code)-2]=0; - fprintf(dotc,"\n%s\n",en->code); - } - else{ -/* fprintf(dotc," fprintf(dotc,\"Decoding %s...%cn\");\n",en->name,'\\');*/ - fprintf(dotc," return(0);\n"); - } - fprintf(dotc," }\n"); - } - - fprintf(dotc,"decoder %s_decoder[]={\n",$7); - fprintf(doth,"extern decoder %s_decoder[];\n",$7); - for(en=select_base;en;en=en->next){ - fprintf(dotc," {\n"); - fprintf(dotc," %d,\n",en->val); - fprintf(dotc," \"%s\",\n",en->name); - fprintf(dotc," decode_%s_%s\n",$7,en->name); - fprintf(dotc," },\n"); - } - - fprintf(dotc,"{-1}\n"); - fprintf(dotc,"};\n\n"); - - - - select_base=0; - } -; - -selecterateds: selecterateds ',' selecterated - | selecterated -{; -} -; - -selectmax: '(' NUM_ ')' -{$$=1;}; - -selecterated: selecterated_no_code - | selecterated_code -; - - -selecterated_code: NAME_ '(' NUM_ ')' CODE_ -{ - select_st *en; - - en=malloc(sizeof(select_st)); - - en->next=0; - en->val=$3; - en->name=strdup($1); - en->code=strdup($5); - - if(!select_base){ - select_base=en; - select_ptr=en; - } - else{ - select_ptr->next=en; - select_ptr=en; - } -}; - - -selecterated_no_code: NAME_ '(' NUM_ ')' -{ - select_st *en; - - en=malloc(sizeof(select_st)); - - en->next=0; - en->val=$3; - en->name=strdup($1); - en->code=0; - - if(!select_base){ - select_base=en; - select_ptr=en; - } - else{ - select_ptr->next=en; - select_ptr=en; - } -}; - -constant_type: CONSTANT_ '{' constants '}' NAME_ ';' - { - select_st *en; - - fprintf(dotc,"decoder %s_decoder[]={\n",$5); - fprintf(doth,"extern decoder %s_decoder[];\n",$5); - - for(en=constant_base;en;en=en->next){ - fprintf(dotc," {\n"); - fprintf(dotc," %d,\n",en->val); - fprintf(dotc," \"%s\",\n",en->name); - fprintf(dotc," 0"); - fprintf(dotc," },\n"); - } - - fprintf(dotc,"{-1}\n"); - fprintf(dotc,"};\n\n"); - constant_ptr=0; - constant_base=0; - } - -constants: constants constant - | constant -{; -} -; - -constant: NAME_ NAME_ '=' '{' constval '}' ';' -{ - select_st *en; - - en=malloc(sizeof(select_st)); - - en->next=0; - en->val=$5; - en->name=strdup($2); - - if(!constant_base){ - constant_base=en; - constant_ptr=en; - } - else{ - constant_ptr->next=en; - constant_ptr=en; - } -}; - -constval: NUM_ ',' NUM_ ',' NUM_ - { - $$=($1 << 16) | ($3 << 8) | $5; - } - | NUM_ ',' NUM_ - { - $$=($1 << 8) | $3; - } - | NUM_ - { - $$=$1; - } -; - diff --git a/ssl/Attic/ssl_enum.c b/ssl/Attic/ssl_enum.c deleted file mode 100644 index dad0b13..0000000 --- a/ssl/Attic/ssl_enum.c +++ /dev/null @@ -1,343 +0,0 @@ -#include "network.h" -#include "ssl.h" -#include "sslprint.h" -static int -decode_ContentType_change_cipher_spec (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_ContentType_alert (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_ContentType_handshake (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - - - extern decoder HandshakeType_decoder[]; - int r; - UINT4 t,l; - - SSL_DECODE_UINT8(ssl,0,0,data,&t); - SSL_DECODE_UINT24(ssl,0,0,data,&l); - - if(data->len!=l){ - fprintf(stderr,"Error: short handshake length: expected %d got %d\n", - l,data->len); - ERETURN(R_EOD); - } - - ssl_decode_switch(ssl,HandshakeType_decoder,t,dir,seg,data); - - } -static int -decode_ContentType_application_data (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -decoder ContentType_decoder[]={ - { - 20, - "change_cipher_spec", - decode_ContentType_change_cipher_spec - }, - { - 21, - "alert", - decode_ContentType_alert - }, - { - 22, - "handshake", - decode_ContentType_handshake - }, - { - 23, - "application_data", - decode_ContentType_application_data - }, -{-1} -}; - -static int -decode_HandshakeType_hello_request (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_client_hello (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - - - UINT4 vj,vn,cs,cslen,complen,comp; - Data session_id,random; - int r; - - extern decoder cipher_suite_decoder[]; - extern decoder compression_method_decoder[]; - - SSL_DECODE_UINT8(ssl,0,0,data,&vj); - SSL_DECODE_UINT8(ssl,0,0,data,&vn); - - P_(P_ND) {explain(ssl,"Client version %d.%d ",vj,vn);} - - printf("\n"); - SSL_DECODE_OPAQUE_ARRAY(ssl,"random",32,P_ND,data,&random); - SSL_DECODE_OPAQUE_ARRAY(ssl,"session_id",-32,0,data,&session_id); - - if(session_id.len) - exdump(ssl,"resume ",&session_id); - - SSL_DECODE_UINT16(ssl,"cipher Suites len",0,data,&cslen); - explain(ssl,"cipher suites\n"); - - for(;cslen;cslen-=2){ - SSL_DECODE_ENUM(ssl,0,2,cipher_suite_decoder, - P_HL,data,&cs); - printf("\n"); - } - - SSL_DECODE_UINT8(ssl,"compressionMethod len",0,data,&complen); - if(complen){ - explain(ssl,"compression methods\n"); - for(;complen;complen--){ - SSL_DECODE_ENUM(ssl,0,1,compression_method_decoder,P_HL,data,&comp); - printf("\n"); - } - } - return(0); - - } -static int -decode_HandshakeType_server_hello (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - - - int r; - - UINT4 vj,vn; - - SSL_DECODE_UINT8(ssl,0,0,data,&vj); - SSL_DECODE_UINT8(ssl,0,0,data,&vn); - - P_(P_ND) {explain(ssl,"SSL version %d.%d ",vj,vn);} - SSL_DECODE_OPAQUE_ARRAY(ssl,"random",32,P_ND,data,0); - SSL_DECODE_OPAQUE_ARRAY(ssl,"session_id",32,P_ND,data,0); - SSL_DECODE_ENUM(ssl,0,2,cipher_suite_decoder, - P_HL,data,0); - SSL_DECODE_ENUM(ssl,0,1,compression_method_decoder,P_HL,data,0); - - return(0); - - } -static int -decode_HandshakeType_certificate (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_server_key_exchange (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_certificate_request (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_server_hello_done (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_certificate_verify (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_client_key_exchange (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -static int -decode_HandshakeType_finished (ssl_obj *ssl, int dir, segment *seg, Data *data) - { - return(0); - } -decoder HandshakeType_decoder[]={ - { - 0, - "hello_request", - decode_HandshakeType_hello_request - }, - { - 1, - "client_hello", - decode_HandshakeType_client_hello - }, - { - 2, - "server_hello", - decode_HandshakeType_server_hello - }, - { - 11, - "certificate", - decode_HandshakeType_certificate - }, - { - 12, - "server_key_exchange", - decode_HandshakeType_server_key_exchange - }, - { - 13, - "certificate_request", - decode_HandshakeType_certificate_request - }, - { - 14, - "server_hello_done", - decode_HandshakeType_server_hello_done - }, - { - 15, - "certificate_verify", - decode_HandshakeType_certificate_verify - }, - { - 16, - "client_key_exchange", - decode_HandshakeType_client_key_exchange - }, - { - 20, - "finished", - decode_HandshakeType_finished - }, -{-1} -}; - -decoder cipher_suite_decoder[]={ - { - 1, - "TLS_RSA_WITH_NULL_MD5", - 0 }, - { - 2, - "TLS_RSA_WITH_NULL_SHA", - 0 }, - { - 3, - "TLS_RSA_EXPORT_WITH_RC4_40_MD5", - 0 }, - { - 4, - "TLS_RSA_WITH_RC4_128_MD5", - 0 }, - { - 5, - "TLS_RSA_WITH_RC4_128_SHA", - 0 }, - { - 6, - "TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5", - 0 }, - { - 7, - "TLS_RSA_WITH_IDEA_CBC_SHA", - 0 }, - { - 8, - "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA", - 0 }, - { - 9, - "TLS_RSA_WITH_DES_CBC_SHA", - 0 }, - { - 10, - "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - 0 }, - { - 11, - "TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA", - 0 }, - { - 12, - "TLS_DH_DSS_WITH_DES_CBC_SHA", - 0 }, - { - 13, - "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA", - 0 }, - { - 14, - "TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA", - 0 }, - { - 15, - "TLS_DH_RSA_WITH_DES_CBC_SHA", - 0 }, - { - 16, - "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA", - 0 }, - { - 17, - "TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", - 0 }, - { - 18, - "TLS_DHE_DSS_WITH_DES_CBC_SHA", - 0 }, - { - 19, - "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", - 0 }, - { - 20, - "TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", - 0 }, - { - 21, - "TLS_DHE_RSA_WITH_DES_CBC_SHA", - 0 }, - { - 22, - "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA", - 0 }, - { - 23, - "TLS_DH_anon_EXPORT_WITH_RC4_40_MD5", - 0 }, - { - 24, - "TLS_DH_anon_WITH_RC4_128_MD5", - 0 }, - { - 25, - "TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA", - 0 }, - { - 26, - "TLS_DH_anon_WITH_DES_CBC_SHA", - 0 }, - { - 27, - "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA", - 0 }, -{-1} -}; - -decoder compression_method_decoder[]={ - { - 7, - "NULL", - 0 }, -{-1} -}; - diff --git a/ssl/Attic/y.tab.c b/ssl/Attic/y.tab.c deleted file mode 100644 index 67ada3f..0000000 --- a/ssl/Attic/y.tab.c +++ /dev/null @@ -1,1124 +0,0 @@ - -/* A Bison parser, made from ssl.y - by GNU Bison version 1.28 */ - -#define YYBISON 1 /* Identify Bison output. */ - -#define NAME_ 257 -#define NUM_ 258 -#define DOT_DOT_ 259 -#define STRUCT_ 260 -#define SELECT_ 261 -#define OPAQUE_ 262 -#define ENUM_ 263 -#define DIGITALLY_SIGNED_ 264 -#define COMMENT_START_ 265 -#define CODE_ 266 -#define COMMENT_END_ 267 -#define CASE_ 268 -#define CONSTANT_ 269 - -#line 11 "ssl.y" - - -typedef struct select_st_ { - char *name; - char *code; - int val; - struct select_st_ *next; -} select_st; - - -select_st *select_base; -select_st *select_ptr; - -select_st *constant_base; -select_st *constant_ptr; - -#include - -extern FILE *dotc; -extern FILE *doth; - - -#line 33 "ssl.y" -typedef union { - int val; - unsigned char str[8192]; -} YYSTYPE; -#include - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif - - - -#define YYFINAL 48 -#define YYFLAG -32768 -#define YYNTBASE 23 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 269 ? yytranslate[x] : 36) - -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, - 21, 2, 2, 17, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 19, 2, - 22, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 16, 2, 18, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 3, 6, 8, 10, 19, 23, 25, 29, - 31, 33, 39, 44, 51, 54, 56, 64, 70, 74 -}; - -static const short yyrhs[] = { 24, - 0, 0, 25, 24, 0, 26, 0, 32, 0, 7, - 16, 27, 17, 28, 18, 3, 19, 0, 27, 17, - 29, 0, 29, 0, 20, 4, 21, 0, 31, 0, - 30, 0, 3, 20, 4, 21, 12, 0, 3, 20, - 4, 21, 0, 15, 16, 33, 18, 3, 19, 0, - 33, 34, 0, 34, 0, 3, 3, 22, 16, 35, - 18, 19, 0, 4, 17, 4, 17, 4, 0, 4, - 17, 4, 0, 4, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 67, 69, 70, 76, 77, 80, 124, 125, 130, 133, - 134, 138, 160, 181, 202, 203, 208, 228, 232, 236 -}; -#endif - - -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","NAME_", -"NUM_","DOT_DOT_","STRUCT_","SELECT_","OPAQUE_","ENUM_","DIGITALLY_SIGNED_", -"COMMENT_START_","CODE_","COMMENT_END_","CASE_","CONSTANT_","'{'","','","'}'", -"';'","'('","')'","'='","module","typelist","definition","selecttype","selecterateds", -"selectmax","selecterated","selecterated_code","selecterated_no_code","constant_type", -"constants","constant","constval", NULL -}; -#endif - -static const short yyr1[] = { 0, - 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, - 29, 30, 31, 32, 33, 33, 34, 35, 35, 35 -}; - -static const short yyr2[] = { 0, - 1, 0, 2, 1, 1, 8, 3, 1, 3, 1, - 1, 5, 4, 6, 2, 1, 7, 5, 3, 1 -}; - -static const short yydefact[] = { 2, - 0, 0, 1, 2, 4, 5, 0, 0, 3, 0, - 0, 8, 11, 10, 0, 0, 16, 0, 0, 0, - 0, 15, 0, 0, 0, 7, 0, 0, 13, 0, - 0, 0, 14, 12, 9, 0, 20, 0, 6, 0, - 0, 19, 17, 0, 18, 0, 0, 0 -}; - -static const short yydefgoto[] = { 46, - 3, 4, 5, 11, 25, 12, 13, 14, 6, 16, - 17, 38 -}; - -static const short yypact[] = { -5, - -13, -12,-32768, -5,-32768,-32768, 2, 3,-32768, -11, - -10,-32768,-32768,-32768, 5, -2,-32768, 7, -3, -9, - 9,-32768, -7, 11, 0,-32768, 4, 6, 10, 8, - 16, 17,-32768,-32768,-32768, 12, 13, 14,-32768, 19, - 15, 18,-32768, 20,-32768, 26, 27,-32768 -}; - -static const short yypgoto[] = {-32768, - 24,-32768,-32768,-32768,-32768, 21,-32768,-32768,-32768,-32768, - 22,-32768 -}; - - -#define YYLAST 40 - - -static const short yytable[] = { 10, - 15, 1, 7, 8, 10, 15, 19, 20, 18, 2, - 23, 28, 27, 29, 30, 21, 24, 31, 36, 32, - 37, 34, 42, 45, 33, 47, 48, 9, 35, 40, - 39, 41, 0, 43, 44, 0, 0, 22, 0, 26 -}; - -static const short yycheck[] = { 3, - 3, 7, 16, 16, 3, 3, 17, 3, 20, 15, - 4, 3, 22, 21, 4, 18, 20, 18, 3, 16, - 4, 12, 4, 4, 19, 0, 0, 4, 21, 17, - 19, 18, -1, 19, 17, -1, -1, 16, -1, 19 -}; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/local/share/bison.simple" -/* This file comes from bison-1.28. */ - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -#ifndef YYSTACK_USE_ALLOCA -#ifdef alloca -#define YYSTACK_USE_ALLOCA -#else /* alloca not defined */ -#ifdef __GNUC__ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) -#define YYSTACK_USE_ALLOCA -#include -#else /* not sparc */ -/* We think this test detects Watcom and Microsoft C. */ -/* This used to test MSDOS, but that is a bad idea - since that symbol is in the user namespace. */ -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -#if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ -#include -#endif -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -/* I don't know what this was needed for, but it pollutes the namespace. - So I turned it off. rms, 2 May 1997. */ -/* #include */ - #pragma alloca -#define YYSTACK_USE_ALLOCA -#else /* not MSDOS, or __TURBOC__, or _AIX */ -#if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#endif /* __hpux */ -#endif -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc */ -#endif /* not GNU C */ -#endif /* alloca not defined */ -#endif /* YYSTACK_USE_ALLOCA not defined */ - -#ifdef YYSTACK_USE_ALLOCA -#define YYSTACK_ALLOC alloca -#else -#define YYSTACK_ALLOC malloc -#endif - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -#ifndef YYPURE -#define YYLEX yylex() -#endif - -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) -#endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ -#endif - -/* If nonreentrant, generate the variables here */ - -#ifndef YYPURE - -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ -#endif - -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ - -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ -#endif - -/* YYINITDEPTH indicates the initial size of the parser's stacks */ - -#ifndef YYINITDEPTH -#define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ - -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 -#endif - -/* Define __yy_memcpy. Note that the size argument - should be passed with type unsigned int, because that is what the non-GCC - definitions require. With GCC, __builtin_memcpy takes an arg - of type size_t, but it can handle unsigned int. */ - -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (to, from, count) - char *to; - char *from; - unsigned int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) -{ - register char *t = to; - register char *f = from; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -#line 217 "/usr/local/share/bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#ifdef __cplusplus -#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* not __cplusplus */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#endif /* not __cplusplus */ -#else /* not YYPARSE_PARAM */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* not YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -#ifdef YYPARSE_PARAM -int yyparse (void *); -#else -int yyparse (void); -#endif -#endif - -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif - - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); -#endif - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss - 1; - yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif - -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: - - *++yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; - -#ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif - - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif -#else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; -#ifndef YYSTACK_USE_ALLOCA - yyfree_stacks = 1; -#endif - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, - size * (unsigned int) sizeof (*yyssp)); - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, - size * (unsigned int) sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, - size * (unsigned int) sizeof (*yylsp)); -#endif -#endif /* no yyoverflow */ - - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif - - goto yybackup; - yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif - } - else - { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - - yystate = yyn; - goto yynewstate; - -/* Do the default action for the current state. */ -yydefault: - - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - -/* Do a reduction. yyn is the number of a rule to reduce with. */ -yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ - -#if YYDEBUG != 0 - if (yydebug) - { - int i; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 2: -#line 69 "ssl.y" -{yyval.val=1; - break;} -case 3: -#line 71 "ssl.y" -{ - yyval.val=1; - ; - break;} -case 6: -#line 81 "ssl.y" -{ - select_st *en; - char filename[100]; - - for(en=select_base;en;en=en->next){ - fprintf(dotc,"static int decode_%s_%s(ssl,dir,seg,data)\n", - yyvsp[-1].str,en->name); - fprintf(dotc," ssl_obj *ssl;\n"); - fprintf(dotc," int dir;\n"); - fprintf(dotc," segment *seg;\n"); - fprintf(dotc," Data *data;\n"); - fprintf(dotc," {\n"); - if(en->code){ - en->code+=2; - en->code[strlen(en->code)-2]=0; - fprintf(dotc,"\n%s\n",en->code); - } - else{ -/* fprintf(dotc," fprintf(dotc,\"Decoding %s...%cn\");\n",en->name,'\\');*/ - fprintf(dotc," return(0);\n"); - } - fprintf(dotc," }\n"); - } - - fprintf(dotc,"decoder %s_decoder[]={\n",yyvsp[-1].str); - fprintf(doth,"extern decoder %s_decoder[];\n",yyvsp[-1].str); - for(en=select_base;en;en=en->next){ - fprintf(dotc," {\n"); - fprintf(dotc," %d,\n",en->val); - fprintf(dotc," \"%s\",\n",en->name); - fprintf(dotc," decode_%s_%s\n",yyvsp[-1].str,en->name); - fprintf(dotc," },\n"); - } - - fprintf(dotc,"{-1}\n"); - fprintf(dotc,"};\n\n"); - - - - select_base=0; - ; - break;} -case 8: -#line 126 "ssl.y" -{; -; - break;} -case 9: -#line 131 "ssl.y" -{yyval.val=1;; - break;} -case 12: -#line 139 "ssl.y" -{ - select_st *en; - - en=malloc(sizeof(select_st)); - - en->next=0; - en->val=yyvsp[-2].val; - en->name=strdup(yyvsp[-4].str); - en->code=strdup(yyvsp[0].str); - - if(!select_base){ - select_base=en; - select_ptr=en; - } - else{ - select_ptr->next=en; - select_ptr=en; - } -; - break;} -case 13: -#line 161 "ssl.y" -{ - select_st *en; - - en=malloc(sizeof(select_st)); - - en->next=0; - en->val=yyvsp[-1].val; - en->name=strdup(yyvsp[-3].str); - en->code=0; - - if(!select_base){ - select_base=en; - select_ptr=en; - } - else{ - select_ptr->next=en; - select_ptr=en; - } -; - break;} -case 14: -#line 182 "ssl.y" -{ - select_st *en; - - fprintf(dotc,"decoder %s_decoder[]={\n",yyvsp[-1].str); - fprintf(doth,"extern decoder %s_decoder[];\n",yyvsp[-1].str); - - for(en=constant_base;en;en=en->next){ - fprintf(dotc," {\n"); - fprintf(dotc," %d,\n",en->val); - fprintf(dotc," \"%s\",\n",en->name); - fprintf(dotc," 0"); - fprintf(dotc," },\n"); - } - - fprintf(dotc,"{-1}\n"); - fprintf(dotc,"};\n\n"); - constant_ptr=0; - constant_base=0; - ; - break;} -case 16: -#line 204 "ssl.y" -{; -; - break;} -case 17: -#line 209 "ssl.y" -{ - select_st *en; - - en=malloc(sizeof(select_st)); - - en->next=0; - en->val=yyvsp[-2].val; - en->name=strdup(yyvsp[-5].str); - - if(!constant_base){ - constant_base=en; - constant_ptr=en; - } - else{ - constant_ptr->next=en; - constant_ptr=en; - } -; - break;} -case 18: -#line 229 "ssl.y" -{ - yyval.val=(yyvsp[-4].val << 16) | (yyvsp[-2].val << 8) | yyvsp[0].val; - ; - break;} -case 19: -#line 233 "ssl.y" -{ - yyval.val=(yyvsp[-2].val << 8) | yyvsp[0].val; - ; - break;} -case 20: -#line 237 "ssl.y" -{ - yyval.val=yyvsp[0].val; - ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/local/share/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; - -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - -yyerrlab: /* here on detecting error */ - - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); - } - - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ - - if (yyerrstatus == 3) - { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; - - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 0; - - yyabortlab: - /* YYABORT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 1; -} -#line 242 "ssl.y" diff --git a/ssl/Attic/y.tab.h b/ssl/Attic/y.tab.h deleted file mode 100644 index 13309c6..0000000 --- a/ssl/Attic/y.tab.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef union { - int val; - unsigned char str[8192]; -} YYSTYPE; -#define NAME_ 257 -#define NUM_ 258 -#define DOT_DOT_ 259 -#define STRUCT_ 260 -#define SELECT_ 261 -#define OPAQUE_ 262 -#define ENUM_ 263 -#define DIGITALLY_SIGNED_ 264 -#define COMMENT_START_ 265 -#define CODE_ 266 -#define COMMENT_END_ 267 -#define CASE_ 268 -#define CONSTANT_ 269 - - -extern YYSTYPE yylval;