Skip to content

Commit

Permalink
Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Boswell committed Sep 11, 2019
1 parent dea8b17 commit 59a8c45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions source/bcrypt/bcrypt_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ struct bcrypt_hash_handle {
uint8_t *hash_obj;
};

static void s_load_sha256_alg_handle(void) {
static void s_load_sha256_alg_handle(void *user_data) {
(void)user_data;
/* this function is incredibly slow, LET IT LEAK*/
BCryptOpenAlgorithmProvider(&s_sha256_alg, BCRYPT_SHA256_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
AWS_ASSERT(s_sha256_alg);
Expand All @@ -63,7 +64,8 @@ static void s_load_sha256_alg_handle(void) {
s_sha256_alg, BCRYPT_OBJECT_LENGTH, (PBYTE)&s_sha256_obj_len, sizeof(s_sha256_obj_len), &result_length, 0);
}

static void s_load_md5_alg_handle(void) {
static void s_load_md5_alg_handle(void *user_data) {
(void)user_data;
/* this function is incredibly slow, LET IT LEAK*/
BCryptOpenAlgorithmProvider(&s_md5_alg, BCRYPT_MD5_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
AWS_ASSERT(s_md5_alg);
Expand Down
3 changes: 2 additions & 1 deletion source/bcrypt/bcrypt_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ struct bcrypt_hmac_handle {
uint8_t *hash_obj;
};

static void s_load_alg_handle(void) {
static void s_load_alg_handle(void *user_data) {
(void)user_data;
/* this function is incredibly slow, LET IT LEAK*/
BCryptOpenAlgorithmProvider(
&s_sha256_hmac_alg, BCRYPT_SHA256_ALGORITHM, MS_PRIMITIVE_PROVIDER, BCRYPT_ALG_HANDLE_HMAC_FLAG);
Expand Down

0 comments on commit 59a8c45

Please sign in to comment.