summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/ssh-add.c b/ssh-add.c
index 8effcdb07..07c33d87b 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -14,7 +14,7 @@ Adds an identity to the authentication server, or removes an identity.
14*/ 14*/
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: ssh-add.c,v 1.3 1999/11/08 04:30:59 damien Exp $"); 17RCSID("$Id: ssh-add.c,v 1.4 1999/11/08 05:15:55 damien Exp $");
18 18
19#include "rsa.h" 19#include "rsa.h"
20#include "ssh.h" 20#include "ssh.h"
@@ -201,13 +201,19 @@ list_identities(AuthenticationConnection *ac)
201 had_identities = 1; 201 had_identities = 1;
202 printf("%d ", bits); 202 printf("%d ", bits);
203 buf = BN_bn2dec(e); 203 buf = BN_bn2dec(e);
204 assert(buf != NULL); 204 if (buf != NULL) {
205 printf("%s ", buf); 205 printf("%s ", buf);
206 free (buf); 206 free (buf);
207 } else {
208 error("list_identities: BN_bn2dec #1 failed.");
209 }
207 buf = BN_bn2dec(n); 210 buf = BN_bn2dec(n);
208 assert(buf != NULL); 211 if (buf != NULL) {
209 printf("%s %s\n", buf, comment); 212 printf("%s %s\n", buf, comment);
210 free (buf); 213 free (buf);
214 } else {
215 error("list_identities: BN_bn2dec #2 failed.");
216 }
211 xfree(comment); 217 xfree(comment);
212 } 218 }
213 BN_clear_free(e); 219 BN_clear_free(e);