summaryrefslogtreecommitdiff
path: root/sshkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshkey.c')
-rw-r--r--sshkey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshkey.c b/sshkey.c
index 4bd975ce9..63c01ea67 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1863,12 +1863,14 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
1863 r = 0; 1863 r = 0;
1864 out: 1864 out:
1865 sshkey_free(n); 1865 sshkey_free(n);
1866#ifdef WITH_OPENSSL
1866 BN_clear_free(rsa_n_dup); 1867 BN_clear_free(rsa_n_dup);
1867 BN_clear_free(rsa_e_dup); 1868 BN_clear_free(rsa_e_dup);
1868 BN_clear_free(dsa_p_dup); 1869 BN_clear_free(dsa_p_dup);
1869 BN_clear_free(dsa_q_dup); 1870 BN_clear_free(dsa_q_dup);
1870 BN_clear_free(dsa_g_dup); 1871 BN_clear_free(dsa_g_dup);
1871 BN_clear_free(dsa_pub_key_dup); 1872 BN_clear_free(dsa_pub_key_dup);
1873#endif
1872 1874
1873 return r; 1875 return r;
1874} 1876}
@@ -1998,6 +2000,7 @@ cert_parse(struct sshbuf *b, struct sshkey *key, struct sshbuf *certbuf)
1998 return ret; 2000 return ret;
1999} 2001}
2000 2002
2003#ifdef WITH_OPENSSL
2001static int 2004static int
2002check_rsa_length(const RSA *rsa) 2005check_rsa_length(const RSA *rsa)
2003{ 2006{
@@ -2008,6 +2011,7 @@ check_rsa_length(const RSA *rsa)
2008 return SSH_ERR_KEY_LENGTH; 2011 return SSH_ERR_KEY_LENGTH;
2009 return 0; 2012 return 0;
2010} 2013}
2014#endif
2011 2015
2012static int 2016static int
2013sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp, 2017sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,