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 2022/06/14 23:33:17 UTC

[GitHub] [trafficserver] maskit commented on a diff in pull request #8909: Move HKDF to OpenSSL 3 interfaces

maskit commented on code in PR #8909:
URL: https://github.com/apache/trafficserver/pull/8909#discussion_r897401018


##########
include/tscore/HKDF.h:
##########
@@ -30,16 +30,26 @@
 #include <openssl/evp.h>
 #endif
 
+#ifdef OPENSSL_IS_OPENSSL3
+#include <openssl/core.h>
+#endif
+
 class HKDF
 {
 public:
-  HKDF(const EVP_MD *digest);
+  HKDF(const char *digest);
   ~HKDF();
   int extract(uint8_t *dst, size_t *dst_len, const uint8_t *salt, size_t salt_len, const uint8_t *ikm, size_t ikm_len);
   int expand(uint8_t *dst, size_t *dst_len, const uint8_t *prk, size_t prk_len, const uint8_t *info, size_t info_len,
              uint16_t length);
 
 protected:
-  const EVP_MD *_digest = nullptr;
-  EVP_PKEY_CTX *_pctx   = nullptr;
+  const char *_digest = nullptr;

Review Comment:
   It seems like only the constructor needs a digest name. Maybe we can remove this member variable.



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

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org