diff options
| author | jsing <> | 2017-01-26 06:32:58 +0000 |
|---|---|---|
| committer | jsing <> | 2017-01-26 06:32:58 +0000 |
| commit | 8f27f95d7e2d05a51278cfe66faf801eb0f13dcc (patch) | |
| tree | 09a483692ecb3d9b3259d70bca4f0473c356e0f5 /src/lib/libssl/ssl_both.c | |
| parent | 1cc79b15c0e05858d638931ff222a6c8592f3103 (diff) | |
| download | openbsd-8f27f95d7e2d05a51278cfe66faf801eb0f13dcc.tar.gz openbsd-8f27f95d7e2d05a51278cfe66faf801eb0f13dcc.tar.bz2 openbsd-8f27f95d7e2d05a51278cfe66faf801eb0f13dcc.zip | |
Remove most of SSL3_ENC_METHOD - we can just inline the function calls
and defines since they are the same everywhere.
ok beck@
Diffstat (limited to 'src/lib/libssl/ssl_both.c')
| -rw-r--r-- | src/lib/libssl/ssl_both.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_both.c b/src/lib/libssl/ssl_both.c index e556e336ed..9d0dadef83 100644 --- a/src/lib/libssl/ssl_both.c +++ b/src/lib/libssl/ssl_both.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_both.c,v 1.1 2017/01/26 05:51:54 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_both.c,v 1.2 2017/01/26 06:32:58 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 | * |
| @@ -170,10 +170,10 @@ ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) | |||
| 170 | int md_len; | 170 | int md_len; |
| 171 | 171 | ||
| 172 | if (s->internal->state == a) { | 172 | if (s->internal->state == a) { |
| 173 | md_len = s->method->internal->ssl3_enc->finish_mac_length; | 173 | md_len = TLS1_FINISH_MAC_LENGTH; |
| 174 | OPENSSL_assert(md_len <= EVP_MAX_MD_SIZE); | 174 | OPENSSL_assert(md_len <= EVP_MAX_MD_SIZE); |
| 175 | 175 | ||
| 176 | if (s->method->internal->ssl3_enc->final_finish_mac(s, sender, slen, | 176 | if (tls1_final_finish_mac(s, sender, slen, |
| 177 | S3I(s)->tmp.finish_md) != md_len) | 177 | S3I(s)->tmp.finish_md) != md_len) |
| 178 | return (0); | 178 | return (0); |
| 179 | S3I(s)->tmp.finish_md_len = md_len; | 179 | S3I(s)->tmp.finish_md_len = md_len; |
| @@ -217,15 +217,15 @@ ssl3_take_mac(SSL *s) | |||
| 217 | return; | 217 | return; |
| 218 | 218 | ||
| 219 | if (s->internal->state & SSL_ST_CONNECT) { | 219 | if (s->internal->state & SSL_ST_CONNECT) { |
| 220 | sender = s->method->internal->ssl3_enc->server_finished_label; | 220 | sender = TLS_MD_SERVER_FINISH_CONST; |
| 221 | slen = s->method->internal->ssl3_enc->server_finished_label_len; | 221 | slen = TLS_MD_SERVER_FINISH_CONST_SIZE; |
| 222 | } else { | 222 | } else { |
| 223 | sender = s->method->internal->ssl3_enc->client_finished_label; | 223 | sender = TLS_MD_CLIENT_FINISH_CONST; |
| 224 | slen = s->method->internal->ssl3_enc->client_finished_label_len; | 224 | slen = TLS_MD_CLIENT_FINISH_CONST_SIZE; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | S3I(s)->tmp.peer_finish_md_len = | 227 | S3I(s)->tmp.peer_finish_md_len = |
| 228 | s->method->internal->ssl3_enc->final_finish_mac(s, sender, slen, | 228 | tls1_final_finish_mac(s, sender, slen, |
| 229 | S3I(s)->tmp.peer_finish_md); | 229 | S3I(s)->tmp.peer_finish_md); |
| 230 | } | 230 | } |
| 231 | 231 | ||
| @@ -249,7 +249,7 @@ ssl3_get_finished(SSL *s, int a, int b) | |||
| 249 | } | 249 | } |
| 250 | S3I(s)->change_cipher_spec = 0; | 250 | S3I(s)->change_cipher_spec = 0; |
| 251 | 251 | ||
| 252 | md_len = s->method->internal->ssl3_enc->finish_mac_length; | 252 | md_len = TLS1_FINISH_MAC_LENGTH; |
| 253 | 253 | ||
| 254 | if (n < 0) { | 254 | if (n < 0) { |
| 255 | al = SSL_AD_DECODE_ERROR; | 255 | al = SSL_AD_DECODE_ERROR; |
