diff --git a/README.md b/README.md index aa435428..fa88bf88 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ The `go-libtor` project is a self-contained, fully statically linked Tor library | Library | Version | Commit | |:-:|:-:|:-:| | zlib | 1.2.11 | [`cacf7f1d4e3d44d871b605da3b647f07d718623f`](https://github.com/madler/zlib/commit/cacf7f1d4e3d44d871b605da3b647f07d718623f) | -| libevent | 2.2.0-alpha-dev | [`8e5e7bb8a82458ba5ac4193d88cef38a3ad6dddb`](https://github.com/libevent/libevent/commit/8e5e7bb8a82458ba5ac4193d88cef38a3ad6dddb) | -| openssl | 1.1.1-stable | [`122e5f7c010859f0b2984d553fa45cd1f18a6fc4`](https://github.com/openssl/openssl/commit/122e5f7c010859f0b2984d553fa45cd1f18a6fc4) | +| libevent | 2.2.0-alpha-dev | [`d433f847334fff9da8e13e2dc7fdf5c0997b20b0`](https://github.com/libevent/libevent/commit/d433f847334fff9da8e13e2dc7fdf5c0997b20b0) | +| openssl | 1.1.1-stable | [`46dc0bca6cd623c42489c57e62c69cf568335664`](https://github.com/openssl/openssl/commit/46dc0bca6cd623c42489c57e62c69cf568335664) | | tor | 0.3.5.14-dev | [`1693b6151e1369ce0938761cac95e7a0a524f5f3`](https://gitweb.torproject.org/tor.git/commit/?id=1693b6151e1369ce0938761cac95e7a0a524f5f3) | The library is currently supported on: diff --git a/darwin/libevent/buffer.c b/darwin/libevent/buffer.c index 121b37c0..f74bbfaa 100644 --- a/darwin/libevent/buffer.c +++ b/darwin/libevent/buffer.c @@ -34,12 +34,6 @@ #include #endif -#ifdef EVENT__HAVE_VASPRINTF -/* If we have vasprintf, we need to define _GNU_SOURCE before we include - * stdio.h. This comes from evconfig-private.h. - */ -#endif - #include #ifdef EVENT__HAVE_SYS_TIME_H @@ -2513,7 +2507,6 @@ evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t dest_fd, return (len); #elif defined(SENDFILE_IS_LINUX) - /* TODO(niels): implement splice */ res = sendfile(dest_fd, source_fd, &offset, chain->off); if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) { /* if this is EAGAIN or EINTR return 0; otherwise, -1 */ diff --git a/darwin/libevent/config.h b/darwin/libevent/config.h index 4084c9ba..0d849c0d 100644 --- a/darwin/libevent/config.h +++ b/darwin/libevent/config.h @@ -231,9 +231,6 @@ /* Define to 1 if you have the `signal' function. */ #define HAVE_SIGNAL 1 -/* Define to 1 if you have the `splice' function. */ -/* #undef HAVE_SPLICE */ - /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 @@ -414,9 +411,6 @@ /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - /* Define if your system supports the wepoll module */ /* #undef HAVE_WEPOLL */ diff --git a/darwin/libevent/include/event2/buffer.h b/darwin/libevent/include/event2/buffer.h index a9afc3c6..5a76cf20 100644 --- a/darwin/libevent/include/event2/buffer.h +++ b/darwin/libevent/include/event2/buffer.h @@ -552,10 +552,9 @@ int evbuffer_add_file(struct evbuffer *outbuf, int fd, ev_off_t offset, /** An evbuffer_file_segment holds a reference to a range of a file -- possibly the whole file! -- for use in writing from an evbuffer to a - socket. It could be implemented with mmap, sendfile, splice, or (if all - else fails) by just pulling all the data into RAM. A single - evbuffer_file_segment can be added more than once, and to more than one - evbuffer. + socket. It could be implemented with mmap or sendfile, or (if all else + fails) by just pulling all the data into RAM. A single evbuffer_file_segment + can be added more than once, and to more than one evbuffer. */ struct evbuffer_file_segment; @@ -572,7 +571,7 @@ struct evbuffer_file_segment; #define EVBUF_FS_DISABLE_MMAP 0x02 /** Flag for creating evbuffer_file_segment: Disable direct fd-to-fd - implementations (including sendfile and splice). + implementations (sendfile). You might want to use this option if data needs to be taken from the evbuffer by any means other than writing it to the network: the sendfile @@ -600,7 +599,7 @@ typedef void (*evbuffer_file_segment_cleanup_cb)( file and sending it out via an evbuffer. This function avoids unnecessary data copies between userland and - kernel. Where available, it uses sendfile or splice. + kernel. Where available, it uses sendfile. The file descriptor must not be closed so long as any evbuffer is using this segment. diff --git a/darwin/openssl/ssl/bio_ssl.c b/darwin/openssl/ssl/bio_ssl.c index 53129bfb..75c78b9a 100644 --- a/darwin/openssl/ssl/bio_ssl.c +++ b/darwin/openssl/ssl/bio_ssl.c @@ -451,6 +451,7 @@ BIO *BIO_new_ssl_connect(SSL_CTX *ctx) goto err; return ret; err: + BIO_free(ssl); BIO_free(con); #endif return NULL; diff --git a/linux/libevent/buffer.c b/linux/libevent/buffer.c index 121b37c0..f74bbfaa 100644 --- a/linux/libevent/buffer.c +++ b/linux/libevent/buffer.c @@ -34,12 +34,6 @@ #include #endif -#ifdef EVENT__HAVE_VASPRINTF -/* If we have vasprintf, we need to define _GNU_SOURCE before we include - * stdio.h. This comes from evconfig-private.h. - */ -#endif - #include #ifdef EVENT__HAVE_SYS_TIME_H @@ -2513,7 +2507,6 @@ evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t dest_fd, return (len); #elif defined(SENDFILE_IS_LINUX) - /* TODO(niels): implement splice */ res = sendfile(dest_fd, source_fd, &offset, chain->off); if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) { /* if this is EAGAIN or EINTR return 0; otherwise, -1 */ diff --git a/linux/libevent/config.h b/linux/libevent/config.h index 433c4966..fe0e94d8 100644 --- a/linux/libevent/config.h +++ b/linux/libevent/config.h @@ -231,9 +231,6 @@ /* Define to 1 if you have the `signal' function. */ #define HAVE_SIGNAL 1 -/* Define to 1 if you have the `splice' function. */ -#define HAVE_SPLICE 1 - /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 @@ -414,9 +411,6 @@ /* Define to 1 if you have the `usleep' function. */ #define HAVE_USLEEP 1 -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - /* Define if your system supports the wepoll module */ /* #undef HAVE_WEPOLL */ diff --git a/linux/libevent/include/event2/buffer.h b/linux/libevent/include/event2/buffer.h index a9afc3c6..5a76cf20 100644 --- a/linux/libevent/include/event2/buffer.h +++ b/linux/libevent/include/event2/buffer.h @@ -552,10 +552,9 @@ int evbuffer_add_file(struct evbuffer *outbuf, int fd, ev_off_t offset, /** An evbuffer_file_segment holds a reference to a range of a file -- possibly the whole file! -- for use in writing from an evbuffer to a - socket. It could be implemented with mmap, sendfile, splice, or (if all - else fails) by just pulling all the data into RAM. A single - evbuffer_file_segment can be added more than once, and to more than one - evbuffer. + socket. It could be implemented with mmap or sendfile, or (if all else + fails) by just pulling all the data into RAM. A single evbuffer_file_segment + can be added more than once, and to more than one evbuffer. */ struct evbuffer_file_segment; @@ -572,7 +571,7 @@ struct evbuffer_file_segment; #define EVBUF_FS_DISABLE_MMAP 0x02 /** Flag for creating evbuffer_file_segment: Disable direct fd-to-fd - implementations (including sendfile and splice). + implementations (sendfile). You might want to use this option if data needs to be taken from the evbuffer by any means other than writing it to the network: the sendfile @@ -600,7 +599,7 @@ typedef void (*evbuffer_file_segment_cleanup_cb)( file and sending it out via an evbuffer. This function avoids unnecessary data copies between userland and - kernel. Where available, it uses sendfile or splice. + kernel. Where available, it uses sendfile. The file descriptor must not be closed so long as any evbuffer is using this segment. diff --git a/linux/openssl/ssl/bio_ssl.c b/linux/openssl/ssl/bio_ssl.c index 53129bfb..75c78b9a 100644 --- a/linux/openssl/ssl/bio_ssl.c +++ b/linux/openssl/ssl/bio_ssl.c @@ -451,6 +451,7 @@ BIO *BIO_new_ssl_connect(SSL_CTX *ctx) goto err; return ret; err: + BIO_free(ssl); BIO_free(con); #endif return NULL; diff --git a/lock.json b/lock.json index 0c2be688..e82bf065 100644 --- a/lock.json +++ b/lock.json @@ -1 +1 @@ -{"zlib":"cacf7f1d4e3d44d871b605da3b647f07d718623f","libevent":"8e5e7bb8a82458ba5ac4193d88cef38a3ad6dddb","openssl":"122e5f7c010859f0b2984d553fa45cd1f18a6fc4","tor":"1693b6151e1369ce0938761cac95e7a0a524f5f3"} \ No newline at end of file +{"zlib":"cacf7f1d4e3d44d871b605da3b647f07d718623f","libevent":"d433f847334fff9da8e13e2dc7fdf5c0997b20b0","openssl":"46dc0bca6cd623c42489c57e62c69cf568335664","tor":"1693b6151e1369ce0938761cac95e7a0a524f5f3"} \ No newline at end of file diff --git a/openssl_config/buildinf.macos64.h b/openssl_config/buildinf.macos64.h index 117994fb..e1d76808 100644 --- a/openssl_config/buildinf.macos64.h +++ b/openssl_config/buildinf.macos64.h @@ -11,7 +11,7 @@ */ #define PLATFORM "platform: darwin64-x86_64-cc" -#define DATE "built on: Thu Mar 25 13:28:48 2021 +0000" +#define DATE "built on: Thu Apr 1 15:22:10 2021 +0200" /* * Generate compiler_flags as an array of individual characters. This is a diff --git a/openssl_config/buildinf.x64.h b/openssl_config/buildinf.x64.h index 633b68f5..30853c37 100644 --- a/openssl_config/buildinf.x64.h +++ b/openssl_config/buildinf.x64.h @@ -11,7 +11,7 @@ */ #define PLATFORM "platform: linux-x86_64" -#define DATE "built on: Thu Mar 25 13:28:48 2021 +0000" +#define DATE "built on: Thu Apr 1 15:22:10 2021 +0200" /* * Generate compiler_flags as an array of individual characters. This is a diff --git a/openssl_config/buildinf.x86.h b/openssl_config/buildinf.x86.h index 5497d73b..1f985646 100644 --- a/openssl_config/buildinf.x86.h +++ b/openssl_config/buildinf.x86.h @@ -11,7 +11,7 @@ */ #define PLATFORM "platform: linux-x86" -#define DATE "built on: Thu Mar 25 13:28:48 2021 +0000" +#define DATE "built on: Thu Apr 1 15:22:10 2021 +0200" /* * Generate compiler_flags as an array of individual characters. This is a