diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | authfd.c | 4 | ||||
-rw-r--r-- | authfile.c | 4 | ||||
-rw-r--r-- | channels.c | 4 | ||||
-rw-r--r-- | kexdh.c | 6 | ||||
-rw-r--r-- | kexgex.c | 6 | ||||
-rw-r--r-- | packet.c | 6 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | sshconnect.c | 4 | ||||
-rw-r--r-- | sshconnect1.c | 12 |
10 files changed, 30 insertions, 27 deletions
@@ -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 $ @@ -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 db6aed83e..c4da9aad3 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 2664726a2..283a70323 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); @@ -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); @@ -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); @@ -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(); @@ -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 fc7920ee8..bafdec95a 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 c0fe86293..c20613571 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(); |