File nut/include/tls/ssl.h


Included Files


Preprocessor definitions

* @mainpage axTLS API * * @image html axolotl.jpg * * The axTLS library has features such as: * - The TLSv1 SSL client/server protocol * - No requirement to use any openssl libraries. * - A choice between AES block (128/256 bit) and RC4 (128 bit) stream ciphers. * - RSA encryption/decryption with variable sized keys (up to 4096 bits). * - Certificate chaining and peer authentication. * - Session resumption, session renegotiation. * - ASN.1, X.509, PKCS#8, PKCS#12 keys/certificates with DER/PEM encoding. * - Highly configurable compile time options. * - Portable across many platforms (written in ANSI C), and has language * bindings in C, C#, VB.NET, Java, Perl and Lua. * - Partial openssl API compatibility (via a wrapper). * - A very small footprint (around 50-60kB for the library in 'server-only' * mode). * - No dependencies on sockets - can use serial connections for example. * - A very simple API - ~ 20 functions/methods. * * A list of these functions/methods are described below. * * @ref c_api * * @ref bigint_api * * @ref csharp_api * * @ref java_api

#define HEADER_SSL_H

#define SSL_SESSION_ID_SIZE 32

#define SSL_CLIENT_AUTHENTICATION 0x00010000

#define SSL_SERVER_VERIFY_LATER 0x00020000

#define SSL_NO_DEFAULT_KEY 0x00040000

#define SSL_DISPLAY_STATES 0x00080000

#define SSL_DISPLAY_BYTES 0x00100000

#define SSL_DISPLAY_CERTS 0x00200000

#define SSL_DISPLAY_RSA 0x00400000

#define SSL_CONNECT_IN_PARTS 0x00800000

#define SSL_OK 0

#define SSL_NOT_OK -1

#define SSL_ERROR_DEAD -2

#define SSL_CLOSE_NOTIFY -3

#define SSL_ERROR_CONN_LOST -256

#define SSL_ERROR_SOCK_SETUP_FAILURE -258

#define SSL_ERROR_INVALID_HANDSHAKE -260

#define SSL_ERROR_INVALID_PROT_MSG -261

#define SSL_ERROR_INVALID_HMAC -262

#define SSL_ERROR_INVALID_VERSION -263

#define SSL_ERROR_INVALID_SESSION -265

#define SSL_ERROR_NO_CIPHER -266

#define SSL_ERROR_BAD_CERTIFICATE -268

#define SSL_ERROR_INVALID_KEY -269

#define SSL_ERROR_FINISHED_INVALID -271

#define SSL_ERROR_NO_CERT_DEFINED -272

#define SSL_ERROR_NO_CLIENT_RENOG -273

#define SSL_ERROR_NOT_SUPPORTED -274

#define SSL_X509_OFFSET -512

#define SSL_X509_ERROR( A )

#define SSL_ALERT_TYPE_WARNING 1

#define SLL_ALERT_TYPE_FATAL 2

#define SSL_ALERT_CLOSE_NOTIFY 0

#define SSL_ALERT_UNEXPECTED_MESSAGE 10

#define SSL_ALERT_BAD_RECORD_MAC 20

#define SSL_ALERT_HANDSHAKE_FAILURE 40

#define SSL_ALERT_BAD_CERTIFICATE 42

#define SSL_ALERT_ILLEGAL_PARAMETER 47

#define SSL_ALERT_DECODE_ERROR 50

#define SSL_ALERT_DECRYPT_ERROR 51

#define SSL_ALERT_INVALID_VERSION 70

#define SSL_ALERT_NO_RENEGOTIATION 100

#define SSL_AES128_SHA 0x2f

#define SSL_AES256_SHA 0x35

#define SSL_RC4_128_SHA 0x05

#define SSL_RC4_128_MD5 0x04

#define SSL_BUILD_SKELETON_MODE 0x01

#define SSL_BUILD_SERVER_ONLY 0x02

#define SSL_BUILD_ENABLE_VERIFICATION 0x03

#define SSL_BUILD_ENABLE_CLIENT 0x04

#define SSL_BUILD_FULL_MODE 0x05

#define SSL_BUILD_MODE 0

#define SSL_MAX_CERT_CFG_OFFSET 1

#define SSL_MAX_CA_CERT_CFG_OFFSET 2

#define SSL_HAS_PEM 3

#define SSL_DEFAULT_SVR_SESS 5

#define SSL_DEFAULT_CLNT_SESS 1

#define SSL_X509_CERT_COMMON_NAME 0

#define SSL_X509_CERT_ORGANIZATION 1

#define SSL_X509_CERT_ORGANIZATIONAL_NAME 2

#define SSL_X509_CA_CERT_COMMON_NAME 3

#define SSL_X509_CA_CERT_ORGANIZATION 4

#define SSL_X509_CA_CERT_ORGANIZATIONAL_NAME 5

#define SSL_OBJ_X509_CERT 1

#define SSL_OBJ_X509_CACERT 2

#define SSL_OBJ_RSA_KEY 3

#define SSL_OBJ_PKCS8 4

#define SSL_OBJ_PKCS12 5