You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/08/12 17:18:40 UTC

[GitHub] [trafficserver] randall commented on a change in pull request #7106: drop use of BIO_f_base64 and EVP_PKEY_new_mac_key

randall commented on a change in pull request #7106:
URL: https://github.com/apache/trafficserver/pull/7106#discussion_r469417622



##########
File path: plugins/experimental/access_control/unit_tests/test_utils.cc
##########
@@ -180,8 +180,6 @@ TEST_CASE("Base64: quick encode / decode with '+', '/' and various paddings", "[
     CHECK(0 == strncmp(encodedMessage, encoded[i], encodedMessageLen));
 
     /* Decode */
-    size_t decodedMessageEstimatedLen = cryptoBase64DecodeSize(encodedMessage, encodedMessageLen);
-    CHECK(strlen(decoded[i]) == decodedMessageEstimatedLen);

Review comment:
       It goes back how `cryptoBase64DecodeSize` determines its size for input. The test here assumes the estimate is not an estimate and rather an accurate value.
   
   here's the run with the check in place (with some extra debugging):
   ```
   experimental/access_control/unit_tests/test_utils.cc:186: FAILED:
     CHECK( strlen(decoded[i]) == decodedMessageEstimatedLen )
   with expansion:
     11 == 12
   with messages:
     i := 1
     decoded[i] := "ts>ts?ts!!!"
   
   experimental/access_control/unit_tests/test_utils.cc:186: FAILED:
     CHECK( strlen(decoded[i]) == decodedMessageEstimatedLen )
   with expansion:
     10 == 12
   with messages:
     i := 2
     decoded[i] := "ts>ts?ts!!"
   ```




----------------------------------------------------------------
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:
users@infra.apache.org