7f0a8f5 p11_child: prefer better digest function if card supports it

1 file Authored by sbose 4 years ago, Committed by jhrozek 4 years ago,
    p11_child: prefer better digest function if card supports it
    
    To improve FIPS compliance and security in general p11_child now checks
    which message digest functions (hashes) are support for RSA keys and
    tries to use the highest bit length supported.
    
    For EC keys sha512 is used unconditionally.
    
    Related to https://pagure.io/SSSD/sssd/issue/4039
    
    Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>