Overview
Comment: | Remove TLS server support
The current API is too tied to OpenSSL. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a5a3047210f9b3e94444cecb2ef605c9 |
User & Date: | js on 2021-11-05 22:42:16 |
Other Links: | manifest | tags |
Context
2021-11-06
| ||
00:10 | Make OFTLSSocket an abstract class check-in: 34cb121dc5 user: js tags: trunk | |
2021-11-05
| ||
22:42 | Remove TLS server support check-in: a5a3047210 user: js tags: trunk | |
10:49 | Send OFApplicationWillTerminateNotification check-in: 7eadd67c57 user: js tags: trunk | |
Changes
Modified src/OFHTTPServer.h from [78f35135ae] to [7d3f688295].
︙ | ︙ | |||
89 90 91 92 93 94 95 | * @brief A class for creating a simple HTTP server inside of applications. */ OF_SUBCLASSING_RESTRICTED @interface OFHTTPServer: OFObject { OFString *_Nullable _host; uint16_t _port; | < < < | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | * @brief A class for creating a simple HTTP server inside of applications. */ OF_SUBCLASSING_RESTRICTED @interface OFHTTPServer: OFObject { OFString *_Nullable _host; uint16_t _port; id <OFHTTPServerDelegate> _Nullable _delegate; OFString *_Nullable _name; OFTCPSocket *_Nullable _listeningSocket; #ifdef OF_HAVE_THREADS size_t _numberOfThreads, _nextThreadIndex; OFArray *_threadPool; #endif |
︙ | ︙ | |||
117 118 119 120 121 122 123 | * @brief The port on which the HTTP server will listen. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property (nonatomic) uint16_t port; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | * @brief The port on which the HTTP server will listen. * * Setting this after @ref start has been called raises an * @ref OFAlreadyConnectedException. */ @property (nonatomic) uint16_t port; /** * @brief The delegate for the HTTP server. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) id <OFHTTPServerDelegate> delegate; #ifdef OF_HAVE_THREADS |
︙ | ︙ |
Modified src/OFHTTPServer.m from [d1a692f4d4] to [48c91c9511].
︙ | ︙ | |||
807 808 809 810 811 812 813 | } - (uint16_t)port { return _port; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | } - (uint16_t)port { return _port; } #ifdef OF_HAVE_THREADS - (void)setNumberOfThreads: (size_t)numberOfThreads { if (numberOfThreads == 0) @throw [OFInvalidArgumentException exception]; if (_listeningSocket != nil) |
︙ | ︙ | |||
895 896 897 898 899 900 901 | if (_host == nil) @throw [OFInvalidArgumentException exception]; if (_listeningSocket != nil) @throw [OFAlreadyConnectedException exception]; | < < < < < < < < < < < < < | < | 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 | if (_host == nil) @throw [OFInvalidArgumentException exception]; if (_listeningSocket != nil) @throw [OFAlreadyConnectedException exception]; _listeningSocket = [[OFTCPSocket alloc] init]; _port = [_listeningSocket bindToHost: _host port: _port]; [_listeningSocket listen]; #ifdef OF_HAVE_THREADS if (_numberOfThreads > 1) { OFMutableArray *threads = [OFMutableArray arrayWithCapacity: _numberOfThreads - 1]; |
︙ | ︙ |
Modified src/OFTLSSocket.h from [9df190e90e] to [d519c5a780].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * file. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 | * file. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN /** * @protocol OFTLSSocket OFTLSSocket.h ObjFW/OFTLSSocket.h * * @brief A protocol that should be implemented by 3rd-party libraries * implementing TLS. */ @protocol OFTLSSocket /** * @brief Whether certificates are verified. * * The default is enabled. */ @property (nonatomic) bool verifiesCertificates; /** * @brief Initializes the TLS socket with the specified TCP socket as its * underlying socket. * * @param socket The TCP socket to use as underlying socket */ - (instancetype)initWithSocket: (OFTCPSocket *)socket; @end OF_ASSUME_NONNULL_END |