[openssl/openssl] 00bea9: Avoid an unneccessary lock if we didn't add anythi...

Matt Caswell noreply at github.com
Sun Jun 4 23:17:05 UTC 2023


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: 00bea959ab580c78e00eb56780fec8d53dab054d
      https://github.com/openssl/openssl/commit/00bea959ab580c78e00eb56780fec8d53dab054d
  Author: Matt Caswell <matt at openssl.org>
  Date:   2023-06-05 (Mon, 05 Jun 2023)

  Changed paths:
    M crypto/x509/by_dir.c

  Log Message:
  -----------
  Avoid an unneccessary lock if we didn't add anything to the store

Partially fixes #20286

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20952)

(cherry picked from commit 50001e0e15d4a96213c2eea7c56f80087afa89fd)


  Commit: d6e07491ab2838c74e7070bd3247073cb1222e36
      https://github.com/openssl/openssl/commit/d6e07491ab2838c74e7070bd3247073cb1222e36
  Author: Matt Caswell <matt at openssl.org>
  Date:   2023-06-05 (Mon, 05 Jun 2023)

  Changed paths:
    M crypto/x509/x509_lu.c

  Log Message:
  -----------
  Don't take a write lock to retrieve a value from a stack

ossl_x509_store_ctx_get_by_subject() was taking a write lock for the
store, but was only (usually) retrieving a value from the stack of
objects. We take a read lock instead.

Partially fixes #20286

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20952)

(cherry picked from commit 80935bf5ad309bf6c03591acf1d48fe1db57b78f)


Compare: https://github.com/openssl/openssl/compare/8e549ac79ce3...d6e07491ab28


More information about the openssl-commits mailing list