diff options
author | Jack Lloyd <[email protected]> | 2018-08-01 20:19:38 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-01 20:19:38 -0400 |
commit | d17dbed547765739e1885bde33b0165795bcbd72 (patch) | |
tree | 4541ace57656daffcc1f17f04cd6656a9ded67e9 /src/lib/asn1 | |
parent | 2504351f6df8ff07df131dcee3248f4b9595e2d7 (diff) |
Combine SM2 key types for signatures and encryption
It seems in practice the same key may be end up used for both
operations, so maintaining a distinction at the type level just
complicates things.
Diffstat (limited to 'src/lib/asn1')
-rw-r--r-- | src/lib/asn1/oid_maps.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/asn1/oid_maps.cpp b/src/lib/asn1/oid_maps.cpp index e9c55706e..eb4e570db 100644 --- a/src/lib/asn1/oid_maps.cpp +++ b/src/lib/asn1/oid_maps.cpp @@ -24,7 +24,7 @@ std::unordered_map<std::string, std::string> OIDS::load_oid2str_map() { "1.2.156.10197.1.104.2", "SM4/CBC" }, { "1.2.156.10197.1.104.8", "SM4/GCM" }, { "1.2.156.10197.1.301", "sm2p256v1" }, - { "1.2.156.10197.1.301.1", "SM2_Sig" }, + { "1.2.156.10197.1.301.1", "SM2" }, { "1.2.156.10197.1.301.2", "SM2_Kex" }, { "1.2.156.10197.1.301.3", "SM2_Enc" }, { "1.2.156.10197.1.401", "SM3" }, @@ -367,6 +367,7 @@ std::unordered_map<std::string, OID> OIDS::load_str2oid_map() { "SHA-512-256", OID({2,16,840,1,101,3,4,2,6}) }, { "SHAKE-128", OID({2,16,840,1,101,3,4,2,11}) }, { "SHAKE-256", OID({2,16,840,1,101,3,4,2,12}) }, + { "SM2", OID({1,2,156,10197,1,301,1}) }, { "SM2_Enc", OID({1,2,156,10197,1,301,3}) }, { "SM2_Kex", OID({1,2,156,10197,1,301,2}) }, { "SM2_Sig", OID({1,2,156,10197,1,301,1}) }, |