From a60f4d0b4403ae398594f9426832e7a4ed9ca686 Mon Sep 17 00:00:00 2001 From: Stefan Schweter Date: Sat, 8 Oct 2016 13:59:34 +0200 Subject: systemd-resolve: use sha256 for local-part of openpgp key (#4193) --- src/shared/gcrypt-util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/shared') diff --git a/src/shared/gcrypt-util.h b/src/shared/gcrypt-util.h index cf33b3c59c..1da12a32be 100644 --- a/src/shared/gcrypt-util.h +++ b/src/shared/gcrypt-util.h @@ -37,3 +37,11 @@ static inline int string_hashsum_sha224(const char *s, size_t len, char **out) { return -EOPNOTSUPP; #endif } + +static inline int string_hashsum_sha256(const char *s, size_t len, char **out) { +#ifdef HAVE_GCRYPT + return string_hashsum(s, len, GCRY_MD_SHA256, out); +#else + return -EOPNOTSUPP; +#endif +} -- cgit v1.2.3-54-g00ecf