diff options
author | beck <> | 2017-01-23 08:48:45 +0000 |
---|---|---|
committer | beck <> | 2017-01-23 08:48:45 +0000 |
commit | 61af17199189570a4400f2757a9e8dab4bb76d2a (patch) | |
tree | e1f210556179334ded73129e6e0733758fe22365 /src/lib/libssl/ssl_lib.c | |
parent | c85967e4f9c3e1f3b3217545939f1d44ddf9f103 (diff) | |
download | openbsd-61af17199189570a4400f2757a9e8dab4bb76d2a.tar.gz openbsd-61af17199189570a4400f2757a9e8dab4bb76d2a.tar.bz2 openbsd-61af17199189570a4400f2757a9e8dab4bb76d2a.zip |
send state and rstate from ssl_st into internal. There are accessors
so these should not be diddled with directly
ok jsing@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 5839bd8048..571ecee509 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.136 2017/01/23 08:08:06 beck Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.137 2017/01/23 08:48:44 beck 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 | * |
@@ -210,12 +210,12 @@ SSL_clear(SSL *s) | |||
210 | 210 | ||
211 | s->internal->type = 0; | 211 | s->internal->type = 0; |
212 | 212 | ||
213 | s->state = SSL_ST_BEFORE|((s->server) ? SSL_ST_ACCEPT : SSL_ST_CONNECT); | 213 | s->internal->state = SSL_ST_BEFORE|((s->server) ? SSL_ST_ACCEPT : SSL_ST_CONNECT); |
214 | 214 | ||
215 | s->version = s->method->version; | 215 | s->version = s->method->version; |
216 | s->client_version = s->version; | 216 | s->client_version = s->version; |
217 | s->internal->rwstate = SSL_NOTHING; | 217 | s->internal->rwstate = SSL_NOTHING; |
218 | s->rstate = SSL_ST_READ_HEADER; | 218 | s->internal->rstate = SSL_ST_READ_HEADER; |
219 | 219 | ||
220 | BUF_MEM_free(s->internal->init_buf); | 220 | BUF_MEM_free(s->internal->init_buf); |
221 | s->internal->init_buf = NULL; | 221 | s->internal->init_buf = NULL; |
@@ -2430,7 +2430,7 @@ SSL_set_accept_state(SSL *s) | |||
2430 | { | 2430 | { |
2431 | s->server = 1; | 2431 | s->server = 1; |
2432 | s->internal->shutdown = 0; | 2432 | s->internal->shutdown = 0; |
2433 | s->state = SSL_ST_ACCEPT|SSL_ST_BEFORE; | 2433 | s->internal->state = SSL_ST_ACCEPT|SSL_ST_BEFORE; |
2434 | s->internal->handshake_func = s->method->ssl_accept; | 2434 | s->internal->handshake_func = s->method->ssl_accept; |
2435 | /* clear the current cipher */ | 2435 | /* clear the current cipher */ |
2436 | ssl_clear_cipher_ctx(s); | 2436 | ssl_clear_cipher_ctx(s); |
@@ -2443,7 +2443,7 @@ SSL_set_connect_state(SSL *s) | |||
2443 | { | 2443 | { |
2444 | s->server = 0; | 2444 | s->server = 0; |
2445 | s->internal->shutdown = 0; | 2445 | s->internal->shutdown = 0; |
2446 | s->state = SSL_ST_CONNECT|SSL_ST_BEFORE; | 2446 | s->internal->state = SSL_ST_CONNECT|SSL_ST_BEFORE; |
2447 | s->internal->handshake_func = s->method->ssl_connect; | 2447 | s->internal->handshake_func = s->method->ssl_connect; |
2448 | /* clear the current cipher */ | 2448 | /* clear the current cipher */ |
2449 | ssl_clear_cipher_ctx(s); | 2449 | ssl_clear_cipher_ctx(s); |
@@ -2681,8 +2681,8 @@ SSL_dup(SSL *s) | |||
2681 | ret->internal->quiet_shutdown = s->internal->quiet_shutdown; | 2681 | ret->internal->quiet_shutdown = s->internal->quiet_shutdown; |
2682 | ret->internal->shutdown = s->internal->shutdown; | 2682 | ret->internal->shutdown = s->internal->shutdown; |
2683 | /* SSL_dup does not really work at any state, though */ | 2683 | /* SSL_dup does not really work at any state, though */ |
2684 | ret->state=s->state; | 2684 | ret->internal->state = s->internal->state; |
2685 | ret->rstate = s->rstate; | 2685 | ret->internal->rstate = s->internal->rstate; |
2686 | 2686 | ||
2687 | /* | 2687 | /* |
2688 | * Would have to copy ret->init_buf, ret->init_msg, ret->init_num, | 2688 | * Would have to copy ret->init_buf, ret->init_msg, ret->init_num, |
@@ -2941,13 +2941,13 @@ void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl, int type, int val) | |||
2941 | int | 2941 | int |
2942 | SSL_state(const SSL *ssl) | 2942 | SSL_state(const SSL *ssl) |
2943 | { | 2943 | { |
2944 | return (ssl->state); | 2944 | return (ssl->internal->state); |
2945 | } | 2945 | } |
2946 | 2946 | ||
2947 | void | 2947 | void |
2948 | SSL_set_state(SSL *ssl, int state) | 2948 | SSL_set_state(SSL *ssl, int state) |
2949 | { | 2949 | { |
2950 | ssl->state = state; | 2950 | ssl->internal->state = state; |
2951 | } | 2951 | } |
2952 | 2952 | ||
2953 | void | 2953 | void |