/home/dko/Projects/mobilec/src/security/xyssl-0.9/programs/test/ssl_test.c File Reference

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "xyssl/net.h"
#include "xyssl/ssl.h"
#include "xyssl/havege.h"
#include "xyssl/timing.h"
#include "xyssl/certs.h"

Go to the source code of this file.

Data Structures

struct  options

Defines

#define OPMODE_NONE   0
#define OPMODE_CLIENT   1
#define OPMODE_SERVER   2
#define IOMODE_BLOCK   0
#define IOMODE_NONBLOCK   1
#define COMMAND_READ   1
#define COMMAND_WRITE   2
#define COMMAND_BOTH   3
#define DFL_OPMODE   OPMODE_NONE
#define DFL_IOMODE   IOMODE_BLOCK
#define DFL_SERVER_NAME   "localhost"
#define DFL_SERVER_PORT   4433
#define DFL_COMMAND   COMMAND_READ
#define DFL_BUFFER_SIZE   1024
#define DFL_MAX_BYTES   0
#define DFL_DEBUG_LEVEL   0
#define DFL_CONN_TIMEOUT   0
#define DFL_MAX_CONNECTIONS   0
#define DFL_SESSION_REUSE   1
#define DFL_SESSION_LIFETIME   86400
#define DFL_FORCE_CIPHER   0
#define USAGE

Functions

unsigned long int lcppm5 (unsigned long int *state)
void my_debug (void *ctx, int level, char *str)
static int ssl_test (struct options *opt)
int main (int argc, char *argv[])

Variables

char * dhm_G = "4"
char * dhm_P
int server_fd = -1

Define Documentation

#define COMMAND_BOTH   3

Definition at line 44 of file ssl_test.c.

Referenced by main().

#define COMMAND_READ   1

Definition at line 42 of file ssl_test.c.

Referenced by main(), and ssl_test().

#define COMMAND_WRITE   2

Definition at line 43 of file ssl_test.c.

Referenced by main(), and ssl_test().

#define DFL_BUFFER_SIZE   1024

Definition at line 51 of file ssl_test.c.

Referenced by main().

#define DFL_COMMAND   COMMAND_READ

Definition at line 50 of file ssl_test.c.

Referenced by main().

#define DFL_CONN_TIMEOUT   0

Definition at line 54 of file ssl_test.c.

Referenced by main().

#define DFL_DEBUG_LEVEL   0

Definition at line 53 of file ssl_test.c.

Referenced by main().

#define DFL_FORCE_CIPHER   0

Definition at line 58 of file ssl_test.c.

Referenced by main(), and ssl_test().

#define DFL_IOMODE   IOMODE_BLOCK

Definition at line 47 of file ssl_test.c.

Referenced by main().

#define DFL_MAX_BYTES   0

Definition at line 52 of file ssl_test.c.

Referenced by main().

#define DFL_MAX_CONNECTIONS   0

Definition at line 55 of file ssl_test.c.

Referenced by main().

#define DFL_OPMODE   OPMODE_NONE

Definition at line 46 of file ssl_test.c.

Referenced by main().

#define DFL_SERVER_NAME   "localhost"

Definition at line 48 of file ssl_test.c.

Referenced by main().

#define DFL_SERVER_PORT   4433

Definition at line 49 of file ssl_test.c.

Referenced by main().

#define DFL_SESSION_LIFETIME   86400

Definition at line 57 of file ssl_test.c.

Referenced by main().

#define DFL_SESSION_REUSE   1

Definition at line 56 of file ssl_test.c.

Referenced by main().

#define IOMODE_BLOCK   0

Definition at line 39 of file ssl_test.c.

Referenced by main().

#define IOMODE_NONBLOCK   1

Definition at line 40 of file ssl_test.c.

Referenced by main(), and ssl_test().

#define OPMODE_CLIENT   1

Definition at line 36 of file ssl_test.c.

Referenced by main(), and ssl_test().

#define OPMODE_NONE   0

Definition at line 35 of file ssl_test.c.

#define OPMODE_SERVER   2

Definition at line 37 of file ssl_test.c.

Referenced by main(), and ssl_test().

#define USAGE
Value:
"\n usage: ssl_test opmode=<> command=<>...\n"               \
    "\n acceptable parameters:\n"                                \
    "    opmode=client/server        default: <none>\n"          \
    "    iomode=block/nonblock       default: block\n"           \
    "    server_name=%%s              default: localhost\n"      \
    "    server_port=%%d              default: 4433\n"           \
    "    command=read/write/both     default: read\n"            \
    "    buffer_size=%%d (bytes)      default: 1024\n"           \
    "    max_bytes=%%d (bytes)        default: 0 (no limit)\n"   \
    "    debug_level=%%d              default: 0 (disabled)\n"   \
    "    conn_timeout=%%d (ms)        default: 0 (no timeout)\n" \
    "    max_connections=%%d          default: 0 (no limit)\n"   \
    "    session_reuse=on/off        default: on (enabled)\n"    \
    "    session_lifetime=%%d (s)     default: 86400\n"          \
    "    force_cipher=<name>         default: all enabled\n"     \
    " acceptable cipher names:\n"                                \
    "    SSL_RSA_RC4_128_MD5         SSL_RSA_RC4_128_SHA\n"      \
    "    SSL_RSA_DES_168_SHA         SSL_EDH_RSA_DES_168_SHA\n"  \
    "    SSL_RSA_AES_128_SHA         SSL_EDH_RSA_AES_256_SHA\n"  \
    "    SSL_RSA_AES_256_SHA\n\n"

Definition at line 372 of file ssl_test.c.


Function Documentation

unsigned long int lcppm5 ( unsigned long int state  ) 

Definition at line 96 of file ssl_test.c.

Referenced by ssl_test().

int main ( int  argc,
char *  argv[] 
)
void my_debug ( void *  ctx,
int  level,
char *  str 
)

Definition at line 113 of file ssl_test.c.

static int ssl_test ( struct options opt  )  [static]

Variable Documentation

char* dhm_G = "4"

Definition at line 63 of file ssl_test.c.

Referenced by ssl_test().

char* dhm_P
Initial value:
 
"E4004C1F94182000103D883A448B3F802CE4B44A83301270002C20D0321CFD00" 
"11CCEF784C26A400F43DFB901BCA7538F2C6B176001CF5A0FD16D2C48B1D0C1C" 
"F6AC8E1DA6BCC3B4E1F96B0564965300FFA1D0B601EB2800F489AA512C4B248C" 
"01F76949A60BB7F00A40B1EAB64BDD48E8A700D60B7F1200FA8E77B0A979DABF"

Definition at line 64 of file ssl_test.c.

Referenced by ssl_test().

int server_fd = -1

Definition at line 70 of file ssl_test.c.

Generated on Tue Dec 28 15:15:29 2010 for Mobile-C by  doxygen 1.6.3