admin管理员组文章数量:1122846
Is there a way to hash a string in the OS version of Varnish 7? For example using SHA256.
Basically I need an equivalent of this:
import digest;
sub vcl_hash {
hash_data(req.url);
hash_data(req.http.Host);
if (req.http.Client-Cert) {
hash_data(digest.hash_sha256(req.http.Client-Cert));
}
return (lookup);
}
but the digest
VMOD is from the enterprise version and not found in the OS edition :/
I'm using the Docker version to be precise.
Is there a way to hash a string in the OS version of Varnish 7? For example using SHA256.
Basically I need an equivalent of this:
import digest;
sub vcl_hash {
hash_data(req.url);
hash_data(req.http.Host);
if (req.http.Client-Cert) {
hash_data(digest.hash_sha256(req.http.Client-Cert));
}
return (lookup);
}
but the digest
VMOD is from the enterprise version and not found in the OS edition :/
I'm using the Docker version to be precise.
Share Improve this question edited Nov 22, 2024 at 10:16 Martynas Jusevičius asked Nov 22, 2024 at 10:10 Martynas JusevičiusMartynas Jusevičius 6122 gold badges10 silver badges25 bronze badges1 Answer
Reset to default 1You can find the source code here: https://github.com/varnish/libvmod-digest.
You'll have to compile it from source yourself though. Varnish Enterprise packages this VMOD for your convenience.
However vmod_digest
isn't even Varnish Enterprise's main cryptographic VMOD. vmod_crypto actually has a lot more to offer.
If you can compile vmod_digest
yourself, you'll probably be fine. If you need help, just contact Varnish Software here: https://www.varnish-software.com/contact-us/
本文标签: Hashing data in Varnish 7 opensourceStack Overflow
版权声明:本文标题:Hashing data in Varnish 7 open-source - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304605a1932293.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论