[openssl/openssl] 17bd38: Obtain PSS salt length from provider

Clemens Lang noreply at github.com
Fri Dec 9 15:39:00 UTC 2022


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: 17bd383dd21e04da8c05592baf28cccd31d82a1b
      https://github.com/openssl/openssl/commit/17bd383dd21e04da8c05592baf28cccd31d82a1b
  Author: Clemens Lang <cllang at redhat.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M crypto/cms/cms_rsa.c
    M crypto/rsa/rsa_ameth.c
    M test/recipes/15-test_rsapss.t
    M test/recipes/80-test_cms.t

  Log Message:
  -----------
  Obtain PSS salt length from provider

Rather than computing the PSS salt length again in core using
ossl_rsa_ctx_to_pss_string, which calls rsa_ctx_to_pss and computes the
salt length, obtain it from the provider using the
OSSL_SIGNATURE_PARAM_ALGORITHM_ID param to handle the case where the
interpretation of the magic constants in the provider differs from that
of OpenSSL core.

Add tests that verify that the rsa_pss_saltlen:max,
rsa_pss_saltlen:<integer> and rsa_pss_saltlen:digest options work and
put the computed digest length into the CMS_ContentInfo struct when
using CMS. Do not add a test for the salt length generated by a provider
when no specific rsa_pss_saltlen option is defined, since that number
could change between providers and provider versions, and we want to
preserve compatibility with older providers.

Signed-off-by: Clemens Lang <cllang at redhat.com>

Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>

(cherry picked from commit 5a3bbe1712435d577bbc5ec046906979e8471d8b)

(Merged from https://github.com/openssl/openssl/pull/19863)




More information about the openssl-commits mailing list