aboutsummaryrefslogtreecommitdiff
path: root/src/pki_mbedcrypto.c
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-08-23 13:30:46 +0200
committerAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-09-24 16:49:35 +0200
commit55cd04fbee7bf6c8157e2338695b03342615a261 (patch)
treef716a5fc5eab6fd59763f2daa6a9e7efdae17acb /src/pki_mbedcrypto.c
parent2a2c1c98bf4129f4c70ec1fef6558c2e5af15e5d (diff)
downloadlibssh-55cd04fbee7bf6c8157e2338695b03342615a261.tar.gz
libssh-55cd04fbee7bf6c8157e2338695b03342615a261.tar.xz
libssh-55cd04fbee7bf6c8157e2338695b03342615a261.zip
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>
Diffstat (limited to 'src/pki_mbedcrypto.c')
-rw-r--r--src/pki_mbedcrypto.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/pki_mbedcrypto.c b/src/pki_mbedcrypto.c
index 7236210a..3774192f 100644
--- a/src/pki_mbedcrypto.c
+++ b/src/pki_mbedcrypto.c
@@ -1022,42 +1022,6 @@ ssh_signature pki_signature_from_blob(const ssh_key pubkey,
return sig;
}
-int pki_signature_verify(ssh_session session, const ssh_signature sig, const
- ssh_key key, const unsigned char *input, size_t input_len)
-{
- int rc;
-
- if (session == NULL || sig == NULL || key == NULL || input == NULL) {
- SSH_LOG(SSH_LOG_TRACE, "Bad parameter provided to "
- "pki_signature_verify()");
- return SSH_ERROR;
- }
-
- if (ssh_key_type_plain(key->type) != sig->type) {
- SSH_LOG(SSH_LOG_WARN,
- "Can not verify %s signature with %s key",
- sig->type_c,
- key->type_c);
- return SSH_ERROR;
- }
-
- /* Check if public key and hash type are compatible */
- rc = pki_key_check_hash_compatible(key, sig->hash_type);
- if (rc != SSH_OK) {
- return SSH_ERROR;
- }
-
- rc = pki_verify_data_signature(sig, key, input, input_len);
- if (rc != SSH_OK){
- ssh_set_error(session,
- SSH_FATAL,
- "Signature verification error");
- return SSH_ERROR;
- }
-
- return SSH_OK;
-}
-
static ssh_string rsa_do_sign_hash(const unsigned char *digest,
int dlen,
mbedtls_pk_context *privkey,