[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] oh, and some more in common/
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
tortls.c tortls.h util.c
Log Message:
oh, and some more in common/
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- tortls.c 25 Aug 2004 17:37:00 -0000 1.65
+++ tortls.c 14 Oct 2004 02:48:57 -0000 1.66
@@ -50,7 +50,7 @@
} state; /**< The current SSL state, depending on which operations have
* completed successfully. */
int isServer;
- int wantwrite_n; /**< 0 normally, >0 if we returned wantwrite last time. */
+ size_t wantwrite_n; /**< 0 normally, >0 if we returned wantwrite last time. */
};
static X509* tor_tls_create_certificate(crypto_pk_env_t *rsa,
@@ -429,7 +429,7 @@
* TOR_TLS_CLOSE, TOR_TLS_WANTREAD, or TOR_TLS_WANTWRITE.
*/
int
-tor_tls_read(tor_tls *tls, char *cp, int len)
+tor_tls_read(tor_tls *tls, char *cp, size_t len)
{
int r, err;
tor_assert(tls && tls->ssl);
@@ -454,7 +454,7 @@
* TOR_TLS_WANTREAD, or TOR_TLS_WANTWRITE.
*/
int
-tor_tls_write(tor_tls *tls, char *cp, int n)
+tor_tls_write(tor_tls *tls, char *cp, size_t n)
{
int r, err;
tor_assert(tls && tls->ssl);
@@ -580,7 +580,7 @@
* claims to have.
*/
int
-tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, int buflen)
+tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, size_t buflen)
{
X509 *cert = NULL;
X509_NAME *name = NULL;
Index: tortls.h
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- tortls.h 22 Jul 2004 04:53:34 -0000 1.18
+++ tortls.h 14 Oct 2004 02:48:57 -0000 1.19
@@ -27,10 +27,10 @@
tor_tls *tor_tls_new(int sock, int is_server, int use_no_cert);
void tor_tls_free(tor_tls *tls);
int tor_tls_peer_has_cert(tor_tls *tls);
-int tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, int buflen);
+int tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, size_t buflen);
int tor_tls_verify(tor_tls *tls, crypto_pk_env_t **identity);
-int tor_tls_read(tor_tls *tls, char *cp, int len);
-int tor_tls_write(tor_tls *tls, char *cp, int n);
+int tor_tls_read(tor_tls *tls, char *cp, size_t len);
+int tor_tls_write(tor_tls *tls, char *cp, size_t n);
int tor_tls_handshake(tor_tls *tls);
int tor_tls_shutdown(tor_tls *tls);
int tor_tls_get_pending_bytes(tor_tls *tls);
Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- util.c 12 Oct 2004 20:20:19 -0000 1.144
+++ util.c 14 Oct 2004 02:48:57 -0000 1.145
@@ -1650,7 +1650,7 @@
* that is whitespace or comment.
* Return 1 if success, 0 if no more lines, -1 if error.
*/
-int parse_line_from_file(char *line, int maxlen, FILE *f, char **key_out, char **value_out) {
+int parse_line_from_file(char *line, size_t maxlen, FILE *f, char **key_out, char **value_out) {
char *s, *key, *end, *value;
try_next_line: