Rename EVP_PKEY_cmp() to EVP_PKEY_eq() and EVP_PKEY_cmp_parameters() to EVP_PKEY_parameters_eq() #11953
Conversation
|
I am not sure the old functions should completely disappear from the documentation. IMO they should stay in the manual page header and synopsis. And the history notice should be amended to mention that the old functions are identical but deprecated. Maybe also mentioning the confusing equality return value would make sense. |
|
All right, done. |
|
Should these changes be reflected also on the provider interface? |
The name in that interface is |
|
Is it correct just to replace
|
|
@vt-alt, no, it would be very hard to change the semantics of |
|
I don't say to change |
|
On equal input, |
|
@DDvO Ah, yes! Thanks. |
|
LGTM now! Good work! |
|
Of course this will require update after #11894 is merged. |
|
Sorry for throwing this in so late, but I'm not sure How about "match" instead of "eq"? (I'll totally blame @romen for reminding me of the name used in the provider interface |
Right - done. |
I agree that "match" typically has a broader meaning than "eq" (equality). Both should be instances of an equivalence relation, mathematically speaking. Both "match" and "eq" are certainly better here than "cmp" (compare), which typically involves an ordering relation (such as "<" or ">="), not an equivalence relation. Also the meaning of equality is generally not as narrow as one might naively expect, not only in mathematics/logics (where AFAICS any equivalence relation would do), but think also of user-defined equality operators that many OO programming languages offer. In our concrete case here in my view "eq" would be broad enough to cover also the case that a private key is not present while the public keys are the same. In particular the difference cannot be large because if the public keys are equal the corresponding private keys, being included or not, (most likely) are equal, too. Moreover, the name "eq" is shorter and easier to read/recognize than "match" |
|
I see you're not much acquainted with lisp But yeahok, I can accept that argument |
|
You should also rename the EVP_PKEY_cmp call from X509_PUBKEY_eq(). |
…to EVP_PKEY_parameters_eq()
Ah, I thought I had already done this, but my |
|
Re-approved. |
|
This pull request is ready to merge |
…to EVP_PKEY_parameters_eq() Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from #11953)
|
Merged after sufficient discussion :) |
As discussed in #11870