aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_cbc/tls_cbc.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-29 10:04:06 -0400
committerJack Lloyd <[email protected]>2017-09-29 10:04:06 -0400
commit2860028d21d93bbbf33966e7e511a9e19da770ca (patch)
tree8b91259274e6df8c07afbde1e3e9ce381bd982d8 /src/lib/tls/tls_cbc/tls_cbc.h
parent3829cf5df7522c4812d4bc33cb593503459c76b9 (diff)
Add a test of TLS CBC padding verification
See also GH #1227
Diffstat (limited to 'src/lib/tls/tls_cbc/tls_cbc.h')
-rw-r--r--src/lib/tls/tls_cbc/tls_cbc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/tls/tls_cbc/tls_cbc.h b/src/lib/tls/tls_cbc/tls_cbc.h
index d0fc1fb61..f09e0ad39 100644
--- a/src/lib/tls/tls_cbc/tls_cbc.h
+++ b/src/lib/tls/tls_cbc/tls_cbc.h
@@ -166,6 +166,14 @@ class BOTAN_TEST_API TLS_CBC_HMAC_AEAD_Decryption final : public TLS_CBC_HMAC_AE
void perform_additional_compressions(size_t plen, size_t padlen);
};
+/**
+* Check the TLS padding of a record
+* @param record the record bits
+* @param record_len length of record
+* @return 0 if padding is invalid, otherwise padding_bytes + 1
+*/
+BOTAN_TEST_API uint16_t check_tls_cbc_padding(const uint8_t record[], size_t record_len);
+
}
}