Fix openssl-1.1 fallout for --without-openssl.

ok djm@
This commit is contained in:
Darren Tucker 2018-09-15 19:44:06 +10:00
parent 149519b9f2
commit cce8cbe0ed
1 changed files with 4 additions and 0 deletions

View File

@ -1863,12 +1863,14 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
r = 0; r = 0;
out: out:
sshkey_free(n); sshkey_free(n);
#ifdef WITH_OPENSSL
BN_clear_free(rsa_n_dup); BN_clear_free(rsa_n_dup);
BN_clear_free(rsa_e_dup); BN_clear_free(rsa_e_dup);
BN_clear_free(dsa_p_dup); BN_clear_free(dsa_p_dup);
BN_clear_free(dsa_q_dup); BN_clear_free(dsa_q_dup);
BN_clear_free(dsa_g_dup); BN_clear_free(dsa_g_dup);
BN_clear_free(dsa_pub_key_dup); BN_clear_free(dsa_pub_key_dup);
#endif
return r; return r;
} }
@ -1998,6 +2000,7 @@ cert_parse(struct sshbuf *b, struct sshkey *key, struct sshbuf *certbuf)
return ret; return ret;
} }
#ifdef WITH_OPENSSL
static int static int
check_rsa_length(const RSA *rsa) check_rsa_length(const RSA *rsa)
{ {
@ -2008,6 +2011,7 @@ check_rsa_length(const RSA *rsa)
return SSH_ERR_KEY_LENGTH; return SSH_ERR_KEY_LENGTH;
return 0; return 0;
} }
#endif
static int static int
sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp, sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,