HomePhabricator

pki_crypto: Use EVP_DigestSign* and EVP_DigestVerify*

Authored by Anderson Toshiyuki Sasaki <ansasaki@redhat.com> on Aug 7 2019, 2:08 PM.

Description

pki_crypto: Use EVP_DigestSign* and EVP_DigestVerify*

Use the newer APIs EVP_DigestSign{Init}() and EVP_DigestVerify{Init}()
to generate and verify signatures instead of the older EVP_Sign{Init,
Update, Final} and EVP_Verify{Init, Update, Final} if supported.

Also use the single shot signature/verification if supported as all the
input is provided at once.

This is a preparation to use Ed25519 implementation from OpenSSL.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 90944a36513ba730774dc6ca562788391d64a306)