diff options
| author | jsing <> | 2017-01-26 05:31:25 +0000 |
|---|---|---|
| committer | jsing <> | 2017-01-26 05:31:25 +0000 |
| commit | 7ba6d48018c99e9b4a6d3f810b4c03e4365bdebd (patch) | |
| tree | 4e54623d2ff33c8bd1295cf166bf8253188d9d34 /src/lib/libssl/s3_pkt.c | |
| parent | fdf235a2a4a2ffd3c42bc4f501e4a86848af719c (diff) | |
| download | openbsd-7ba6d48018c99e9b4a6d3f810b4c03e4365bdebd.tar.gz openbsd-7ba6d48018c99e9b4a6d3f810b4c03e4365bdebd.tar.bz2 openbsd-7ba6d48018c99e9b4a6d3f810b4c03e4365bdebd.zip | |
Merge the client/server version negotiation into the existing (currently
fixed version) client/server code.
ok beck@
Diffstat (limited to '')
| -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) || |
