diff options
-rw-r--r-- | lib/crypto/hmacsha256.c | 22 | ||||
-rw-r--r-- | lib/crypto/sha256.c | 8 | ||||
-rw-r--r-- | lib/crypto/sha256.h | 6 | ||||
-rw-r--r-- | source3/modules/vfs_acl_common.c | 6 | ||||
-rw-r--r-- | source4/utils/oLschema2ldif.c | 6 |
5 files changed, 24 insertions, 24 deletions
diff --git a/lib/crypto/hmacsha256.c b/lib/crypto/hmacsha256.c index 1a31441297..36e321a094 100644 --- a/lib/crypto/hmacsha256.c +++ b/lib/crypto/hmacsha256.c @@ -42,9 +42,9 @@ _PUBLIC_ void hmac_sha256_init(const uint8_t *key, size_t key_len, struct HMACSH { SHA256_CTX tctx; - SHA256_Init(&tctx); - SHA256_Update(&tctx, key, key_len); - SHA256_Final(tk, &tctx); + samba_SHA256_Init(&tctx); + samba_SHA256_Update(&tctx, key, key_len); + samba_SHA256_Final(tk, &tctx); key = tk; key_len = SHA256_DIGEST_LENGTH; @@ -63,8 +63,8 @@ _PUBLIC_ void hmac_sha256_init(const uint8_t *key, size_t key_len, struct HMACSH ctx->k_opad[i] ^= 0x5c; } - SHA256_Init(&ctx->ctx); - SHA256_Update(&ctx->ctx, ctx->k_ipad, 64); + samba_SHA256_Init(&ctx->ctx); + samba_SHA256_Update(&ctx->ctx, ctx->k_ipad, 64); } /*********************************************************************** @@ -72,7 +72,7 @@ _PUBLIC_ void hmac_sha256_init(const uint8_t *key, size_t key_len, struct HMACSH ***********************************************************************/ _PUBLIC_ void hmac_sha256_update(const uint8_t *data, size_t data_len, struct HMACSHA256Context *ctx) { - SHA256_Update(&ctx->ctx, data, data_len); /* then text of datagram */ + samba_SHA256_Update(&ctx->ctx, data, data_len); /* then text of datagram */ } /*********************************************************************** @@ -82,10 +82,10 @@ _PUBLIC_ void hmac_sha256_final(uint8_t digest[SHA256_DIGEST_LENGTH], struct HMA { SHA256_CTX ctx_o; - SHA256_Final(digest, &ctx->ctx); + samba_SHA256_Final(digest, &ctx->ctx); - SHA256_Init(&ctx_o); - SHA256_Update(&ctx_o, ctx->k_opad, 64); - SHA256_Update(&ctx_o, digest, SHA256_DIGEST_LENGTH); - SHA256_Final(digest, &ctx_o); + samba_SHA256_Init(&ctx_o); + samba_SHA256_Update(&ctx_o, ctx->k_opad, 64); + samba_SHA256_Update(&ctx_o, digest, SHA256_DIGEST_LENGTH); + samba_SHA256_Final(digest, &ctx_o); } diff --git a/lib/crypto/sha256.c b/lib/crypto/sha256.c index 42ab2363aa..02e2259f1b 100644 --- a/lib/crypto/sha256.c +++ b/lib/crypto/sha256.c @@ -80,7 +80,7 @@ static const uint32_t constant_256[64] = { }; void -SHA256_Init (SHA256_CTX *m) +samba_SHA256_Init (SHA256_CTX *m) { m->sz[0] = 0; m->sz[1] = 0; @@ -187,7 +187,7 @@ struct x32{ }; void -SHA256_Update (SHA256_CTX *m, const void *v, size_t len) +samba_SHA256_Update (SHA256_CTX *m, const void *v, size_t len) { const unsigned char *p = (const unsigned char *)v; size_t old_sz = m->sz[0]; @@ -222,7 +222,7 @@ SHA256_Update (SHA256_CTX *m, const void *v, size_t len) } void -SHA256_Final (void *res, SHA256_CTX *m) +samba_SHA256_Final (void *res, SHA256_CTX *m) { unsigned char zeros[72]; unsigned offset = (m->sz[0] / 8) % 64; @@ -238,7 +238,7 @@ SHA256_Final (void *res, SHA256_CTX *m) zeros[dstart+2] = (m->sz[1] >> 8) & 0xff; zeros[dstart+1] = (m->sz[1] >> 16) & 0xff; zeros[dstart+0] = (m->sz[1] >> 24) & 0xff; - SHA256_Update (m, zeros, dstart + 8); + samba_SHA256_Update (m, zeros, dstart + 8); { int i; unsigned char *r = (unsigned char*)res; diff --git a/lib/crypto/sha256.h b/lib/crypto/sha256.h index 4a5f2cbe94..7ee8fac73c 100644 --- a/lib/crypto/sha256.h +++ b/lib/crypto/sha256.h @@ -84,8 +84,8 @@ struct hc_sha256state { typedef struct hc_sha256state SHA256_CTX; -void SHA256_Init (SHA256_CTX *); -void SHA256_Update (SHA256_CTX *, const void *, size_t); -void SHA256_Final (void *, SHA256_CTX *); +void samba_SHA256_Init (SHA256_CTX *); +void samba_SHA256_Update (SHA256_CTX *, const void *, size_t); +void samba_SHA256_Final (void *, SHA256_CTX *); #endif /* HEIM_SHA_H */ diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 827c954b1d..6e11ffc275 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -61,9 +61,9 @@ static NTSTATUS hash_sd_sha256(struct security_descriptor *psd, return status; } - SHA256_Init(&tctx); - SHA256_Update(&tctx, blob.data, blob.length); - SHA256_Final(hash, &tctx); + samba_SHA256_Init(&tctx); + samba_SHA256_Update(&tctx, blob.data, blob.length); + samba_SHA256_Final(hash, &tctx); return NT_STATUS_OK; } diff --git a/source4/utils/oLschema2ldif.c b/source4/utils/oLschema2ldif.c index 29ed3bd38e..ae69db19bc 100644 --- a/source4/utils/oLschema2ldif.c +++ b/source4/utils/oLschema2ldif.c @@ -392,9 +392,9 @@ static struct ldb_message *process_entry(TALLOC_CTX *mem_ctx, const char *entry) MSG_ADD_STRING("governsID", s); } - SHA256_Init(&sha256_context); - SHA256_Update(&sha256_context, (uint8_t*)s, strlen(s)); - SHA256_Final(digest, &sha256_context); + samba_SHA256_Init(&sha256_context); + samba_SHA256_Update(&sha256_context, (uint8_t*)s, strlen(s)); + samba_SHA256_Final(digest, &sha256_context); memcpy(&guid, digest, sizeof(struct GUID)); |