Comment: | Move TLS implementations to a separate library
These implementations all depend on additional libraries that are |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8f8af474fc841b8f4f25e6f031203642 |
User & Date: | js on 2021-11-20 13:18:28 |
Other Links: | manifest | tags |
2021-11-21
| ||
00:30 | Add OFGnuTLSTLSStream check-in: 6b4dd1f24f user: js tags: trunk | |
2021-11-20
| ||
13:18 | Move TLS implementations to a separate library check-in: 8f8af474fc user: js tags: trunk | |
2021-11-19
| ||
22:54 | OFApplication: Always store argc and argv check-in: 2ca00fefff user: js tags: trunk | |
Modified .fossil-settings/clean-glob from [436c792c19] to [0c0ff942fb].
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/objc_sync/objc_sync tests/plugin/Info.plist tests/terminal/terminal_tests |
︙ |
Modified .fossil-settings/ignore-glob from [5da8718334] to [13af81fd69].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata |
︙ |
Modified .gitignore from [0c715f3134] to [fdb1296647].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | generators/unicode/gen_tables src/Info.plist src/bridge/Info.plist src/libobjfw.* src/objfw-defs.h src/runtime/Info.plist src/runtime/libobjfwrt.* src/tls/Info.plist tests/DerivedData tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace tests/iOS.xcodeproj/xcuserdata |
︙ |
Modified configure.ac from [fc419f2924] to [58ceb289a0].
︙ | |||
1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 | 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 | + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + | [Whether we have select() or similar]) AC_SUBST(OF_SELECT_KERNEL_EVENT_OBSERVER_M, "OFSelectKernelEventObserver.m") ]) ;; esac tls_support="no" AC_CHECK_HEADERS(Security/SecureTransport.h, [ old_LIBS="$LIBS" LIBS="-framework Security -framework Foundation $LIBS" AC_CHECK_FUNC(SSLHandshake, [ AC_DEFINE(HAVE_SECURE_TRANSPORT, 1, [Whether we have Secure Transport]) tls_support="securetransport" TLS_LIBS="-framework Foundation $TLS_LIBS" TLS_LIBS="-framework Security $TLS_LIBS" AC_SUBST(OF_SECURE_TRANSPORT_TLS_STREAM_M, "OFSecureTransportTLSStream.m") |
︙ |
Modified extra.mk.in from [7c71ab8e5d] to [2a414d1767].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + + + + | OBJFWRT_LIB_MINOR = 0 OBJFWRT_LIB_MAJOR_MINOR = ${OBJFWRT_LIB_MAJOR}.${OBJFWRT_LIB_MINOR} OBJFWBRIDGE_SHARED_LIB = @OBJFWBRIDGE_SHARED_LIB@ OBJFWBRIDGE_STATIC_LIB = @OBJFWBRIDGE_STATIC_LIB@ OBJFWBRIDGE_FRAMEWORK = @OBJFWBRIDGE_FRAMEWORK@ OBJFWTLS_SHARED_LIB = @OBJFWTLS_SHARED_LIB@ OBJFWTLS_STATIC_LIB = @OBJFWTLS_STATIC_LIB@ OBJFWTLS_FRAMEWORK = @OBJFWTLS_FRAMEWORK@ BIN_PREFIX = @BIN_PREFIX@ BRIDGE = @BRIDGE@ CVINCLUDE_INLINE_H = @CVINCLUDE_INLINE_H@ ENCODINGS_A = @ENCODINGS_A@ ENCODINGS_LIB_A = @ENCODINGS_LIB_A@ ENCODINGS_SRCS = @ENCODINGS_SRCS@ EXCEPTIONS_A = @EXCEPTIONS_A@ |
︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + | LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@ MAP_LDFLAGS = @MAP_LDFLAGS@ OBJC_SYNC = @OBJC_SYNC@ OFARC = @OFARC@ OFDNS = @OFDNS@ OFHASH = @OFHASH@ OFHTTP = @OFHTTP@ OFHTTP_LIBS = @OFHTTP_LIBS@ OF_BLOCK_TESTS_M = @OF_BLOCK_TESTS_M@ OF_EPOLL_KERNEL_EVENT_OBSERVER_M = @OF_EPOLL_KERNEL_EVENT_OBSERVER_M@ OF_HTTP_CLIENT_TESTS_M = @OF_HTTP_CLIENT_TESTS_M@ OF_KQUEUE_KERNEL_EVENT_OBSERVER_M = @OF_KQUEUE_KERNEL_EVENT_OBSERVER_M@ OF_POLL_KERNEL_EVENT_OBSERVER_M = @OF_POLL_KERNEL_EVENT_OBSERVER_M@ OF_SECURE_TRANSPORT_TLS_STREAM_M = @OF_SECURE_TRANSPORT_TLS_STREAM_M@ OF_SELECT_KERNEL_EVENT_OBSERVER_M = @OF_SELECT_KERNEL_EVENT_OBSERVER_M@ |
︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + + | SFDC_INLINE_H = @SFDC_INLINE_H@ SFDC_TARGET = @SFDC_TARGET@ SFD_FILE = @SFD_FILE@ TESTPLUGIN = @TESTPLUGIN@ TESTPLUGIN_LIBS = @TESTPLUGIN_LIBS@ TESTS_LIBS = @TESTS_LIBS@ TESTS_STATIC_LIB = @TESTS_STATIC_LIB@ TLS = @TLS@ TLS_LIBS = @TLS_LIBS@ UNICODE_M = @UNICODE_M@ USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@ USE_SRCS_FILES = @USE_SRCS_FILES@ USE_SRCS_IPX = @USE_SRCS_IPX@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ USE_SRCS_UNIX_SOCKETS = @USE_SRCS_UNIX_SOCKETS@ USE_SRCS_WINDOWS = @USE_SRCS_WINDOWS@ WRAPPER = @WRAPPER@ |
Modified src/Makefile from [d600f2be16] to [28e2acebcc].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 | - + | include ../extra.mk SUBDIRS = ${RUNTIME} exceptions encodings forwarding |
︙ | |||
212 213 214 215 216 217 218 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - | ${OF_EPOLL_KERNEL_EVENT_OBSERVER_M} \ OFHTTPURLHandler.m \ OFHostAddressResolver.m \ OFIPSocketAsyncConnector.m \ OFKernelEventObserver.m \ ${OF_KQUEUE_KERNEL_EVENT_OBSERVER_M} \ ${OF_POLL_KERNEL_EVENT_OBSERVER_M} \ |
︙ |
Modified src/OFTLSStream.m from [6023c3c0c6] to [ab25ba8801].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - - - + + + + + + + + + + + | * file. */ #include "config.h" #import "OFTLSStream.h" #import "OFDate.h" |
︙ | |||
70 71 72 73 74 75 76 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - - - - | + (instancetype)alloc { if (self == [OFTLSStream class]) { if (OFTLSStreamImplementation != Nil) return [OFTLSStreamImplementation alloc]; |
︙ |
Modified src/exceptions/OFTLSHandshakeFailedException.h from [b1f02c3e16] to [2a93bfd9df].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | + + + + + + + + | #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif #import "OFTLSStream.h" OF_ASSUME_NONNULL_BEGIN #ifdef __cplusplus extern "C" { #endif extern int _OFTLSHandshakeFailedException_reference; #ifdef __cplusplus } #endif /** * @class OFTLSHandshakeFailedException \ * OFTLSHandshakeFailedException.h ObjFW/OFTLSHandshakeFailedException.h * * @brief An exception indicating that a TLS handshake. */ |
︙ |
Modified src/exceptions/OFTLSHandshakeFailedException.m from [2e553f0270] to [ba4934a59a].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + | * file. */ #include "config.h" #import "OFTLSHandshakeFailedException.h" #import "OFString.h" int _OFTLSHandshakeFailedException_reference; @implementation OFTLSHandshakeFailedException @synthesize stream = _stream, host = _host, errorCode = _errorCode; + (instancetype)exception { OF_UNRECOGNIZED_SELECTOR |
︙ |
Added src/tls/Info.plist.in version [06bf405764].
|
Added src/tls/Makefile version [5f1b91e61e].
|
Renamed and modified src/OFSecureTransportTLSStream.h [af37f6a50a] to src/tls/OFSecureTransportTLSStream.h [17d015ed90].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFTLSStream.h" OF_ASSUME_NONNULL_BEGIN extern int _OFSecureTransportTLSSocket_reference; @interface OFSecureTransportTLSStream: OFTLSStream <OFStreamDelegate> { struct SSLContext *_context; OFString *_host; } @end OF_ASSUME_NONNULL_END |
Renamed and modified src/OFSecureTransportTLSStream.m [6a4157afd5] to src/tls/OFSecureTransportTLSStream.m [ce137cf9dc].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + | #import "OFAlreadyConnectedException.h" #import "OFNotOpenException.h" #import "OFReadFailedException.h" #import "OFTLSHandshakeFailedException.h" #import "OFWriteFailedException.h" int _ObjFWTLS_reference; static OSStatus readFunc(SSLConnectionRef connection, void *data, size_t *dataLength) { bool incomplete; size_t length = [((OFTLSStream *)connection).wrappedStream readIntoBuffer: data length: *dataLength]; |
︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | + + + + + + | * Apple deprecated Secure Transport without providing a replacement that can * work with any socket. On top of that, their replacement, Network.framework, * doesn't support STARTTLS at all. */ #pragma GCC diagnostic ignored "-Wdeprecated" @implementation OFSecureTransportTLSStream + (void)load { if (OFTLSStreamImplementation == Nil) OFTLSStreamImplementation = self; } - (instancetype)initWithStream: (OFStream <OFReadyForReadingObserving, OFReadyForWritingObserving> *)stream { self = [super initWithStream: stream]; @try { _wrappedStream.delegate = self; |
︙ |
Added src/tls/ObjFWTLS.h version [27a8607d66].
|
Modified utils/ofhttp/Makefile from [54490626b4] to [a12779af52].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + - + | PACKAGE_NAME = ofhttp ${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2} CPPFLAGS += -I../../src \ -I../../src/runtime \ -I../../src/exceptions \ -I../../src/tls \ -I../.. \ -DLANGUAGE_DIR='"${datadir}/ofhttp/lang"' \ -DLIB_PREFIX='"${LIB_PREFIX}"' \ -DLIB_SUFFIX='"${LIB_SUFFIX}"' |
Modified utils/ofhttp/OFHTTP.m from [6bac196b77] to [1e6fb1a87b].
︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + + + + | #endif #import "OFSandbox.h" #import "OFStdIOStream.h" #import "OFSystemInfo.h" #import "OFTCPSocket.h" #import "OFTLSStream.h" #import "OFURL.h" #ifdef HAVE_TLS_SUPPORT # import "ObjFWTLS.h" #endif #import "OFConnectionFailedException.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFInvalidServerReplyException.h" #import "OFOpenItemFailedException.h" |
︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + + + + + + + + | OFStream *_output; unsigned long long _received, _length, _resumedFrom; ProgressBar *_progressBar; } - (void)downloadNextURL; @end #ifdef HAVE_TLS_SUPPORT void _reference_to_ObjFWTLS(void) { _ObjFWTLS_reference = 1; } #endif OF_APPLICATION_DELEGATE(OFHTTP) static void help(OFStream *stream, bool full, int status) { [OFStdErr writeLine: |
︙ |