ObjFW  Check-in [6dc94f286a]

Overview
Comment:OFTLSStream: Ensure shutdown is sent with OpenSSL
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 6dc94f286aa19977ff09ef1c89dc971ea751f6e7c19a0577c204324ad0b03924
User & Date: js on 2024-11-18 23:32:40
Other Links: manifest | tags
Context
2024-11-18
23:33
OFTLSStream: Ensure shutdown is sent with OpenSSL check-in: 957527d55e user: js tags: 1.2
23:32
OFTLSStream: Ensure shutdown is sent with OpenSSL Leaf check-in: 6dc94f286a user: js tags: trunk
23:27
GitHub Actions: Remove macOS 12 check-in: 440797fc87 user: js tags: trunk
Changes

Modified src/tls/OFOpenSSLTLSStream.m from [eaf4116fbc] to [4f0885eb41].

128
129
130
131
132
133
134
135

136










137
138
139
140
141
142
143
128
129
130
131
132
133
134

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153







-
+

+
+
+
+
+
+
+
+
+
+







}

- (void)close
{
	if (_SSL == NULL)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (_handshakeDone)
	if (_handshakeDone) {
		SSL_shutdown(_SSL);

		while (BIO_ctrl_pending(_writeBIO) > 0) {
			int tmp = BIO_read(_writeBIO, _buffer, bufferSize);

			OFEnsure(tmp >= 0);

			[_underlyingStream writeBuffer: _buffer length: tmp];
			[_underlyingStream flushWriteBuffer];
		}
	}

	SSL_free(_SSL);
	_SSL = NULL;

	_handshakeDone = false;

	[_host release];