diff options
author | Stefan Schweter <stefan@schweter.it> | 2016-10-08 13:59:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-10-08 13:59:34 +0200 |
commit | a60f4d0b4403ae398594f9426832e7a4ed9ca686 (patch) | |
tree | 96aac45791fdcef52526bec517677e7c1988a493 /src/shared/gcrypt-util.h | |
parent | e63be0847c39bfdca45c25c505922814374581a7 (diff) |
systemd-resolve: use sha256 for local-part of openpgp key (#4193)
Diffstat (limited to 'src/shared/gcrypt-util.h')
-rw-r--r-- | src/shared/gcrypt-util.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 +} |