diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/moxiebox/git-9a79ac54/0001-Remove-PKG_CONFIG-check.patch | 29 | ||||
-rw-r--r-- | packages/moxiebox/package.desc | 2 | ||||
-rw-r--r-- | packages/moxiebox/sha.h | 23 | ||||
-rw-r--r-- | packages/moxiebox/sha256_wrap.c | 25 |
4 files changed, 79 insertions, 0 deletions
diff --git a/packages/moxiebox/git-9a79ac54/0001-Remove-PKG_CONFIG-check.patch b/packages/moxiebox/git-9a79ac54/0001-Remove-PKG_CONFIG-check.patch new file mode 100644 index 0000000..ca3456f --- /dev/null +++ b/packages/moxiebox/git-9a79ac54/0001-Remove-PKG_CONFIG-check.patch @@ -0,0 +1,29 @@ +From a59675779247f544695959646a1615a033ca2d8d Mon Sep 17 00:00:00 2001 +From: Alexey Neyman <stilor@att.net> +Date: Tue, 20 Nov 2018 10:54:40 -0800 +Subject: [PATCH] Remove PKG_CONFIG check + +... it is not used afterwards anyway, and causes errors if pkg-config +is not installed (since one cannot just run configure - one has to +run autogen.sh first). + +Signed-off-by: Alexey Neyman <stilor@att.net> +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index aeadb36..1925a88 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,6 @@ AC_PATH_TOOL(STRIP, strip) + AC_CHECK_PROG(MOX_AS, moxiebox-as, moxiebox-as) + AC_CHECK_PROG(MOX_AR, moxiebox-ar, moxiebox-ar) + AC_CHECK_PROG(MOX_GCC, moxiebox-gcc, moxiebox-gcc) +-PKG_PROG_PKG_CONFIG + + AC_LANG_PUSH([C++]) + +-- +2.14.1 + diff --git a/packages/moxiebox/package.desc b/packages/moxiebox/package.desc new file mode 100644 index 0000000..6793758 --- /dev/null +++ b/packages/moxiebox/package.desc @@ -0,0 +1,2 @@ +repository='git https://github.com/jgarzik/moxiebox.git' +repository_cset='9a79ac546faa4196b66e279f8017814ba8d6fd4b' diff --git a/packages/moxiebox/sha.h b/packages/moxiebox/sha.h new file mode 100644 index 0000000..36b90a1 --- /dev/null +++ b/packages/moxiebox/sha.h @@ -0,0 +1,23 @@ +/* + Wrapper around moxiebox'es implementation of SHA256 digest that + mimics the API of the OpenSSL implementation. +*/ + +#ifndef __SHA_H_ +#define __SHA_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../runtime/sandboxrt_crypto.h" +#define SHA256_DIGEST_LENGTH SHA256_BLOCK_SIZE +void SHA256_Init(SHA256_CTX *ctx); +void SHA256_Update(SHA256_CTX *ctx, const void *data, size_t len); +void SHA256_Final(unsigned char *md, SHA256_CTX *ctx); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/packages/moxiebox/sha256_wrap.c b/packages/moxiebox/sha256_wrap.c new file mode 100644 index 0000000..15800c4 --- /dev/null +++ b/packages/moxiebox/sha256_wrap.c @@ -0,0 +1,25 @@ +/* + Wrapper around moxiebox'es implementation of SHA256 digest that + mimics the API of the OpenSSL implementation. +*/ + +#include "sha.h" +#include "../runtime/sha256.c" + +void +SHA256_Init(SHA256_CTX *ctx) +{ + sha256_init(ctx); +} + +void +SHA256_Update(SHA256_CTX *ctx, const void *data, size_t len) +{ + sha256_update(ctx, data, len); +} + +void +SHA256_Final(unsigned char *md, SHA256_CTX *ctx) +{ + sha256_final(ctx, md); +} |