aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls/cyassl.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-23 01:04:56 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-28 14:56:56 +0200
commit0a083a66bcae51a485d45ba416eac1d1fbe4ca15 (patch)
tree4c8eca6382c89812045f2475a35b5c26ec97df54 /lib/vtls/cyassl.c
parente35205a0c4f8d80dc9e878049a0fb0eb18f61dbf (diff)
vtls: move sha256sum into the Curl_ssl struct
The SHA-256 checksumming is also an SSL backend-specific function. Let's include it in the struct declaring the functionality of SSL backends. In contrast to MD5, there is no fall-back code. To indicate this, the respective entries are NULL for those backends that offer no support for SHA-256 checksumming. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'lib/vtls/cyassl.c')
-rw-r--r--lib/vtls/cyassl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c
index 74052318f..62db13c1b 100644
--- a/lib/vtls/cyassl.c
+++ b/lib/vtls/cyassl.c
@@ -939,10 +939,10 @@ CURLcode Curl_cyassl_random(struct Curl_easy *data,
return CURLE_OK;
}
-void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */
- size_t tmplen,
- unsigned char *sha256sum /* output */,
- size_t unused)
+static void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */
+ size_t tmplen,
+ unsigned char *sha256sum /* output */,
+ size_t unused)
{
Sha256 SHA256pw;
(void)unused;
@@ -971,7 +971,8 @@ const struct Curl_ssl Curl_ssl_cyassl = {
Curl_none_set_engine_default, /* set_engine_default */
Curl_none_engines_list, /* engines_list */
Curl_none_false_start, /* false_start */
- Curl_none_md5sum /* md5sum */
+ Curl_none_md5sum, /* md5sum */
+ Curl_cyassl_sha256sum /* sha256sum */
};
const struct Curl_ssl *Curl_ssl = &Curl_ssl_cyassl;