diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-16 13:37:16 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-16 13:37:16 +1100 |
commit | 7e8e820153a620ab1dcd81857a7de0969c41d043 (patch) | |
tree | 226cc4185feae97f4069ad60b4c18d259aa5df2f /ssh-add.c | |
parent | 4874c79a3a05fc18678d7a85d7091f5139630fac (diff) |
- Merged OpenBSD CVS changes:
- [auth-rh-rsa.c auth-rsa.c authfd.c authfd.h hostfile.c mpaux.c]
[mpaux.h ssh-add.c ssh-agent.c ssh.h ssh.c sshd.c]
the keysize of rsa-parameter 'n' is passed implizit,
a few more checks and warnings about 'pretended' keysizes.
- [cipher.c cipher.h packet.c packet.h sshd.c]
remove support for cipher RC4
- [ssh.c]
a note for legay systems about secuity issues with permanently_set_uid(),
the private hostkey and ptrace()
- [sshconnect.c]
more detailed messages about adding and checking hostkeys
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 37 |
1 files changed, 18 insertions, 19 deletions
@@ -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.8 1999/11/15 06:10:57 damien Exp $"); +RCSID("$Id: ssh-add.c,v 1.9 1999/11/16 02:37:16 damien Exp $"); #include "rsa.h" #include "ssh.h" @@ -133,33 +133,32 @@ void list_identities(AuthenticationConnection *ac) { BIGNUM *e, *n; - int bits, status; + int status; char *comment; int had_identities; e = BN_new(); n = BN_new(); had_identities = 0; - for (status = ssh_get_first_identity(ac, &bits, e, n, &comment); + for (status = ssh_get_first_identity(ac, e, n, &comment); status; - status = ssh_get_next_identity(ac, &bits, e, n, &comment)) + status = ssh_get_next_identity(ac, e, n, &comment)) { - char *buf; + char *ebuf, *nbuf; had_identities = 1; - printf("%d ", bits); - buf = BN_bn2dec(e); - if (buf != NULL) { - printf("%s ", buf); - free (buf); - } else { - error("list_identities: BN_bn2dec #1 failed."); - } - buf = BN_bn2dec(n); - if (buf != NULL) { - printf("%s %s\n", buf, comment); - free (buf); - } else { - error("list_identities: BN_bn2dec #2 failed."); + ebuf = BN_bn2dec(e); + if (ebuf == NULL) { + error("list_identities: BN_bn2dec(e) failed."); + }else{ + nbuf = BN_bn2dec(n); + if (nbuf == NULL) { + error("list_identities: BN_bn2dec(n) failed."); + }else{ + unsigned int bits = BN_num_bits(n); + printf("%d %s %s %s\n", bits, ebuf, nbuf, comment); + free(nbuf); + } + free(ebuf); } xfree(comment); } |