maskit commented on a change in pull request #7106:
URL: https://github.com/apache/trafficserver/pull/7106#discussion_r468995676
##########
File path: plugins/experimental/access_control/unit_tests/test_utils.cc
##########
@@ -26,34 +26,33 @@
#include "../common.h"
/*********************************************************************************************************************
- * Base64 related test
- * @note the purpose of these test is not to test Base64 itself since it is
provided by openssl library,
- * the idea is to test the usage and some corner cases.
+ * Base64 related tests
+ * @note the purpose of these tests is to test the usage and some corner cases.
********************************************************************************************************************/
TEST_CASE("Base64: estimate buffer size needed to encode a message",
"[Base64][access_control][utility]")
{
size_t encodedLen;
- /* Test with a zero decoded message lenght */
+ /* Test with a zero decoded message length */
encodedLen = cryptoBase64EncodedSize(0);
- CHECK(0 == encodedLen);
+ CHECK(4 == encodedLen);
Review comment:
This is a bit sad. Seems like the comment in ink_base64.h is not true.
We may want to improve the macro first. Of course we can last this first and
change back these values to the original values after the improvement though.
> Little helper functions to calculate minimum required output buffer for
encoding/decoding.
> #define ATS_BASE64_ENCODE_DSTLEN(_length) ((_length * 8) / 6 + 4)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]