Always process handshake records in full.
This removes the last place where non-app-data hooks leave anything uncomsumed in rrec. (There is still a place where non-app-data hooks see a non-empty rrec an entrance. read_app_data calls into read_handshake. That'll be fixed in a later patch in this series.) This should not change behavior, though some error codes may change due to some processing happening in a slightly different order. Since we do this in a few places, this adds a BUF_MEM_append with tests. Change-Id: I9fe1fc0103e47f90e3c9f4acfe638927aecdeff6 Reviewed-on: https://boringssl-review.googlesource.com/21345 Commit-Queue: Steven Valdez <svaldez@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> Reviewed-by: Steven Valdez <svaldez@google.com>
This commit is contained in:
committed by
CQ bot account: commit-bot@chromium.org
parent
f66e88228a
commit
40e94701dc
@@ -93,6 +93,10 @@ OPENSSL_EXPORT size_t BUF_MEM_grow(BUF_MEM *buf, size_t len);
|
||||
// allocated memory on free.
|
||||
OPENSSL_EXPORT size_t BUF_MEM_grow_clean(BUF_MEM *buf, size_t len);
|
||||
|
||||
// BUF_MEM_append appends |in| to |buf|. It returns one on success and zero on
|
||||
// error.
|
||||
OPENSSL_EXPORT int BUF_MEM_append(BUF_MEM *buf, const void *in, size_t len);
|
||||
|
||||
// BUF_strdup returns an allocated, duplicate of |str|.
|
||||
OPENSSL_EXPORT char *BUF_strdup(const char *str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user