diff options
author | moparisthebest <admin@moparisthebest.com> | 2015-06-30 20:23:54 -0400 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-07-01 19:43:47 +0200 |
commit | 55b78c5ae94852ffb942ff979e6f25aebfeedb16 (patch) | |
tree | 73c9f909baac1e3f6bc9c3f09ed5819d4be18653 /lib/vtls/cyassl.c | |
parent | c00b18d5406375627b98b47e68261ace85d1a581 (diff) |
SSL: Pinned public key hash support
Diffstat (limited to 'lib/vtls/cyassl.c')
-rw-r--r-- | lib/vtls/cyassl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 40dbbe134..3ded7f11d 100644 --- a/lib/vtls/cyassl.c +++ b/lib/vtls/cyassl.c @@ -67,6 +67,7 @@ and that's a problem since options.h hasn't been included yet. */ #include <cyassl/error.h> #endif #include <cyassl/ctaocrypt/random.h> +#include <cyassl/ctaocrypt/sha256.h> /* The last #include files should be: */ #include "curl_memory.h" @@ -770,4 +771,16 @@ int Curl_cyassl_random(struct SessionHandle *data, return 0; } +void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum /* output */, + size_t unused) +{ + Sha256 SHA256pw; + (void)unused; + InitSha256(&SHA256pw); + Sha256Update(&SHA256pw, tmp, tmplen); + Sha256Final(&SHA256pw, sha256sum); +} + #endif |