[openssl/openssl] 7c93d2: Fix the encoding of SM2 keys

Richard Levitte noreply at github.com
Fri Jan 12 10:10:19 UTC 2024


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: 7c93d2eb8c29f0c82e79ad1a147507f4d58de816
      https://github.com/openssl/openssl/commit/7c93d2eb8c29f0c82e79ad1a147507f4d58de816
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2024-01-12 (Fri, 12 Jan 2024)

  Changed paths:
    M CHANGES.md
    M providers/implementations/encode_decode/encode_key2any.c

  Log Message:
  -----------
  Fix the encoding of SM2 keys

OpenSSL's encoding of SM2 keys used the SM2 OID for the algorithm OID
where an AlgorithmIdentifier is encoded (for encoding into the structures
PrivateKeyInfo and SubjectPublicKeyInfo).

Such keys should be encoded as ECC keys.

Fixes #22184

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22529)

(cherry picked from commit 1d490694dfa790d8e47f8f2ea62ea1d9b1251179)


  Commit: 29463f17f2f7978e67b74e3f76bad1c126d34bed
      https://github.com/openssl/openssl/commit/29463f17f2f7978e67b74e3f76bad1c126d34bed
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2024-01-12 (Fri, 12 Jan 2024)

  Changed paths:
    A test/recipes/15-test_gensm2.t

  Log Message:
  -----------
  Add test/recipes/15-test_gensm2.t, to test SM2 key generation results

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22529)

(cherry picked from commit d4d9b57530b2ecdca6b4263b5841b42c820e5275)


Compare: https://github.com/openssl/openssl/compare/d521c94e7b44...29463f17f2f7


More information about the openssl-commits mailing list