diff options
| author | jsing <> | 2017-01-23 13:36:13 +0000 |
|---|---|---|
| committer | jsing <> | 2017-01-23 13:36:13 +0000 |
| commit | 4ae6fa4e9b3c20e6347b1b4ad62b1051ed5d7630 (patch) | |
| tree | 84ee9c4c985fe1078df40f818b7697846dba1c18 /src/lib/libssl/s3_lib.c | |
| parent | d997e8b2da4774b32b9a1e6368bb19aca5bf82c2 (diff) | |
| download | openbsd-4ae6fa4e9b3c20e6347b1b4ad62b1051ed5d7630.tar.gz openbsd-4ae6fa4e9b3c20e6347b1b4ad62b1051ed5d7630.tar.bz2 openbsd-4ae6fa4e9b3c20e6347b1b4ad62b1051ed5d7630.zip | |
Split most of SSL_METHOD out into an internal variant, which is opaque.
Discussed with beck@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
| -rw-r--r-- | src/lib/libssl/s3_lib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 09af18ea95..a42ac73335 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s3_lib.c,v 1.126 2017/01/23 08:48:44 beck Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.127 2017/01/23 13:36:13 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1816,7 +1816,7 @@ ssl3_new(SSL *s) | |||
| 1816 | return (0); | 1816 | return (0); |
| 1817 | } | 1817 | } |
| 1818 | 1818 | ||
| 1819 | s->method->ssl_clear(s); | 1819 | s->method->internal->ssl_clear(s); |
| 1820 | 1820 | ||
| 1821 | return (1); | 1821 | return (1); |
| 1822 | } | 1822 | } |
| @@ -2533,7 +2533,7 @@ ssl3_shutdown(SSL *s) | |||
| 2533 | } | 2533 | } |
| 2534 | } else if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) { | 2534 | } else if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) { |
| 2535 | /* If we are waiting for a close from our peer, we are closed */ | 2535 | /* If we are waiting for a close from our peer, we are closed */ |
| 2536 | s->method->ssl_read_bytes(s, 0, NULL, 0, 0); | 2536 | s->method->internal->ssl_read_bytes(s, 0, NULL, 0, 0); |
| 2537 | if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) { | 2537 | if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) { |
| 2538 | return(-1); /* return WANT_READ */ | 2538 | return(-1); /* return WANT_READ */ |
| 2539 | } | 2539 | } |
| @@ -2592,8 +2592,8 @@ ssl3_write(SSL *s, const void *buf, int len) | |||
| 2592 | ret = S3I(s)->delay_buf_pop_ret; | 2592 | ret = S3I(s)->delay_buf_pop_ret; |
| 2593 | S3I(s)->delay_buf_pop_ret = 0; | 2593 | S3I(s)->delay_buf_pop_ret = 0; |
| 2594 | } else { | 2594 | } else { |
| 2595 | ret = s->method->ssl_write_bytes(s, SSL3_RT_APPLICATION_DATA, | 2595 | ret = s->method->internal->ssl_write_bytes(s, |
| 2596 | buf, len); | 2596 | SSL3_RT_APPLICATION_DATA, buf, len); |
| 2597 | if (ret <= 0) | 2597 | if (ret <= 0) |
| 2598 | return (ret); | 2598 | return (ret); |
| 2599 | } | 2599 | } |
| @@ -2610,7 +2610,7 @@ ssl3_read_internal(SSL *s, void *buf, int len, int peek) | |||
| 2610 | if (S3I(s)->renegotiate) | 2610 | if (S3I(s)->renegotiate) |
| 2611 | ssl3_renegotiate_check(s); | 2611 | ssl3_renegotiate_check(s); |
| 2612 | S3I(s)->in_read_app_data = 1; | 2612 | S3I(s)->in_read_app_data = 1; |
| 2613 | ret = s->method->ssl_read_bytes(s, | 2613 | ret = s->method->internal->ssl_read_bytes(s, |
| 2614 | SSL3_RT_APPLICATION_DATA, buf, len, peek); | 2614 | SSL3_RT_APPLICATION_DATA, buf, len, peek); |
| 2615 | if ((ret == -1) && (S3I(s)->in_read_app_data == 2)) { | 2615 | if ((ret == -1) && (S3I(s)->in_read_app_data == 2)) { |
| 2616 | /* | 2616 | /* |
| @@ -2621,7 +2621,7 @@ ssl3_read_internal(SSL *s, void *buf, int len, int peek) | |||
| 2621 | * handshake processing and try to read application data again. | 2621 | * handshake processing and try to read application data again. |
| 2622 | */ | 2622 | */ |
| 2623 | s->internal->in_handshake++; | 2623 | s->internal->in_handshake++; |
| 2624 | ret = s->method->ssl_read_bytes(s, | 2624 | ret = s->method->internal->ssl_read_bytes(s, |
| 2625 | SSL3_RT_APPLICATION_DATA, buf, len, peek); | 2625 | SSL3_RT_APPLICATION_DATA, buf, len, peek); |
| 2626 | s->internal->in_handshake--; | 2626 | s->internal->in_handshake--; |
| 2627 | } else | 2627 | } else |
| @@ -2687,7 +2687,7 @@ ssl_get_algorithm2(SSL *s) | |||
| 2687 | { | 2687 | { |
| 2688 | long alg2 = S3I(s)->tmp.new_cipher->algorithm2; | 2688 | long alg2 = S3I(s)->tmp.new_cipher->algorithm2; |
| 2689 | 2689 | ||
| 2690 | if (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SHA256_PRF && | 2690 | if (s->method->internal->ssl3_enc->enc_flags & SSL_ENC_FLAG_SHA256_PRF && |
| 2691 | alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF)) | 2691 | alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF)) |
| 2692 | return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256; | 2692 | return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256; |
| 2693 | return alg2; | 2693 | return alg2; |
