summaryrefslogtreecommitdiffstats
path: root/tools/build/feature/test-libcrypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/feature/test-libcrypto.c')
-rw-r--r--tools/build/feature/test-libcrypto.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c
new file mode 100644
index 000000000..a98174e05
--- /dev/null
+++ b/tools/build/feature/test-libcrypto.c
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <openssl/sha.h>
+#include <openssl/md5.h>
+
+int main(void)
+{
+ MD5_CTX context;
+ unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
+ unsigned char dat[] = "12345";
+
+ MD5_Init(&context);
+ MD5_Update(&context, &dat[0], sizeof(dat));
+ MD5_Final(&md[0], &context);
+
+ SHA1(&dat[0], sizeof(dat), &md[0]);
+
+ return 0;
+}