summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-13 14:30:35 (GMT)
committerBrad King <brad.king@kitware.com>2020-02-13 17:57:52 (GMT)
commit5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd (patch)
tree3d39cf776650ac89bedec4fc1d251ff70e6fc8d7 /Utilities/cmlibarchive/libarchive/archive_hmac_private.h
parent9a27ecd4162aebfb595b7a02b958b7dfb95256d8 (diff)
parent8cce62295a5ddca3e0d1fd7cff0229054972dfe3 (diff)
downloadCMake-5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd.zip
CMake-5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd.tar.gz
CMake-5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd.tar.bz2
Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive: LibArchive 2020-02-11 (3288ebb0) Also manually restore content from upstream libarchive's main `CMakeLists.txt` file that was removed by previous commits and exclude it with `IF(0)` blocks. Do this as an evil merge so that `git blame -C` can follow the content to upstream.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_hmac_private.h')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_hmac_private.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_hmac_private.h b/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
index eb45c4e..13a67d4 100644
--- a/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
+++ b/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
@@ -23,13 +23,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __LIBARCHIVE_BUILD
-#error This header is only to be used internally to libarchive.
-#endif
-
#ifndef ARCHIVE_HMAC_PRIVATE_H_INCLUDED
#define ARCHIVE_HMAC_PRIVATE_H_INCLUDED
+#ifndef __LIBARCHIVE_BUILD
+#error This header is only to be used internally to libarchive.
+#endif
/*
* On systems that do not support any recognized crypto libraries,
* the archive_hmac.c file is expected to define no usable symbols.
@@ -64,6 +63,11 @@ typedef struct {
} archive_hmac_sha1_ctx;
+#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_MD_H)
+#include <mbedtls/md.h>
+
+typedef mbedtls_md_context_t archive_hmac_sha1_ctx;
+
#elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_HMAC_H)
#include <nettle/hmac.h>