Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EVP_PKEY_get_default_digest_name() #10824

Closed

Conversation

levitte
Copy link
Member

@levitte levitte commented Jan 13, 2020

This is needed to be able to sign with provider side keys. Yet another fix of issues found by #10797

Please read the commit messages.

@levitte levitte added the branch: master Merge to master branch label Jan 13, 2020
@levitte
Copy link
Member Author

levitte commented Jan 13, 2020

Documentation pending

@levitte levitte force-pushed the add-EVP_PKEY_get_default_digest_name branch 2 times, most recently from 114cd47 to c3c38a0 Compare January 17, 2020 08:12
@levitte levitte changed the title [WIP, Pending #10778] Add EVP_PKEY_get_default_digest_name() Add EVP_PKEY_get_default_digest_name() Jan 17, 2020
@levitte
Copy link
Member Author

levitte commented Jan 17, 2020

Now that #10778 is merged, this has been rebased and taken out of WIP

@@ -31,6 +31,7 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
{
EVP_PKEY_CTX *locpctx = NULL;
EVP_SIGNATURE *signature = NULL;
char locmdname[80] = ""; /* 80 chars should be enough */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have (perhaps internal) #define somewhere for this? Also below in the actual function implementation there is 100. Why this difference?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remember between them...

A macro would be suitable. How about an internal OSSL_MAX_NAMESIZE?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have those in a number of places, so I'll make a sweep and submit that in another PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #10928. If that one gets a quick approval and merge, it'll be easy to rebase this one on top of that, and adapt accordingly.

@levitte levitte force-pushed the add-EVP_PKEY_get_default_digest_name branch from 78bba61 to 8abf7bd Compare January 18, 2020 04:41
doc/man3/EVP_PKEY_get_default_digest_nid.pod Outdated Show resolved Hide resolved
doc/man3/EVP_PKEY_get_default_digest_nid.pod Outdated Show resolved Hide resolved
It is the provider version of EVP_PKEY_get_default_digest_nid().  We make
sure to use it in the non-legacy section of do_sigver_init() (internal
implementation for EVP_DigestSignInit() and EVP_DigestVerifyInit())
@levitte levitte force-pushed the add-EVP_PKEY_get_default_digest_name branch from 8abf7bd to 042281c Compare January 21, 2020 20:16
@mattcaswell mattcaswell added the approval: done This pull request has the required number of approvals label Jan 22, 2020
openssl-machine pushed a commit that referenced this pull request Jan 23, 2020
It is the provider version of EVP_PKEY_get_default_digest_nid().  We make
sure to use it in the non-legacy section of do_sigver_init() (internal
implementation for EVP_DigestSignInit() and EVP_DigestVerifyInit())

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #10824)
openssl-machine pushed a commit that referenced this pull request Jan 23, 2020
…mgmt

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #10824)
@levitte
Copy link
Member Author

levitte commented Jan 23, 2020

Merged.

ead0d23 EVP: Add EVP_PKEY_get_default_digest_name() and use it
8baa49a Add answers for EVP_PKEY_get_default_digest_name() in RSA and DSA keymgmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: done This pull request has the required number of approvals branch: master Merge to master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants