diff options
Diffstat (limited to 'libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp')
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp b/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp index bfe3eea464d..64535805e40 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp @@ -69,6 +69,11 @@ #include <semaphore.h> #include <signal.h> #include <stddef.h> +#include <md5.h> +#include <sha224.h> +#include <sha256.h> +#include <sha384.h> +#include <sha512.h> #include <stdio.h> #include <stringlist.h> #include <term.h> @@ -361,6 +366,22 @@ const int si_SEGV_MAPERR = SEGV_MAPERR; const int si_SEGV_ACCERR = SEGV_ACCERR; const int unvis_valid = UNVIS_VALID; const int unvis_validpush = UNVIS_VALIDPUSH; + +const unsigned MD5_CTX_sz = sizeof(MD5_CTX); +const unsigned MD5_return_length = MD5_DIGEST_STRING_LENGTH; + +#define SHA2_CONST(LEN) \ + const unsigned SHA##LEN##_CTX_sz = sizeof(SHA##LEN##_CTX); \ + const unsigned SHA##LEN##_return_length = SHA##LEN##_DIGEST_STRING_LENGTH; \ + const unsigned SHA##LEN##_block_length = SHA##LEN##_BLOCK_LENGTH; \ + const unsigned SHA##LEN##_digest_length = SHA##LEN##_DIGEST_LENGTH + +SHA2_CONST(224); +SHA2_CONST(256); +SHA2_CONST(384); +SHA2_CONST(512); + +#undef SHA2_CONST } // namespace __sanitizer using namespace __sanitizer; |