summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-08 16:15:55 +1100
committerDamien Miller <djm@mindrot.org>1999-11-08 16:15:55 +1100
commitfd7c911f090749774cf1869420523c4811beeeb0 (patch)
treecd57567ddb3371c0c805a8bd8ace0c66df02fa53 /ssh-add.c
parent5ac5f1ca6b5270e1a755d75120f8217f5850c9b2 (diff)
Merged OpenBSD CVS changes that go awayV_1_2_PRE8
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 8effcdb0..07c33d87 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -14,7 +14,7 @@ Adds an identity to the authentication server, or removes an identity.
*/
#include "includes.h"
-RCSID("$Id: ssh-add.c,v 1.3 1999/11/08 04:30:59 damien Exp $");
+RCSID("$Id: ssh-add.c,v 1.4 1999/11/08 05:15:55 damien Exp $");
#include "rsa.h"
#include "ssh.h"
@@ -201,13 +201,19 @@ list_identities(AuthenticationConnection *ac)
had_identities = 1;
printf("%d ", bits);
buf = BN_bn2dec(e);
- assert(buf != NULL);
- printf("%s ", buf);
- free (buf);
+ if (buf != NULL) {
+ printf("%s ", buf);
+ free (buf);
+ } else {
+ error("list_identities: BN_bn2dec #1 failed.");
+ }
buf = BN_bn2dec(n);
- assert(buf != NULL);
- printf("%s %s\n", buf, comment);
- free (buf);
+ if (buf != NULL) {
+ printf("%s %s\n", buf, comment);
+ free (buf);
+ } else {
+ error("list_identities: BN_bn2dec #2 failed.");
+ }
xfree(comment);
}
BN_clear_free(e);