summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-06-07 20:23:06 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-06-07 20:23:06 +0000
commit37530f1fce2dc161622b9f5c597003f871496c9b (patch)
tree1a79ab77c56315f24bf3ea5a19ffde0ea4a8c1d6 /usr.bin
parente9d8e8141890250cad627810ff1b0d3c8906647f (diff)
use xxx_put_cstring()
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/authfd.c4
-rw-r--r--usr.bin/ssh/authfile.c4
-rw-r--r--usr.bin/ssh/channels.c4
-rw-r--r--usr.bin/ssh/kexdh.c6
-rw-r--r--usr.bin/ssh/kexgex.c6
-rw-r--r--usr.bin/ssh/packet.c6
-rw-r--r--usr.bin/ssh/ssh.c4
-rw-r--r--usr.bin/ssh/sshconnect.c4
-rw-r--r--usr.bin/ssh/sshconnect1.c12
9 files changed, 25 insertions, 25 deletions
diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c
index 87f3ccfeef2..d0484ba1d8d 100644
--- a/usr.bin/ssh/authfd.c
+++ b/usr.bin/ssh/authfd.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfd.c,v 1.39 2001/04/05 10:42:48 markus Exp $");
+RCSID("$OpenBSD: authfd.c,v 1.40 2001/06/07 20:23:03 markus Exp $");
#include <openssl/evp.h>
@@ -430,7 +430,7 @@ ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment)
buffer_put_bignum(b, key->iqmp); /* ssh key->u */
buffer_put_bignum(b, key->q); /* ssh key->p, SSL key->q */
buffer_put_bignum(b, key->p); /* ssh key->q, SSL key->p */
- buffer_put_string(b, comment, strlen(comment));
+ buffer_put_cstring(b, comment);
}
void
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index 17c58ba1c81..2ba3b73aae6 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/authfile.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.35 2001/05/29 12:31:27 markus Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.36 2001/06/07 20:23:03 markus Exp $");
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -125,7 +125,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase,
buffer_put_int(&encrypted, BN_num_bits(key->rsa->n));
buffer_put_bignum(&encrypted, key->rsa->n);
buffer_put_bignum(&encrypted, key->rsa->e);
- buffer_put_string(&encrypted, comment, strlen(comment));
+ buffer_put_cstring(&encrypted, comment);
/* Allocate space for the private part of the key in the buffer. */
buffer_append_space(&encrypted, &cp, buffer_len(&buffer));
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index e2f5178dd96..944a9aca5b9 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.124 2001/06/05 10:24:32 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.125 2001/06/07 20:23:04 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1019,7 +1019,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
packet_put_int(nc->self);
if (packet_get_protocol_flags() &
SSH_PROTOFLAG_HOST_IN_FWD_OPEN)
- packet_put_string(buf, strlen(buf));
+ packet_put_cstring(buf);
packet_send();
}
xfree(remote_ipaddr);
diff --git a/usr.bin/ssh/kexdh.c b/usr.bin/ssh/kexdh.c
index 7b6a22040a3..40eccf6c23b 100644
--- a/usr.bin/ssh/kexdh.c
+++ b/usr.bin/ssh/kexdh.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: kexdh.c,v 1.3 2001/04/04 09:48:34 markus Exp $");
+RCSID("$OpenBSD: kexdh.c,v 1.4 2001/06/07 20:23:04 markus Exp $");
#include <openssl/crypto.h>
#include <openssl/bn.h>
@@ -55,8 +55,8 @@ kex_dh_hash(
EVP_MD_CTX md;
buffer_init(&b);
- buffer_put_string(&b, client_version_string, strlen(client_version_string));
- buffer_put_string(&b, server_version_string, strlen(server_version_string));
+ buffer_put_cstring(&b, client_version_string);
+ buffer_put_cstring(&b, server_version_string);
/* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */
buffer_put_int(&b, ckexinitlen+1);
diff --git a/usr.bin/ssh/kexgex.c b/usr.bin/ssh/kexgex.c
index 44f2f5c950d..f21f310ee6e 100644
--- a/usr.bin/ssh/kexgex.c
+++ b/usr.bin/ssh/kexgex.c
@@ -24,7 +24,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: kexgex.c,v 1.5 2001/04/05 10:42:50 markus Exp $");
+RCSID("$OpenBSD: kexgex.c,v 1.6 2001/06/07 20:23:04 markus Exp $");
#include <openssl/bn.h>
@@ -57,8 +57,8 @@ kexgex_hash(
EVP_MD_CTX md;
buffer_init(&b);
- buffer_put_string(&b, client_version_string, strlen(client_version_string));
- buffer_put_string(&b, server_version_string, strlen(server_version_string));
+ buffer_put_cstring(&b, client_version_string);
+ buffer_put_cstring(&b, server_version_string);
/* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */
buffer_put_int(&b, ckexinitlen+1);
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 967b0c18c54..d7c90c74900 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.64 2001/05/31 10:30:16 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.65 2001/06/07 20:23:04 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -333,7 +333,7 @@ packet_put_string(const char *buf, u_int len)
void
packet_put_cstring(const char *str)
{
- buffer_put_string(&outgoing_packet, str, strlen(str));
+ buffer_put_cstring(&outgoing_packet, str);
}
void
packet_put_raw(const char *buf, u_int len)
@@ -1079,7 +1079,7 @@ packet_disconnect(const char *fmt,...)
packet_put_cstring("");
} else {
packet_start(SSH_MSG_DISCONNECT);
- packet_put_string(buf, strlen(buf));
+ packet_put_cstring(buf);
}
packet_send();
packet_write_wait();
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index e07a01289be..9a5c6d1761a 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.123 2001/05/31 10:30:17 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.124 2001/06/07 20:23:05 markus Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -847,7 +847,7 @@ ssh_session(void)
cp = getenv("TERM");
if (!cp)
cp = "";
- packet_put_string(cp, strlen(cp));
+ packet_put_cstring(cp);
/* Store window size in the packet. */
if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index b472f81d435..4252929d798 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.106 2001/05/28 23:58:35 markus Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.107 2001/06/07 20:23:05 markus Exp $");
#include <openssl/bn.h>
@@ -791,7 +791,7 @@ ssh_put_password(char *password)
char *padded;
if (datafellows & SSH_BUG_PASSWORDPAD) {
- packet_put_string(password, strlen(password));
+ packet_put_cstring(password);
return;
}
size = roundup(strlen(password) + 1, 32);
diff --git a/usr.bin/ssh/sshconnect1.c b/usr.bin/ssh/sshconnect1.c
index c0fe86293be..c20613571e8 100644
--- a/usr.bin/ssh/sshconnect1.c
+++ b/usr.bin/ssh/sshconnect1.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect1.c,v 1.32 2001/05/18 14:13:29 markus Exp $");
+RCSID("$OpenBSD: sshconnect1.c,v 1.33 2001/06/07 20:23:05 markus Exp $");
#include <openssl/bn.h>
#include <openssl/evp.h>
@@ -332,7 +332,7 @@ try_rhosts_rsa_authentication(const char *local_user, Key * host_key)
/* Tell the server that we are willing to authenticate using this key. */
packet_start(SSH_CMSG_AUTH_RHOSTS_RSA);
- packet_put_string(local_user, strlen(local_user));
+ packet_put_cstring(local_user);
packet_put_int(BN_num_bits(host_key->rsa->n));
packet_put_bignum(host_key->rsa->e);
packet_put_bignum(host_key->rsa->n);
@@ -527,7 +527,7 @@ send_kerberos_tgt(void)
xfree(creds);
packet_start(SSH_CMSG_HAVE_KERBEROS_TGT);
- packet_put_string(buffer, strlen(buffer));
+ packet_put_cstring(buffer);
packet_send();
packet_write_wait();
@@ -594,7 +594,7 @@ send_afs_tokens(void)
if (creds_to_radix(&creds, (u_char *) buffer, sizeof buffer) <= 0)
break;
packet_start(SSH_CMSG_HAVE_AFS_TOKEN);
- packet_put_string(buffer, strlen(buffer));
+ packet_put_cstring(buffer);
packet_send();
packet_write_wait();
@@ -922,7 +922,7 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host,
/* Send the name of the user to log in as on the server. */
packet_start(SSH_CMSG_USER);
- packet_put_string(server_user, strlen(server_user));
+ packet_put_cstring(server_user);
packet_send();
packet_write_wait();
@@ -980,7 +980,7 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host,
options.rhosts_authentication) {
debug("Trying rhosts authentication.");
packet_start(SSH_CMSG_AUTH_RHOSTS);
- packet_put_string(local_user, strlen(local_user));
+ packet_put_cstring(local_user);
packet_send();
packet_write_wait();