summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-09 01:42:01 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-09 01:42:01 +0000
commit664408d2a794806722aa3f321b92c7bdd667c42e (patch)
tree0dbce8250bc4d6325ed2f2b6950221a24d62dc2a
parent9d0c06667eb4ca616ffa690e88b9dd7c438e3103 (diff)
- markus@cvs.openbsd.org 2001/06/07 20:23:05
[authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c sshconnect.c sshconnect1.c] use xxx_put_cstring()
-rw-r--r--ChangeLog7
-rw-r--r--authfd.c4
-rw-r--r--authfile.c4
-rw-r--r--channels.c4
-rw-r--r--kexdh.c6
-rw-r--r--kexgex.c6
-rw-r--r--packet.c6
-rw-r--r--ssh.c4
-rw-r--r--sshconnect.c4
-rw-r--r--sshconnect1.c12
10 files changed, 30 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index a00010ee..b343a6d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,7 +66,10 @@
[auth2.c]
style is used for bsdauth.
disconnect on user/service change (ietf-drafts)
-
+ - markus@cvs.openbsd.org 2001/06/07 20:23:05
+ [authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c
+ sshconnect.c sshconnect1.c]
+ use xxx_put_cstring()
20010606
- OpenBSD CVS Sync
- markus@cvs.openbsd.org 2001/05/17 21:34:15
@@ -5577,4 +5580,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1266 2001/06/09 01:40:00 mouring Exp $
+$Id: ChangeLog,v 1.1267 2001/06/09 01:42:01 mouring Exp $
diff --git a/authfd.c b/authfd.c
index 3e1ef818..9f47b0ae 100644
--- a/authfd.c
+++ b/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>
@@ -432,7 +432,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/authfile.c b/authfile.c
index db6aed83..c4da9aad 100644
--- a/authfile.c
+++ b/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/channels.c b/channels.c
index 2664726a..283a7032 100644
--- a/channels.c
+++ b/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/kexdh.c b/kexdh.c
index 7b6a2204..40eccf6c 100644
--- a/kexdh.c
+++ b/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/kexgex.c b/kexgex.c
index 44f2f5c9..f21f310e 100644
--- a/kexgex.c
+++ b/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/packet.c b/packet.c
index 402259a9..d3a43609 100644
--- a/packet.c
+++ b/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/ssh.c b/ssh.c
index 07947dc6..4859c5be 100644
--- a/ssh.c
+++ b/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>
@@ -868,7 +868,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/sshconnect.c b/sshconnect.c
index fc7920ee..bafdec95 100644
--- a/sshconnect.c
+++ b/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>
@@ -799,7 +799,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/sshconnect1.c b/sshconnect1.c
index c0fe8629..c2061357 100644
--- a/sshconnect1.c
+++ b/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();