diff options
author | Oliver Urbann <oliver.urbann@tu-dortmund.de> | 2021-05-20 10:34:43 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-05-20 16:47:42 +0200 |
commit | ac54b10933749d4c17d9568532ff2f1ed64c119a (patch) | |
tree | 298bd4ca8cd345357827609235da7ac161557385 /lib | |
parent | d9eb3e316f5547c14a6f183246bee81806a7d906 (diff) | |
download | curl-ac54b10933749d4c17d9568532ff2f1ed64c119a.tar.gz |
AmigaOS: add functions definitions for SHA256
AmiSSL replaces many functions with macros. Curl requires pointer
to some of these functions. Thus, we have to encapsulate these macros:
SHA256_Init, SHA256_Update, SHA256_Final, X509_INFO_free.
Bug: https://github.com/jens-maus/amissl/issues/15
Co-authored-by: Daniel Stenberg <daniel@haxx.se>
Closes #7099
Diffstat (limited to 'lib')
-rw-r--r-- | lib/amigaos.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/amigaos.c b/lib/amigaos.c index d3b00d908..b6c421361 100644 --- a/lib/amigaos.c +++ b/lib/amigaos.c @@ -90,6 +90,33 @@ void Curl_amiga_X509_free(X509 *a) { X509_free(a); } + +/* AmiSSL replaces many functions with macros. Curl requires pointer + * to some of these functions. Thus, we have to encapsulate these macros. + */ + +#include "warnless.h" + +int (SHA256_Init)(SHA256_CTX *c) +{ + return SHA256_Init(c); +}; + +int (SHA256_Update)(SHA256_CTX *c, const void *data, size_t len) +{ + return SHA256_Update(c, data, curlx_uztoui(len)); +}; + +int (SHA256_Final)(unsigned char *md, SHA256_CTX *c) +{ + return SHA256_Final(md, c); +}; + +void (X509_INFO_free)(X509_INFO *a) +{ + X509_INFO_free(a); +}; + #endif /* USE_AMISSL */ #endif /* __AMIGA__ */ |