summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh-keysign.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-19 00:27:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-19 00:27:56 +0000
commit6b0fdff1f7b87ede47d85e90a1d570a842cfcdec (patch)
tree69e83beb3e4c585a4f1543a3558c53037acb563a /usr.bin/ssh/ssh-keysign.c
parent1b4f13da9f72873bc2f66c3b4e80c7c1b2813844 (diff)
KNF done automatically while reading....
Diffstat (limited to 'usr.bin/ssh/ssh-keysign.c')
-rw-r--r--usr.bin/ssh/ssh-keysign.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c
index 41899ff204b..0f69b9b044b 100644
--- a/usr.bin/ssh/ssh-keysign.c
+++ b/usr.bin/ssh/ssh-keysign.c
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keysign.c,v 1.3 2002/06/08 05:07:09 markus Exp $");
+RCSID("$OpenBSD: ssh-keysign.c,v 1.4 2002/06/19 00:27:55 deraadt Exp $");
#include <openssl/evp.h>
@@ -53,7 +53,7 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data,
buffer_init(&b);
buffer_append(&b, data, datalen);
-
+
/* session id, currently limited to SHA1 (20 bytes) */
p = buffer_get_string(&b, &len);
if (len != 20)
@@ -98,9 +98,9 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data,
if (strlen(host) != len - 1)
fail++;
else if (p[len - 1] != '.')
- fail++;
+ fail++;
else if (strncasecmp(host, p, len - 1) != 0)
- fail++;
+ fail++;
xfree(p);
/* local user */
@@ -143,14 +143,14 @@ main(int argc, char **argv)
#ifdef DEBUG_SSH_KEYSIGN
log_init("ssh-keysign", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 0);
-#endif
+#endif
if (key_fd[0] == -1 && key_fd[1] == -1)
fatal("could not open any host key");
if ((pw = getpwuid(getuid())) == NULL)
fatal("getpwuid failed");
- pw = pwcopy(pw);
+ pw = pwcopy(pw);
SSLeay_add_all_algorithms();
@@ -178,7 +178,7 @@ main(int argc, char **argv)
fatal("bad fd");
if ((host = get_local_name(fd)) == NULL)
fatal("cannot get sockname for fd");
-
+
data = buffer_get_string(&b, &dlen);
if (valid_request(pw, host, &key, data, dlen) < 0)
fatal("not a valid request");
@@ -198,7 +198,7 @@ main(int argc, char **argv)
if (key_sign(keys[i], &signature, &slen, data, dlen) != 0)
fatal("key_sign failed");
-
+
/* send reply */
buffer_clear(&b);
buffer_put_string(&b, signature, slen);