Message ID | 20200709033416.16845-2-tianjia.zhang@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
On Thu, 2020-07-09 at 11:34 +0800, Tianjia Zhang wrote: > SM3 was published by State Encryption Management Bureau, China. > It has been well supported in the kernel and openssl. > This patch allows SM3 to be used smoothly by specifying the > parameter `-a sm3` or `--hashalgo sm3`. > > Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> > --- > src/libimaevm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/libimaevm.c b/src/libimaevm.c > index b485171..b8d5769 100644 > --- a/src/libimaevm.c > +++ b/src/libimaevm.c > @@ -71,6 +71,7 @@ static const char *const pkey_hash_algo[PKEY_HASH__LAST] = { > [PKEY_HASH_SHA384] = "sha384", > [PKEY_HASH_SHA512] = "sha512", > [PKEY_HASH_SHA224] = "sha224", > + [PKEY_HASH_SM3_256] = "sm3", > [PKEY_HASH_STREEBOG_256] = "md_gost12_256", > [PKEY_HASH_STREEBOG_512] = "md_gost12_512", > }; Sorry, I had forgotten the name in hash_info.c was recently changed from "sm3-256" to just "sm3". This patch set patch is now in the "next" branch. thanks, Mimi
diff --git a/src/libimaevm.c b/src/libimaevm.c index b485171..b8d5769 100644 --- a/src/libimaevm.c +++ b/src/libimaevm.c @@ -71,6 +71,7 @@ static const char *const pkey_hash_algo[PKEY_HASH__LAST] = { [PKEY_HASH_SHA384] = "sha384", [PKEY_HASH_SHA512] = "sha512", [PKEY_HASH_SHA224] = "sha224", + [PKEY_HASH_SM3_256] = "sm3", [PKEY_HASH_STREEBOG_256] = "md_gost12_256", [PKEY_HASH_STREEBOG_512] = "md_gost12_512", };
SM3 was published by State Encryption Management Bureau, China. It has been well supported in the kernel and openssl. This patch allows SM3 to be used smoothly by specifying the parameter `-a sm3` or `--hashalgo sm3`. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> --- src/libimaevm.c | 1 + 1 file changed, 1 insertion(+)