URL:
https://github.com/SSSD/sssd/pull/843
Title: #843: p11_child: prefer better digest function if card supports it
alexey-tikhonov commented:
"""
Hi @sumit-bose,
(1) I have a question about `get_preferred_rsa_mechanism()` function.
Looking at the code, it looks like in theory it can return `CKR_OK` when no [known] mechs
were found on the card. In this case `preferred_mechanism` is set to default
CKM_SHA1_RSA_PKCS but `preferred_evp_md` is left untouched.
In this case `sign_data()` continues with `evp_md = NULL` which seems to be wrong.
Do I miss anything?
(2) Another question is usage of `malloc` in `get_preferred_rsa_mechanism` -- rest of
p11_child code uses talloc*
(3) Unrelated to this patch, but caught my attention: `md_ctx` is created but never freed
in `sign_data()`
"""
See the full comment at
https://github.com/SSSD/sssd/pull/843#issuecomment-507787726