diff options
Diffstat (limited to 'src/lib/libssl/ssl3.h')
-rw-r--r-- | src/lib/libssl/ssl3.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl3.h b/src/lib/libssl/ssl3.h index 9c2c41287a..112e627de0 100644 --- a/src/lib/libssl/ssl3.h +++ b/src/lib/libssl/ssl3.h | |||
@@ -322,6 +322,7 @@ extern "C" { | |||
322 | #define SSL3_RT_ALERT 21 | 322 | #define SSL3_RT_ALERT 21 |
323 | #define SSL3_RT_HANDSHAKE 22 | 323 | #define SSL3_RT_HANDSHAKE 22 |
324 | #define SSL3_RT_APPLICATION_DATA 23 | 324 | #define SSL3_RT_APPLICATION_DATA 23 |
325 | #define TLS1_RT_HEARTBEAT 24 | ||
325 | 326 | ||
326 | #define SSL3_AL_WARNING 1 | 327 | #define SSL3_AL_WARNING 1 |
327 | #define SSL3_AL_FATAL 2 | 328 | #define SSL3_AL_FATAL 2 |
@@ -339,6 +340,11 @@ extern "C" { | |||
339 | #define SSL3_AD_CERTIFICATE_UNKNOWN 46 | 340 | #define SSL3_AD_CERTIFICATE_UNKNOWN 46 |
340 | #define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */ | 341 | #define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */ |
341 | 342 | ||
343 | #define TLS1_HB_REQUEST 1 | ||
344 | #define TLS1_HB_RESPONSE 2 | ||
345 | |||
346 | #ifndef OPENSSL_NO_SSL_INTERN | ||
347 | |||
342 | typedef struct ssl3_record_st | 348 | typedef struct ssl3_record_st |
343 | { | 349 | { |
344 | /*r */ int type; /* type of record */ | 350 | /*r */ int type; /* type of record */ |
@@ -360,6 +366,8 @@ typedef struct ssl3_buffer_st | |||
360 | int left; /* how many bytes left */ | 366 | int left; /* how many bytes left */ |
361 | } SSL3_BUFFER; | 367 | } SSL3_BUFFER; |
362 | 368 | ||
369 | #endif | ||
370 | |||
363 | #define SSL3_CT_RSA_SIGN 1 | 371 | #define SSL3_CT_RSA_SIGN 1 |
364 | #define SSL3_CT_DSS_SIGN 2 | 372 | #define SSL3_CT_DSS_SIGN 2 |
365 | #define SSL3_CT_RSA_FIXED_DH 3 | 373 | #define SSL3_CT_RSA_FIXED_DH 3 |
@@ -379,6 +387,7 @@ typedef struct ssl3_buffer_st | |||
379 | #define SSL3_FLAGS_POP_BUFFER 0x0004 | 387 | #define SSL3_FLAGS_POP_BUFFER 0x0004 |
380 | #define TLS1_FLAGS_TLS_PADDING_BUG 0x0008 | 388 | #define TLS1_FLAGS_TLS_PADDING_BUG 0x0008 |
381 | #define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 | 389 | #define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 |
390 | #define TLS1_FLAGS_KEEP_HANDSHAKE 0x0020 | ||
382 | 391 | ||
383 | /* SSL3_FLAGS_SGC_RESTART_DONE is set when we | 392 | /* SSL3_FLAGS_SGC_RESTART_DONE is set when we |
384 | * restart a handshake because of MS SGC and so prevents us | 393 | * restart a handshake because of MS SGC and so prevents us |
@@ -391,6 +400,8 @@ typedef struct ssl3_buffer_st | |||
391 | */ | 400 | */ |
392 | #define SSL3_FLAGS_SGC_RESTART_DONE 0x0040 | 401 | #define SSL3_FLAGS_SGC_RESTART_DONE 0x0040 |
393 | 402 | ||
403 | #ifndef OPENSSL_NO_SSL_INTERN | ||
404 | |||
394 | typedef struct ssl3_state_st | 405 | typedef struct ssl3_state_st |
395 | { | 406 | { |
396 | long flags; | 407 | long flags; |
@@ -475,7 +486,7 @@ typedef struct ssl3_state_st | |||
475 | int finish_md_len; | 486 | int finish_md_len; |
476 | unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2]; | 487 | unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2]; |
477 | int peer_finish_md_len; | 488 | int peer_finish_md_len; |
478 | 489 | ||
479 | unsigned long message_size; | 490 | unsigned long message_size; |
480 | int message_type; | 491 | int message_type; |
481 | 492 | ||
@@ -523,13 +534,23 @@ typedef struct ssl3_state_st | |||
523 | unsigned char previous_server_finished[EVP_MAX_MD_SIZE]; | 534 | unsigned char previous_server_finished[EVP_MAX_MD_SIZE]; |
524 | unsigned char previous_server_finished_len; | 535 | unsigned char previous_server_finished_len; |
525 | int send_connection_binding; /* TODOEKR */ | 536 | int send_connection_binding; /* TODOEKR */ |
537 | |||
538 | #ifndef OPENSSL_NO_NEXTPROTONEG | ||
539 | /* Set if we saw the Next Protocol Negotiation extension from our peer. */ | ||
540 | int next_proto_neg_seen; | ||
541 | #endif | ||
526 | } SSL3_STATE; | 542 | } SSL3_STATE; |
527 | 543 | ||
544 | #endif | ||
528 | 545 | ||
529 | /* SSLv3 */ | 546 | /* SSLv3 */ |
530 | /*client */ | 547 | /*client */ |
531 | /* extra state */ | 548 | /* extra state */ |
532 | #define SSL3_ST_CW_FLUSH (0x100|SSL_ST_CONNECT) | 549 | #define SSL3_ST_CW_FLUSH (0x100|SSL_ST_CONNECT) |
550 | #ifndef OPENSSL_NO_SCTP | ||
551 | #define DTLS1_SCTP_ST_CW_WRITE_SOCK (0x310|SSL_ST_CONNECT) | ||
552 | #define DTLS1_SCTP_ST_CR_READ_SOCK (0x320|SSL_ST_CONNECT) | ||
553 | #endif | ||
533 | /* write to server */ | 554 | /* write to server */ |
534 | #define SSL3_ST_CW_CLNT_HELLO_A (0x110|SSL_ST_CONNECT) | 555 | #define SSL3_ST_CW_CLNT_HELLO_A (0x110|SSL_ST_CONNECT) |
535 | #define SSL3_ST_CW_CLNT_HELLO_B (0x111|SSL_ST_CONNECT) | 556 | #define SSL3_ST_CW_CLNT_HELLO_B (0x111|SSL_ST_CONNECT) |
@@ -557,6 +578,8 @@ typedef struct ssl3_state_st | |||
557 | #define SSL3_ST_CW_CERT_VRFY_B (0x191|SSL_ST_CONNECT) | 578 | #define SSL3_ST_CW_CERT_VRFY_B (0x191|SSL_ST_CONNECT) |
558 | #define SSL3_ST_CW_CHANGE_A (0x1A0|SSL_ST_CONNECT) | 579 | #define SSL3_ST_CW_CHANGE_A (0x1A0|SSL_ST_CONNECT) |
559 | #define SSL3_ST_CW_CHANGE_B (0x1A1|SSL_ST_CONNECT) | 580 | #define SSL3_ST_CW_CHANGE_B (0x1A1|SSL_ST_CONNECT) |
581 | #define SSL3_ST_CW_NEXT_PROTO_A (0x200|SSL_ST_CONNECT) | ||
582 | #define SSL3_ST_CW_NEXT_PROTO_B (0x201|SSL_ST_CONNECT) | ||
560 | #define SSL3_ST_CW_FINISHED_A (0x1B0|SSL_ST_CONNECT) | 583 | #define SSL3_ST_CW_FINISHED_A (0x1B0|SSL_ST_CONNECT) |
561 | #define SSL3_ST_CW_FINISHED_B (0x1B1|SSL_ST_CONNECT) | 584 | #define SSL3_ST_CW_FINISHED_B (0x1B1|SSL_ST_CONNECT) |
562 | /* read from server */ | 585 | /* read from server */ |
@@ -572,6 +595,10 @@ typedef struct ssl3_state_st | |||
572 | /* server */ | 595 | /* server */ |
573 | /* extra state */ | 596 | /* extra state */ |
574 | #define SSL3_ST_SW_FLUSH (0x100|SSL_ST_ACCEPT) | 597 | #define SSL3_ST_SW_FLUSH (0x100|SSL_ST_ACCEPT) |
598 | #ifndef OPENSSL_NO_SCTP | ||
599 | #define DTLS1_SCTP_ST_SW_WRITE_SOCK (0x310|SSL_ST_ACCEPT) | ||
600 | #define DTLS1_SCTP_ST_SR_READ_SOCK (0x320|SSL_ST_ACCEPT) | ||
601 | #endif | ||
575 | /* read from client */ | 602 | /* read from client */ |
576 | /* Do not change the number values, they do matter */ | 603 | /* Do not change the number values, they do matter */ |
577 | #define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT) | 604 | #define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT) |
@@ -602,6 +629,8 @@ typedef struct ssl3_state_st | |||
602 | #define SSL3_ST_SR_CERT_VRFY_B (0x1A1|SSL_ST_ACCEPT) | 629 | #define SSL3_ST_SR_CERT_VRFY_B (0x1A1|SSL_ST_ACCEPT) |
603 | #define SSL3_ST_SR_CHANGE_A (0x1B0|SSL_ST_ACCEPT) | 630 | #define SSL3_ST_SR_CHANGE_A (0x1B0|SSL_ST_ACCEPT) |
604 | #define SSL3_ST_SR_CHANGE_B (0x1B1|SSL_ST_ACCEPT) | 631 | #define SSL3_ST_SR_CHANGE_B (0x1B1|SSL_ST_ACCEPT) |
632 | #define SSL3_ST_SR_NEXT_PROTO_A (0x210|SSL_ST_ACCEPT) | ||
633 | #define SSL3_ST_SR_NEXT_PROTO_B (0x211|SSL_ST_ACCEPT) | ||
605 | #define SSL3_ST_SR_FINISHED_A (0x1C0|SSL_ST_ACCEPT) | 634 | #define SSL3_ST_SR_FINISHED_A (0x1C0|SSL_ST_ACCEPT) |
606 | #define SSL3_ST_SR_FINISHED_B (0x1C1|SSL_ST_ACCEPT) | 635 | #define SSL3_ST_SR_FINISHED_B (0x1C1|SSL_ST_ACCEPT) |
607 | /* write to client */ | 636 | /* write to client */ |
@@ -626,6 +655,7 @@ typedef struct ssl3_state_st | |||
626 | #define SSL3_MT_CLIENT_KEY_EXCHANGE 16 | 655 | #define SSL3_MT_CLIENT_KEY_EXCHANGE 16 |
627 | #define SSL3_MT_FINISHED 20 | 656 | #define SSL3_MT_FINISHED 20 |
628 | #define SSL3_MT_CERTIFICATE_STATUS 22 | 657 | #define SSL3_MT_CERTIFICATE_STATUS 22 |
658 | #define SSL3_MT_NEXT_PROTO 67 | ||
629 | #define DTLS1_MT_HELLO_VERIFY_REQUEST 3 | 659 | #define DTLS1_MT_HELLO_VERIFY_REQUEST 3 |
630 | 660 | ||
631 | 661 | ||