diff options
Diffstat (limited to 'src/pki_crypto.c')
-rw-r--r-- | src/pki_crypto.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c index 8f3b21ea..366b377d 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -1601,6 +1601,14 @@ ssh_signature pki_signature_from_blob(const ssh_key pubkey, int rc; BIGNUM *pr = NULL, *ps = NULL; + if (type != pubkey->type) { + SSH_LOG(SSH_LOG_WARN, + "Incompatible public key provided (%d) expecting (%d)", + type, + pubkey->type); + return NULL; + } + sig = ssh_signature_new(); if (sig == NULL) { return NULL; |