Update Windows support

This commit is contained in:
Zhi Guan
2022-10-05 11:12:06 +08:00
parent cb59309f67
commit 74fbb19f13
30 changed files with 645 additions and 49 deletions

View File

@@ -16,8 +16,10 @@
#include <stdint.h>
#include <stdlib.h>
#include <gmssl/sm3.h>
#ifdef ENABLE_BROKEN_CRYPTO
#include <gmssl/md5.h>
#include <gmssl/sha1.h>
#endif
#include <gmssl/sha2.h>
@@ -37,8 +39,10 @@ typedef struct DIGEST_CTX DIGEST_CTX;
struct DIGEST_CTX {
union {
SM3_CTX sm3_ctx;
// MD5_CTX md5_ctx;
#ifdef ENABLE_BROKEN_CRYPTO
MD5_CTX md5_ctx;
SHA1_CTX sha1_ctx;
#endif
SHA224_CTX sha224_ctx;
SHA256_CTX sha256_ctx;
SHA384_CTX sha384_ctx;
@@ -58,8 +62,10 @@ struct DIGEST {
};
const DIGEST *DIGEST_sm3(void);
//const DIGEST *DIGEST_md5(void);
#ifdef ENABLE_BROKEN_CRYPTO
const DIGEST *DIGEST_md5(void);
const DIGEST *DIGEST_sha1(void);
#endif
const DIGEST *DIGEST_sha224(void);
const DIGEST *DIGEST_sha256(void);
const DIGEST *DIGEST_sha384(void);