提交 46a283c0 编写于 作者: M Matt Caswell

Rename some daysnc functions for consistency

For some reason the dasync sha1 functions did not start with the
dasync prefix like all of the other functions do. Changed for
consistency.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 82272550
...@@ -85,19 +85,19 @@ static int dasync_digest_nids[] = { NID_sha1, 0 }; ...@@ -85,19 +85,19 @@ static int dasync_digest_nids[] = { NID_sha1, 0 };
static void dummy_pause_job(void); static void dummy_pause_job(void);
/* SHA1 */ /* SHA1 */
static int digest_sha1_init(EVP_MD_CTX *ctx); static int dasync_sha1_init(EVP_MD_CTX *ctx);
static int digest_sha1_update(EVP_MD_CTX *ctx, const void *data, static int dasync_sha1_update(EVP_MD_CTX *ctx, const void *data,
unsigned long count); unsigned long count);
static int digest_sha1_final(EVP_MD_CTX *ctx, unsigned char *md); static int dasync_sha1_final(EVP_MD_CTX *ctx, unsigned char *md);
static const EVP_MD digest_sha1 = { static const EVP_MD dasync_sha1 = {
NID_sha1, NID_sha1,
NID_sha1WithRSAEncryption, NID_sha1WithRSAEncryption,
SHA_DIGEST_LENGTH, SHA_DIGEST_LENGTH,
EVP_MD_FLAG_PKEY_METHOD_SIGNATURE | EVP_MD_FLAG_DIGALGID_ABSENT, EVP_MD_FLAG_PKEY_METHOD_SIGNATURE | EVP_MD_FLAG_DIGALGID_ABSENT,
digest_sha1_init, dasync_sha1_init,
digest_sha1_update, dasync_sha1_update,
digest_sha1_final, dasync_sha1_final,
NULL, NULL,
NULL, NULL,
EVP_PKEY_NULL_method, EVP_PKEY_NULL_method,
...@@ -225,7 +225,7 @@ static int dasync_digests(ENGINE *e, const EVP_MD **digest, ...@@ -225,7 +225,7 @@ static int dasync_digests(ENGINE *e, const EVP_MD **digest,
/* We are being asked for a specific digest */ /* We are being asked for a specific digest */
switch (nid) { switch (nid) {
case NID_sha1: case NID_sha1:
*digest = &digest_sha1; *digest = &dasync_sha1;
break; break;
default: default:
ok = 0; ok = 0;
...@@ -261,14 +261,14 @@ static void dummy_pause_job(void) { ...@@ -261,14 +261,14 @@ static void dummy_pause_job(void) {
*/ */
#undef data #undef data
#define data(ctx) ((SHA_CTX *)(ctx)->md_data) #define data(ctx) ((SHA_CTX *)(ctx)->md_data)
static int digest_sha1_init(EVP_MD_CTX *ctx) static int dasync_sha1_init(EVP_MD_CTX *ctx)
{ {
dummy_pause_job(); dummy_pause_job();
return SHA1_Init(data(ctx)); return SHA1_Init(data(ctx));
} }
static int digest_sha1_update(EVP_MD_CTX *ctx, const void *data, static int dasync_sha1_update(EVP_MD_CTX *ctx, const void *data,
unsigned long count) unsigned long count)
{ {
dummy_pause_job(); dummy_pause_job();
...@@ -276,7 +276,7 @@ static int digest_sha1_update(EVP_MD_CTX *ctx, const void *data, ...@@ -276,7 +276,7 @@ static int digest_sha1_update(EVP_MD_CTX *ctx, const void *data,
return SHA1_Update(data(ctx), data, (size_t)count); return SHA1_Update(data(ctx), data, (size_t)count);
} }
static int digest_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) static int dasync_sha1_final(EVP_MD_CTX *ctx, unsigned char *md)
{ {
dummy_pause_job(); dummy_pause_job();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册