diff options
author | jsing <> | 2017-01-26 05:31:25 +0000 |
---|---|---|
committer | jsing <> | 2017-01-26 05:31:25 +0000 |
commit | 9366f4ef0d67a19fe5eca3feedbc756a4a8966b2 (patch) | |
tree | 4e54623d2ff33c8bd1295cf166bf8253188d9d34 /src/lib/libssl/s3_pkt.c | |
parent | c7118cf7a1b4ff8cec6c52fba26ecfbfba0d7919 (diff) | |
download | openbsd-9366f4ef0d67a19fe5eca3feedbc756a4a8966b2.tar.gz openbsd-9366f4ef0d67a19fe5eca3feedbc756a4a8966b2.tar.bz2 openbsd-9366f4ef0d67a19fe5eca3feedbc756a4a8966b2.zip |
Merge the client/server version negotiation into the existing (currently
fixed version) client/server code.
ok beck@
Diffstat (limited to 'src/lib/libssl/s3_pkt.c')
-rw-r--r-- | src/lib/libssl/s3_pkt.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index 152e384a4b..5dadc0654e 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_pkt.c,v 1.69 2017/01/25 06:13:02 jsing Exp $ */ | 1 | /* $OpenBSD: s3_pkt.c,v 1.70 2017/01/26 05:31:25 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 | * |
@@ -333,9 +333,16 @@ again: | |||
333 | if (n <= 0) | 333 | if (n <= 0) |
334 | return (n); | 334 | return (n); |
335 | 335 | ||
336 | s->internal->mac_packet = 1; | ||
336 | s->internal->rstate = SSL_ST_READ_BODY; | 337 | s->internal->rstate = SSL_ST_READ_BODY; |
337 | 338 | ||
338 | CBS_init(&header, s->internal->packet, n); | 339 | if (s->server && s->internal->first_packet) { |
340 | if ((ret = ssl_server_legacy_first_packet(s)) != 1) | ||
341 | return (ret); | ||
342 | ret = -1; | ||
343 | } | ||
344 | |||
345 | CBS_init(&header, s->internal->packet, SSL3_RT_HEADER_LENGTH); | ||
339 | 346 | ||
340 | /* Pull apart the header into the SSL3_RECORD */ | 347 | /* Pull apart the header into the SSL3_RECORD */ |
341 | if (!CBS_get_u8(&header, &type) || | 348 | if (!CBS_get_u8(&header, &type) || |