Overview
Comment: | Add OpenSSL support for OFTLSStream |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c9b6dcad9e3c587956d2320cf6784d63 |
User & Date: | js on 2022-01-29 12:38:28 |
Other Links: | manifest | tags |
Context
2022-01-29
| ||
13:03 | GitHub Actions: Fix OpenSSL dependency check-in: 6c175e757a user: js tags: trunk | |
12:38 | Add OpenSSL support for OFTLSStream check-in: c9b6dcad9e user: js tags: trunk | |
2022-01-28
| ||
19:34 | Don't assume EWOULDBLOCK and EAGAIN are the same check-in: d9586ed175 user: js tags: trunk | |
Changes
Modified .github/workflows/ubuntu-18.04-gcc.yml from [5c367daef6] to [56da109a22].
︙ | |||
15 16 17 18 19 20 21 22 23 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + + - + | - --disable-threads --disable-sockets --disable-files - --disable-sockets - --disable-sockets --disable-files - --disable-files - --disable-shared - --disable-shared --enable-seluid24 - --disable-compiler-tls --disable-threads - --with-tls=gnutls - --with-tls=gnutls --disable-shared steps: - name: Install dependencies |
Modified .github/workflows/ubuntu-18.04.yml from [7e1a878af7] to [9b4c4178d8].
︙ | |||
15 16 17 18 19 20 21 22 23 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + + - + | - --disable-threads --disable-sockets --disable-files - --disable-sockets - --disable-sockets --disable-files - --disable-files - --disable-shared - --disable-shared --enable-seluid24 - --disable-compiler-tls --disable-threads - --with-tls=gnutls - --with-tls=gnutls --disable-shared steps: - name: Install dependencies |
Modified .github/workflows/ubuntu-20.04-gcc.yml from [85f0f9bfd8] to [e5c6c9d359].
︙ | |||
15 16 17 18 19 20 21 22 23 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + + - + | - --disable-threads --disable-sockets --disable-files - --disable-sockets - --disable-sockets --disable-files - --disable-files - --disable-shared - --disable-shared --enable-seluid24 - --disable-compiler-tls --disable-threads - --with-tls=gnutls - --with-tls=gnutls --disable-shared steps: - name: Install dependencies |
Modified .github/workflows/ubuntu-20.04.yml from [7679270e9c] to [4fb571b8e0].
︙ | |||
15 16 17 18 19 20 21 22 23 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + + - + | - --disable-threads --disable-sockets --disable-files - --disable-sockets - --disable-sockets --disable-files - --disable-files - --disable-shared - --disable-shared --enable-seluid24 - --disable-compiler-tls --disable-threads - --with-tls=gnutls - --with-tls=gnutls --disable-shared steps: - name: Install dependencies |
Modified configure.ac from [6aceb50f03] to [216e5c2184].
︙ | |||
1540 1541 1542 1543 1544 1545 1546 | 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 | - + | ]) ;; esac AC_ARG_WITH(tls, AS_HELP_STRING([--with-tls], [ enable TLS support using the specified library |
︙ | |||
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | 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 1596 | + + + + + + + + + + + + + + + + | AC_CHECK_FUNCS(SSLCreateContext) ], []) LIBS="$old_LIBS" ]) ]) AS_IF([test x"$with_tls" = x"openssl" \ -o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [ AC_CHECK_LIB(ssl, SSL_set1_host, [ AC_CHECK_HEADER(openssl/ssl.h, [ AC_DEFINE(HAVE_OPENSSL, 1, [Whether we have OpenSSL]) tls_support="OpenSSL" TLS_LIBS="-lssl -lcrypto $TLS_LIBS" AC_SUBST(OF_OPENSSL_TLS_STREAM_M, "OFOpenSSLTLSStream.m") ]) ], [], [-lcrypto]) ]) AS_IF([test x"$with_tls" = x"gnutls" \ -o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [ PKG_CHECK_MODULES(gnutls, [gnutls >= 3.5.0], [ AC_DEFINE(HAVE_GNUTLS, 1, [Whether we have GnuTLS]) tls_support="GnuTLS" |
︙ | |||
1610 1611 1612 1613 1614 1615 1616 | 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 | - - + + | AS_IF([test x"$build_framework" = x"yes"], [ AC_SUBST(OBJFWTLS_FRAMEWORK, "ObjFWTLS.framework") ]) ]) AS_IF([test x"$with_tls" != x"no" -a x"$tls_support" = x"no"], [ AC_MSG_ERROR(m4_normalize([ |
︙ |
Modified extra.mk.in from [6c0d42a079] to [8ae8820dcd].
︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + | 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_GNUTLS_TLS_STREAM_M = @OF_GNUTLS_TLS_STREAM_M@ OF_HTTP_CLIENT_TESTS_M = @OF_HTTP_CLIENT_TESTS_M@ OF_KQUEUE_KERNEL_EVENT_OBSERVER_M = @OF_KQUEUE_KERNEL_EVENT_OBSERVER_M@ OF_OPENSSL_TLS_STREAM_M = @OF_OPENSSL_TLS_STREAM_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@ OF_SUBPROCESS_M = @OF_SUBPROCESS_M@ REEXPORT_RUNTIME = @REEXPORT_RUNTIME@ REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@ RUNTIME = @RUNTIME@ |
︙ |
Modified src/tls/Makefile from [10f7a323a1] to [a6c2c67827].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + | include ../../extra.mk DISTCLEAN = Info.plist SHARED_LIB = ${OBJFWTLS_SHARED_LIB} STATIC_LIB = ${OBJFWTLS_STATIC_LIB} FRAMEWORK = ${OBJFWTLS_FRAMEWORK} LIB_MAJOR = ${OBJFW_LIB_MAJOR} LIB_MINOR = ${OBJFW_LIB_MINOR} INCLUDES := ObjFWTLS.h SRCS = ${OF_GNUTLS_TLS_STREAM_M} \ ${OF_OPENSSL_TLS_STREAM_M} \ ${OF_SECURE_TRANSPORT_TLS_STREAM_M} includesubdir = ObjFWTLS include ../../buildsys.mk CPPFLAGS += -I. -I.. -I../.. -I../exceptions -I../runtime ${TLS_CPPFLAGS} LD = ${OBJC} FRAMEWORK_LIBS := ${TLS_LIBS} -F.. -framework ObjFW ${LIBS} LIBS := ${TLS_LIBS} -L.. -lobjfw -L../runtime ${RUNTIME_LIBS} ${LIBS} |
Modified src/tls/OFGnuTLSTLSStream.m from [c3efe28992] to [02a55ce27d].
︙ | |||
241 242 243 244 245 246 247 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + - + + + - - | if (status == GNUTLS_E_INTERRUPTED || status == GNUTLS_E_AGAIN) { if (gnutls_record_get_direction(_session) == 1) [_underlyingStream asyncWriteData: [OFData dataWithItems: "" count: 0] runLoopMode: runLoopMode]; else |
︙ | |||
287 288 289 290 291 292 293 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | - + + + - - | [_underlyingStream asyncWriteData: data runLoopMode: runLoopMode]; return false; } else return true; } |
︙ | |||
323 324 325 326 327 328 329 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | - + - + + + - - | status == GNUTLS_E_AGAIN) { if (gnutls_record_get_direction(_session) == 1) return data; else { OFRunLoopMode runLoopMode = [OFRunLoop currentRunLoop].currentMode; [_underlyingStream |
Added src/tls/OFOpenSSLTLSStream.h version [0eefaf6836].
|
Added src/tls/OFOpenSSLTLSStream.m version [57c472352b].