[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use SHA256 in a QEMU device

From: Weiss, Howard
Subject: How to use SHA256 in a QEMU device
Date: Fri, 20 Nov 2020 21:33:18 +0000

I am writing a device which uses SHA256


I use the following to configure the build


   ./configure –target-list=x86_64-softmmu –enable-sdl –enable-debug –extra-ldflags=”’pkg-config –libs openssl’”


With PKG_CONFIG_PATH is defined via


  export PKG_CONFIG_PATH=/usr/local/openssl-1.1.1c



How do I correctly incorporate the SHA256 h files in the C source for driver


I have tried


  #include <openssl/sha.h>


but this results in a build failure


  fatal error: openssl.sha.h: No such file or directory


I even went so far as to copy the include folder for opensl-1.1.1c to qemu/include/opensll and convert all the #include <…> to #include “…”.  I can then change my c source to #include “openssl/sha.h” and the device builds but it then fails to link with undefined reference to the various SHA… modules


I read an earlier post with suggest including -lssl and -lcrypto in the –extra-cflags and –extra-ldflags options in ./configure but this did not work because -lcrypto is not defined


Please advise;


PS: Is there a description of the configure process and its options?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]