mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
oh, and some more in common/
svn:r2483
This commit is contained in:
parent
aebc3a03ba
commit
5f4a390b33
@ -50,7 +50,7 @@ struct tor_tls_st {
|
||||
} 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_free(tor_tls *tls)
|
||||
* 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_read(tor_tls *tls, char *cp, int len)
|
||||
* 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 @@ tor_tls_peer_has_cert(tor_tls *tls)
|
||||
* 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;
|
||||
|
@ -27,10 +27,10 @@ int tor_tls_context_new(crypto_pk_env_t *rsa, int isServer,
|
||||
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);
|
||||
|
@ -1650,7 +1650,7 @@ char *read_file_to_str(const char *filename, int bin) {
|
||||
* 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:
|
||||
|
Loading…
Reference in New Issue
Block a user