[openssl/openssl] 4e06cc: 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.0
  Home:   https://github.com/openssl/openssl
  Commit: 4e06cc4dbe2a598819c48ccf3e343d7496ac2be7
      https://github.com/openssl/openssl/commit/4e06cc4dbe2a598819c48ccf3e343d7496ac2be7
  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: 023e881bacf3743a01666606e6ac5697d0f49784
      https://github.com/openssl/openssl/commit/023e881bacf3743a01666606e6ac5697d0f49784
  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/12726997e86d...023e881bacf3


More information about the openssl-commits mailing list