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
Add EVP_PKEY_get_default_digest_name() #10824
Conversation
Documentation pending |
114cd47
to
c3c38a0
Compare
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 */ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be fine.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
78bba61
to
8abf7bd
Compare
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())
8abf7bd
to
042281c
Compare
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)
…mgmt Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #10824)
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.