diff options
author | Timo Weingärtner <timo@tiwe.de> | 2017-12-27 16:54:54 +0100 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2017-12-27 16:54:59 +0100 |
commit | 6b20192d53aea20ea5ba9725aebe2b7c7d8d8875 (patch) | |
tree | 36a502bd7b4e2b0a5c16aec3464570fd5b102d26 | |
parent | 3944f8c3b52e23e7e617fbfa24307ce8c07757e6 (diff) | |
download | ssh-agent-filter-6b20192d53aea20ea5ba9725aebe2b7c7d8d8875.tar.gz |
follow API change in nettle 3.4
Closes: 884400
-rw-r--r-- | ssh-agent-filter.C | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index cbf5f45..121729a 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -110,18 +110,18 @@ string md5_hex (string const & s) { md5_update(&ctx, s.size(), reinterpret_cast<uint8_t const *>(s.data())); uint8_t bin[MD5_DIGEST_SIZE]; md5_digest(&ctx, MD5_DIGEST_SIZE, bin); - uint8_t hex[BASE16_ENCODE_LENGTH(MD5_DIGEST_SIZE)]; + char hex[BASE16_ENCODE_LENGTH(MD5_DIGEST_SIZE)]; base16_encode_update(hex, MD5_DIGEST_SIZE, bin); - return {reinterpret_cast<char const *>(hex), sizeof(hex)}; + return {hex, sizeof(hex)}; } string base64_encode (string const & s) { struct base64_encode_ctx ctx; base64_encode_init(&ctx); - uint8_t b64[BASE64_ENCODE_LENGTH(s.size())]; + char b64[BASE64_ENCODE_LENGTH(s.size())]; auto len = base64_encode_update(&ctx, b64, s.size(), reinterpret_cast<uint8_t const *>(s.data())); len += base64_encode_final(&ctx, b64 + len); - return {reinterpret_cast<char const *>(b64), len}; + return {b64, len}; } void cloexec (int fd) { |