openssl / openssl/openssl

Algorithm fetching depends on the value of *no_store set in query operation

Open
#16,745 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

branch: 3.0 branch: 3.1 branch: 3.2 branch: master triaged: bug
Dominant language
C
Stars
30.8k
Forks
11.5k
Avg merge
10m
Merged PRs (30d)
1

Description

In a custom provider, setting *no_store = 1 in its query_operation() makes it not to fetch an algorithm from it even with a prop query that would expect otherwise.

How to reproduce: With "default" and a custom provider "foo" loaded in the same libctx, call EVP_SIGNATURE_fetch() with propq = "?provider=foo". It returns the method from "foo" only if *no_store = 0 is in its query_operation. Otherwise it picks it from "default". With propq = "provider=foo" it always finds the method in "foo", though.

Althoug the "?" makes it optional, the change in behaviour just because of no_store=1 looks like weird to me.

Is this to be expected or a bug?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with EVP_SIGNATURE_fetch() and the custom provider's query_operation(), focusing on how propq values "?provider=foo" and "provider=foo" interact with *no_store. Reproduce the difference using the default and foo providers, then determine the intended behavior and document it with a regression test if the behavior is incorrect.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.