[openssl/openssl] 1d4906: Fix the encoding of SM2 keys

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


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 1d490694dfa790d8e47f8f2ea62ea1d9b1251179
      https://github.com/openssl/openssl/commit/1d490694dfa790d8e47f8f2ea62ea1d9b1251179
  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)


  Commit: d4d9b57530b2ecdca6b4263b5841b42c820e5275
      https://github.com/openssl/openssl/commit/d4d9b57530b2ecdca6b4263b5841b42c820e5275
  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)


Compare: https://github.com/openssl/openssl/compare/0981c20f8efa...d4d9b57530b2


More information about the openssl-commits mailing list