David Benjamin 0c069cbf33 Don't consume the newline in BIO_gets for fds
We support BIO_gets on three BIOs. They're all slightly different. File
BIOs have the NUL truncation bug. fd BIOs swallow the embedded newline.
This CL fixes the second issue and updates the BIO_gets test to cover
all three.

See also upstream's https://github.com/openssl/openssl/pull/3442

Update-Note: BIO_gets on an fd BIO now returns the newline, to align
with memory and file BIOs. BIO_gets is primarily used in the PEM parser,
which tries to tolerate both cases, but this reduces the risk of some
weird bug that only appears in fd BIOs.

Change-Id: Ia8ffb8c67b6981d6ef7144a1522f8605dc01d525
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/58552
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2023-04-10 13:37:53 +00:00
..
2023-03-22 18:37:42 +00:00
2023-03-16 23:46:11 +00:00
2019-04-17 20:57:57 +00:00
2023-02-08 21:48:53 +00:00
2023-03-30 17:05:20 +00:00
2022-06-14 17:57:23 +00:00
2023-02-28 23:12:58 +00:00
2023-03-06 20:05:26 +00:00
2018-09-05 23:41:25 +00:00
2022-06-08 18:05:50 +00:00
2023-03-29 00:29:21 +00:00
2023-03-29 00:29:21 +00:00
2023-01-27 14:19:27 +00:00
2023-01-27 14:19:27 +00:00
2020-05-14 18:17:12 +00:00