00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 #ifndef HEADER_SSL3_H
00118 #define HEADER_SSL3_H
00119
00120 #ifndef OPENSSL_NO_COMP
00121 #include <openssl/comp.h>
00122 #endif
00123 #include <openssl/buffer.h>
00124 #include <openssl/evp.h>
00125 #include <openssl/ssl.h>
00126 #include <openssl/pq_compat.h>
00127
00128 #ifdef __cplusplus
00129 extern "C" {
00130 #endif
00131
00132 #define SSL3_CK_RSA_NULL_MD5 0x03000001
00133 #define SSL3_CK_RSA_NULL_SHA 0x03000002
00134 #define SSL3_CK_RSA_RC4_40_MD5 0x03000003
00135 #define SSL3_CK_RSA_RC4_128_MD5 0x03000004
00136 #define SSL3_CK_RSA_RC4_128_SHA 0x03000005
00137 #define SSL3_CK_RSA_RC2_40_MD5 0x03000006
00138 #define SSL3_CK_RSA_IDEA_128_SHA 0x03000007
00139 #define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008
00140 #define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009
00141 #define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A
00142
00143 #define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B
00144 #define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C
00145 #define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D
00146 #define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E
00147 #define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F
00148 #define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010
00149
00150 #define SSL3_CK_EDH_DSS_DES_40_CBC_SHA 0x03000011
00151 #define SSL3_CK_EDH_DSS_DES_64_CBC_SHA 0x03000012
00152 #define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA 0x03000013
00153 #define SSL3_CK_EDH_RSA_DES_40_CBC_SHA 0x03000014
00154 #define SSL3_CK_EDH_RSA_DES_64_CBC_SHA 0x03000015
00155 #define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA 0x03000016
00156
00157 #define SSL3_CK_ADH_RC4_40_MD5 0x03000017
00158 #define SSL3_CK_ADH_RC4_128_MD5 0x03000018
00159 #define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019
00160 #define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A
00161 #define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B
00162
00163 #define SSL3_CK_FZA_DMS_NULL_SHA 0x0300001C
00164 #define SSL3_CK_FZA_DMS_FZA_SHA 0x0300001D
00165 #if 0
00166
00167
00168 #define SSL3_CK_FZA_DMS_RC4_SHA 0x0300001E
00169 #endif
00170
00171
00172
00173 #define SSL3_CK_KRB5_DES_64_CBC_SHA 0x0300001E
00174 #define SSL3_CK_KRB5_DES_192_CBC3_SHA 0x0300001F
00175 #define SSL3_CK_KRB5_RC4_128_SHA 0x03000020
00176 #define SSL3_CK_KRB5_IDEA_128_CBC_SHA 0x03000021
00177 #define SSL3_CK_KRB5_DES_64_CBC_MD5 0x03000022
00178 #define SSL3_CK_KRB5_DES_192_CBC3_MD5 0x03000023
00179 #define SSL3_CK_KRB5_RC4_128_MD5 0x03000024
00180 #define SSL3_CK_KRB5_IDEA_128_CBC_MD5 0x03000025
00181
00182 #define SSL3_CK_KRB5_DES_40_CBC_SHA 0x03000026
00183 #define SSL3_CK_KRB5_RC2_40_CBC_SHA 0x03000027
00184 #define SSL3_CK_KRB5_RC4_40_SHA 0x03000028
00185 #define SSL3_CK_KRB5_DES_40_CBC_MD5 0x03000029
00186 #define SSL3_CK_KRB5_RC2_40_CBC_MD5 0x0300002A
00187 #define SSL3_CK_KRB5_RC4_40_MD5 0x0300002B
00188
00189 #define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5"
00190 #define SSL3_TXT_RSA_NULL_SHA "NULL-SHA"
00191 #define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5"
00192 #define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5"
00193 #define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA"
00194 #define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5"
00195 #define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA"
00196 #define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA"
00197 #define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA"
00198 #define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA"
00199
00200 #define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA"
00201 #define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA"
00202 #define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA"
00203 #define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA"
00204 #define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA"
00205 #define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA"
00206
00207 #define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA"
00208 #define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA"
00209 #define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA"
00210 #define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA"
00211 #define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA"
00212 #define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA"
00213
00214 #define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5"
00215 #define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5"
00216 #define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA"
00217 #define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA"
00218 #define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA"
00219
00220 #define SSL3_TXT_FZA_DMS_NULL_SHA "FZA-NULL-SHA"
00221 #define SSL3_TXT_FZA_DMS_FZA_SHA "FZA-FZA-CBC-SHA"
00222 #define SSL3_TXT_FZA_DMS_RC4_SHA "FZA-RC4-SHA"
00223
00224 #define SSL3_TXT_KRB5_DES_64_CBC_SHA "KRB5-DES-CBC-SHA"
00225 #define SSL3_TXT_KRB5_DES_192_CBC3_SHA "KRB5-DES-CBC3-SHA"
00226 #define SSL3_TXT_KRB5_RC4_128_SHA "KRB5-RC4-SHA"
00227 #define SSL3_TXT_KRB5_IDEA_128_CBC_SHA "KRB5-IDEA-CBC-SHA"
00228 #define SSL3_TXT_KRB5_DES_64_CBC_MD5 "KRB5-DES-CBC-MD5"
00229 #define SSL3_TXT_KRB5_DES_192_CBC3_MD5 "KRB5-DES-CBC3-MD5"
00230 #define SSL3_TXT_KRB5_RC4_128_MD5 "KRB5-RC4-MD5"
00231 #define SSL3_TXT_KRB5_IDEA_128_CBC_MD5 "KRB5-IDEA-CBC-MD5"
00232
00233 #define SSL3_TXT_KRB5_DES_40_CBC_SHA "EXP-KRB5-DES-CBC-SHA"
00234 #define SSL3_TXT_KRB5_RC2_40_CBC_SHA "EXP-KRB5-RC2-CBC-SHA"
00235 #define SSL3_TXT_KRB5_RC4_40_SHA "EXP-KRB5-RC4-SHA"
00236 #define SSL3_TXT_KRB5_DES_40_CBC_MD5 "EXP-KRB5-DES-CBC-MD5"
00237 #define SSL3_TXT_KRB5_RC2_40_CBC_MD5 "EXP-KRB5-RC2-CBC-MD5"
00238 #define SSL3_TXT_KRB5_RC4_40_MD5 "EXP-KRB5-RC4-MD5"
00239
00240 #define SSL3_SSL_SESSION_ID_LENGTH 32
00241 #define SSL3_MAX_SSL_SESSION_ID_LENGTH 32
00242
00243 #define SSL3_MASTER_SECRET_SIZE 48
00244 #define SSL3_RANDOM_SIZE 32
00245 #define SSL3_SESSION_ID_SIZE 32
00246 #define SSL3_RT_HEADER_LENGTH 5
00247
00248
00249 #if defined(OPENSSL_SYS_WIN16) || \
00250 (defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32))
00251 #define SSL3_RT_MAX_EXTRA (14000)
00252 #else
00253 #define SSL3_RT_MAX_EXTRA (16384)
00254 #endif
00255
00256 #define SSL3_RT_MAX_PLAIN_LENGTH 16384
00257 #ifdef OPENSSL_NO_COMP
00258 #define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH
00259 #else
00260 #define SSL3_RT_MAX_COMPRESSED_LENGTH (1024+SSL3_RT_MAX_PLAIN_LENGTH)
00261 #endif
00262 #define SSL3_RT_MAX_ENCRYPTED_LENGTH (1024+SSL3_RT_MAX_COMPRESSED_LENGTH)
00263 #define SSL3_RT_MAX_PACKET_SIZE (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH)
00264 #define SSL3_RT_MAX_DATA_SIZE (1024*1024)
00265
00266 #define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54"
00267 #define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52"
00268
00269 #define SSL3_VERSION 0x0300
00270 #define SSL3_VERSION_MAJOR 0x03
00271 #define SSL3_VERSION_MINOR 0x00
00272
00273 #define SSL3_RT_CHANGE_CIPHER_SPEC 20
00274 #define SSL3_RT_ALERT 21
00275 #define SSL3_RT_HANDSHAKE 22
00276 #define SSL3_RT_APPLICATION_DATA 23
00277
00278 #define SSL3_AL_WARNING 1
00279 #define SSL3_AL_FATAL 2
00280
00281 #define SSL3_AD_CLOSE_NOTIFY 0
00282 #define SSL3_AD_UNEXPECTED_MESSAGE 10
00283 #define SSL3_AD_BAD_RECORD_MAC 20
00284 #define SSL3_AD_DECOMPRESSION_FAILURE 30
00285 #define SSL3_AD_HANDSHAKE_FAILURE 40
00286 #define SSL3_AD_NO_CERTIFICATE 41
00287 #define SSL3_AD_BAD_CERTIFICATE 42
00288 #define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
00289 #define SSL3_AD_CERTIFICATE_REVOKED 44
00290 #define SSL3_AD_CERTIFICATE_EXPIRED 45
00291 #define SSL3_AD_CERTIFICATE_UNKNOWN 46
00292 #define SSL3_AD_ILLEGAL_PARAMETER 47
00293
00294 typedef struct ssl3_record_st
00295 {
00296 int type;
00297 unsigned int length;
00298 unsigned int off;
00299 unsigned char *data;
00300 unsigned char *input;
00301 unsigned char *comp;
00302 unsigned long epoch;
00303 PQ_64BIT seq_num;
00304 } SSL3_RECORD;
00305
00306 typedef struct ssl3_buffer_st
00307 {
00308 unsigned char *buf;
00309
00310 size_t len;
00311 int offset;
00312 int left;
00313 } SSL3_BUFFER;
00314
00315 #define SSL3_CT_RSA_SIGN 1
00316 #define SSL3_CT_DSS_SIGN 2
00317 #define SSL3_CT_RSA_FIXED_DH 3
00318 #define SSL3_CT_DSS_FIXED_DH 4
00319 #define SSL3_CT_RSA_EPHEMERAL_DH 5
00320 #define SSL3_CT_DSS_EPHEMERAL_DH 6
00321 #define SSL3_CT_FORTEZZA_DMS 20
00322
00323
00324
00325
00326 #define SSL3_CT_NUMBER 7
00327
00328
00329 #define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001
00330 #define SSL3_FLAGS_DELAY_CLIENT_FINISHED 0x0002
00331 #define SSL3_FLAGS_POP_BUFFER 0x0004
00332 #define TLS1_FLAGS_TLS_PADDING_BUG 0x0008
00333
00334 typedef struct ssl3_state_st
00335 {
00336 long flags;
00337 int delay_buf_pop_ret;
00338
00339 unsigned char read_sequence[8];
00340 unsigned char read_mac_secret[EVP_MAX_MD_SIZE];
00341 unsigned char write_sequence[8];
00342 unsigned char write_mac_secret[EVP_MAX_MD_SIZE];
00343
00344 unsigned char server_random[SSL3_RANDOM_SIZE];
00345 unsigned char client_random[SSL3_RANDOM_SIZE];
00346
00347
00348 int need_empty_fragments;
00349 int empty_fragment_done;
00350
00351 SSL3_BUFFER rbuf;
00352 SSL3_BUFFER wbuf;
00353
00354 SSL3_RECORD rrec;
00355 SSL3_RECORD wrec;
00356
00357
00358
00359 unsigned char alert_fragment[2];
00360 unsigned int alert_fragment_len;
00361 unsigned char handshake_fragment[4];
00362 unsigned int handshake_fragment_len;
00363
00364
00365 unsigned int wnum;
00366 int wpend_tot;
00367 int wpend_type;
00368 int wpend_ret;
00369 const unsigned char *wpend_buf;
00370
00371
00372 EVP_MD_CTX finish_dgst1;
00373 EVP_MD_CTX finish_dgst2;
00374
00375
00376
00377 int change_cipher_spec;
00378
00379 int warn_alert;
00380 int fatal_alert;
00381
00382
00383 int alert_dispatch;
00384 unsigned char send_alert[2];
00385
00386
00387
00388 int renegotiate;
00389 int total_renegotiations;
00390 int num_renegotiations;
00391
00392 int in_read_app_data;
00393
00394 struct {
00395
00396 unsigned char cert_verify_md[EVP_MAX_MD_SIZE*2];
00397
00398
00399 unsigned char finish_md[EVP_MAX_MD_SIZE*2];
00400 int finish_md_len;
00401 unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2];
00402 int peer_finish_md_len;
00403
00404 unsigned long message_size;
00405 int message_type;
00406
00407
00408 SSL_CIPHER *new_cipher;
00409 #ifndef OPENSSL_NO_DH
00410 DH *dh;
00411 #endif
00412
00413 #ifndef OPENSSL_NO_ECDH
00414 EC_KEY *ecdh;
00415 #endif
00416
00417
00418 int next_state;
00419
00420 int reuse_message;
00421
00422
00423 int cert_req;
00424 int ctype_num;
00425 char ctype[SSL3_CT_NUMBER];
00426 STACK_OF(X509_NAME) *ca_names;
00427
00428 int use_rsa_tmp;
00429
00430 int key_block_length;
00431 unsigned char *key_block;
00432
00433 const EVP_CIPHER *new_sym_enc;
00434 const EVP_MD *new_hash;
00435 #ifndef OPENSSL_NO_COMP
00436 const SSL_COMP *new_compression;
00437 #else
00438 char *new_compression;
00439 #endif
00440 int cert_request;
00441 } tmp;
00442
00443 } SSL3_STATE;
00444
00445
00446
00447
00448
00449 #define SSL3_ST_CW_FLUSH (0x100|SSL_ST_CONNECT)
00450
00451 #define SSL3_ST_CW_CLNT_HELLO_A (0x110|SSL_ST_CONNECT)
00452 #define SSL3_ST_CW_CLNT_HELLO_B (0x111|SSL_ST_CONNECT)
00453
00454 #define SSL3_ST_CR_SRVR_HELLO_A (0x120|SSL_ST_CONNECT)
00455 #define SSL3_ST_CR_SRVR_HELLO_B (0x121|SSL_ST_CONNECT)
00456 #define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A (0x126|SSL_ST_CONNECT)
00457 #define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B (0x127|SSL_ST_CONNECT)
00458 #define SSL3_ST_CR_CERT_A (0x130|SSL_ST_CONNECT)
00459 #define SSL3_ST_CR_CERT_B (0x131|SSL_ST_CONNECT)
00460 #define SSL3_ST_CR_KEY_EXCH_A (0x140|SSL_ST_CONNECT)
00461 #define SSL3_ST_CR_KEY_EXCH_B (0x141|SSL_ST_CONNECT)
00462 #define SSL3_ST_CR_CERT_REQ_A (0x150|SSL_ST_CONNECT)
00463 #define SSL3_ST_CR_CERT_REQ_B (0x151|SSL_ST_CONNECT)
00464 #define SSL3_ST_CR_SRVR_DONE_A (0x160|SSL_ST_CONNECT)
00465 #define SSL3_ST_CR_SRVR_DONE_B (0x161|SSL_ST_CONNECT)
00466
00467 #define SSL3_ST_CW_CERT_A (0x170|SSL_ST_CONNECT)
00468 #define SSL3_ST_CW_CERT_B (0x171|SSL_ST_CONNECT)
00469 #define SSL3_ST_CW_CERT_C (0x172|SSL_ST_CONNECT)
00470 #define SSL3_ST_CW_CERT_D (0x173|SSL_ST_CONNECT)
00471 #define SSL3_ST_CW_KEY_EXCH_A (0x180|SSL_ST_CONNECT)
00472 #define SSL3_ST_CW_KEY_EXCH_B (0x181|SSL_ST_CONNECT)
00473 #define SSL3_ST_CW_CERT_VRFY_A (0x190|SSL_ST_CONNECT)
00474 #define SSL3_ST_CW_CERT_VRFY_B (0x191|SSL_ST_CONNECT)
00475 #define SSL3_ST_CW_CHANGE_A (0x1A0|SSL_ST_CONNECT)
00476 #define SSL3_ST_CW_CHANGE_B (0x1A1|SSL_ST_CONNECT)
00477 #define SSL3_ST_CW_FINISHED_A (0x1B0|SSL_ST_CONNECT)
00478 #define SSL3_ST_CW_FINISHED_B (0x1B1|SSL_ST_CONNECT)
00479
00480 #define SSL3_ST_CR_CHANGE_A (0x1C0|SSL_ST_CONNECT)
00481 #define SSL3_ST_CR_CHANGE_B (0x1C1|SSL_ST_CONNECT)
00482 #define SSL3_ST_CR_FINISHED_A (0x1D0|SSL_ST_CONNECT)
00483 #define SSL3_ST_CR_FINISHED_B (0x1D1|SSL_ST_CONNECT)
00484
00485
00486
00487 #define SSL3_ST_SW_FLUSH (0x100|SSL_ST_ACCEPT)
00488
00489
00490 #define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT)
00491 #define SSL3_ST_SR_CLNT_HELLO_B (0x111|SSL_ST_ACCEPT)
00492 #define SSL3_ST_SR_CLNT_HELLO_C (0x112|SSL_ST_ACCEPT)
00493
00494 #define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A (0x113|SSL_ST_ACCEPT)
00495 #define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B (0x114|SSL_ST_ACCEPT)
00496 #define SSL3_ST_SW_HELLO_REQ_A (0x120|SSL_ST_ACCEPT)
00497 #define SSL3_ST_SW_HELLO_REQ_B (0x121|SSL_ST_ACCEPT)
00498 #define SSL3_ST_SW_HELLO_REQ_C (0x122|SSL_ST_ACCEPT)
00499 #define SSL3_ST_SW_SRVR_HELLO_A (0x130|SSL_ST_ACCEPT)
00500 #define SSL3_ST_SW_SRVR_HELLO_B (0x131|SSL_ST_ACCEPT)
00501 #define SSL3_ST_SW_CERT_A (0x140|SSL_ST_ACCEPT)
00502 #define SSL3_ST_SW_CERT_B (0x141|SSL_ST_ACCEPT)
00503 #define SSL3_ST_SW_KEY_EXCH_A (0x150|SSL_ST_ACCEPT)
00504 #define SSL3_ST_SW_KEY_EXCH_B (0x151|SSL_ST_ACCEPT)
00505 #define SSL3_ST_SW_CERT_REQ_A (0x160|SSL_ST_ACCEPT)
00506 #define SSL3_ST_SW_CERT_REQ_B (0x161|SSL_ST_ACCEPT)
00507 #define SSL3_ST_SW_SRVR_DONE_A (0x170|SSL_ST_ACCEPT)
00508 #define SSL3_ST_SW_SRVR_DONE_B (0x171|SSL_ST_ACCEPT)
00509
00510 #define SSL3_ST_SR_CERT_A (0x180|SSL_ST_ACCEPT)
00511 #define SSL3_ST_SR_CERT_B (0x181|SSL_ST_ACCEPT)
00512 #define SSL3_ST_SR_KEY_EXCH_A (0x190|SSL_ST_ACCEPT)
00513 #define SSL3_ST_SR_KEY_EXCH_B (0x191|SSL_ST_ACCEPT)
00514 #define SSL3_ST_SR_CERT_VRFY_A (0x1A0|SSL_ST_ACCEPT)
00515 #define SSL3_ST_SR_CERT_VRFY_B (0x1A1|SSL_ST_ACCEPT)
00516 #define SSL3_ST_SR_CHANGE_A (0x1B0|SSL_ST_ACCEPT)
00517 #define SSL3_ST_SR_CHANGE_B (0x1B1|SSL_ST_ACCEPT)
00518 #define SSL3_ST_SR_FINISHED_A (0x1C0|SSL_ST_ACCEPT)
00519 #define SSL3_ST_SR_FINISHED_B (0x1C1|SSL_ST_ACCEPT)
00520
00521 #define SSL3_ST_SW_CHANGE_A (0x1D0|SSL_ST_ACCEPT)
00522 #define SSL3_ST_SW_CHANGE_B (0x1D1|SSL_ST_ACCEPT)
00523 #define SSL3_ST_SW_FINISHED_A (0x1E0|SSL_ST_ACCEPT)
00524 #define SSL3_ST_SW_FINISHED_B (0x1E1|SSL_ST_ACCEPT)
00525
00526 #define SSL3_MT_HELLO_REQUEST 0
00527 #define SSL3_MT_CLIENT_HELLO 1
00528 #define SSL3_MT_SERVER_HELLO 2
00529 #define SSL3_MT_CERTIFICATE 11
00530 #define SSL3_MT_SERVER_KEY_EXCHANGE 12
00531 #define SSL3_MT_CERTIFICATE_REQUEST 13
00532 #define SSL3_MT_SERVER_DONE 14
00533 #define SSL3_MT_CERTIFICATE_VERIFY 15
00534 #define SSL3_MT_CLIENT_KEY_EXCHANGE 16
00535 #define SSL3_MT_FINISHED 20
00536 #define DTLS1_MT_HELLO_VERIFY_REQUEST 3
00537
00538
00539 #define SSL3_MT_CCS 1
00540
00541
00542 #define SSL3_CC_READ 0x01
00543 #define SSL3_CC_WRITE 0x02
00544 #define SSL3_CC_CLIENT 0x10
00545 #define SSL3_CC_SERVER 0x20
00546 #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE)
00547 #define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ)
00548 #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ)
00549 #define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE)
00550
00551 #ifdef __cplusplus
00552 }
00553 #endif
00554 #endif
00555