pki: Remove unused function pki_signature_verify()

This removes unused function pki_signature_verify()
from pki_{crypto, mbedcrypto, gcrypt}.  The function was also removed
from include/libssh/pki_priv.h.  The function ssh_pki_signature_verify()
was changed to receive a const unsigned char *input.

All tests calling pki_signature_verify() were changed to call
ssh_pki_signature_verify() instead.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 55cd04fbee)
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-08-23 13:30:46 +02:00
parent c60ac3fe02
commit b56ffd8424
12 changed files with 35 additions and 157 deletions

View File

@@ -331,7 +331,7 @@ static void torture_pki_verify_mismatch(void **state)
assert_int_equal(import_sig->type, key->type);
assert_string_equal(import_sig->type_c, skey_attrs.sig_type_c);
rc = pki_signature_verify(session,
rc = ssh_pki_signature_verify(session,
import_sig,
pubkey,
INPUT,
@@ -374,7 +374,7 @@ static void torture_pki_verify_mismatch(void **state)
assert_non_null(verify_pubkey);
/* Should gracefully fail, but not crash */
rc = pki_signature_verify(session,
rc = ssh_pki_signature_verify(session,
sign,
verify_pubkey,
INPUT,
@@ -382,7 +382,7 @@ static void torture_pki_verify_mismatch(void **state)
assert_true(rc != SSH_OK);
/* Try the same with the imported signature */
rc = pki_signature_verify(session,
rc = ssh_pki_signature_verify(session,
import_sig,
verify_pubkey,
INPUT,
@@ -401,7 +401,7 @@ static void torture_pki_verify_mismatch(void **state)
assert_string_equal(new_sig->type_c, skey_attrs.sig_type_c);
/* The verification should not work */
rc = pki_signature_verify(session,
rc = ssh_pki_signature_verify(session,
new_sig,
verify_pubkey,
INPUT,