diff options
-rw-r--r-- | sshkey.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 | ||
2001 | static int | 2004 | static int |
2002 | check_rsa_length(const RSA *rsa) | 2005 | check_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 | ||
2012 | static int | 2016 | static int |
2013 | sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp, | 2017 | sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp, |