diff options
Diffstat (limited to 'src/pki_crypto.c')
-rw-r--r-- | src/pki_crypto.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c index f73199c8..13198249 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -1856,46 +1856,6 @@ error: return NULL; } -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 const EVP_MD *pki_digest_to_md(enum ssh_digest_e hash_type) { const EVP_MD *md = NULL; |