Mercurial > dropbear
comparison rsa.c @ 801:7dcb46da72d9 ecc
merge in HEAD
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 21 May 2013 12:09:35 +0800 |
parents | f336d232fc63 9a5438271556 |
children | 724c3e0c8734 |
comparison
equal
deleted
inserted
replaced
799:c344607b7341 | 801:7dcb46da72d9 |
---|---|
136 | 136 |
137 | 137 |
138 /* Clear and free the memory used by a public or private key */ | 138 /* Clear and free the memory used by a public or private key */ |
139 void rsa_key_free(dropbear_rsa_key *key) { | 139 void rsa_key_free(dropbear_rsa_key *key) { |
140 | 140 |
141 TRACE(("enter rsa_key_free")) | 141 TRACE2(("enter rsa_key_free")) |
142 | 142 |
143 if (key == NULL) { | 143 if (key == NULL) { |
144 TRACE(("leave rsa_key_free: key == NULL")) | 144 TRACE2(("leave rsa_key_free: key == NULL")) |
145 return; | 145 return; |
146 } | 146 } |
147 if (key->d) { | 147 if (key->d) { |
148 mp_clear(key->d); | 148 mp_clear(key->d); |
149 m_free(key->d); | 149 m_free(key->d); |
163 if (key->q) { | 163 if (key->q) { |
164 mp_clear(key->q); | 164 mp_clear(key->q); |
165 m_free(key->q); | 165 m_free(key->q); |
166 } | 166 } |
167 m_free(key); | 167 m_free(key); |
168 TRACE(("leave rsa_key_free")) | 168 TRACE2(("leave rsa_key_free")) |
169 } | 169 } |
170 | 170 |
171 /* Put the public rsa key into the buffer in the required format: | 171 /* Put the public rsa key into the buffer in the required format: |
172 * | 172 * |
173 * string "ssh-rsa" | 173 * string "ssh-rsa" |