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 2021/02/08 19:03:29 UTC

[GitHub] [trafficserver] bryancall commented on a change in pull request #7447: Use OpenSSL EVP API instead of SHA1_Init/Update/Final (cache_promote)

bryancall commented on a change in pull request #7447:
URL: https://github.com/apache/trafficserver/pull/7447#discussion_r572294843



##########
File path: plugins/cache_promote/lru_policy.h
##########
@@ -53,11 +55,12 @@ class LRUHash
   void
   init(char *data, int len)
   {
-    SHA_CTX sha;
+    EVP_MD_CTX *ctx = EVP_MD_CTX_new();

Review comment:
       Can't you just call EVP_Digest()?  There is talk about the function here (https://github.com/openssl/openssl/issues/7219) and the issues around heap vs stack allocation.




----------------------------------------------------------------
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