ObjFW  Check-in [716f5721f5]

Overview
Comment:OFGnuTLSTLSStream: Restore old close behavior
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | tls-server
Files: files | file ages | folders
SHA3-256: 716f5721f5394364d5da472ac602a8b00347ab77d72a9105a024f210e2a323a9
User & Date: js on 2024-11-18 23:27:00
Other Links: branch diff | manifest | tags
Context
2024-11-18
23:27
OFGnuTLSTLSStream: Restore old close behavior Leaf check-in: 716f5721f5 user: js tags: tls-server
23:18
OFOpenSSLTLSStream: Add server support check-in: 7636fc0143 user: js tags: tls-server
Changes

Modified src/tls/OFGnuTLSTLSStream.m from [4722d3e575] to [8dbe0324ed].

125
126
127
128
129
130
131



132
133
134
135
136
137
138
139
140
141
142
143
	[_host release];

	[super dealloc];
}

- (void)close
{



	if (_handshakeDone)
		gnutls_bye(_session, GNUTLS_SHUT_WR);

	if (_session != NULL)
		gnutls_deinit(_session);

	if (_credentials != NULL)
		gnutls_certificate_free_credentials(_credentials);

	_session = NULL;
	_credentials = NULL;
	_handshakeDone = false;







>
>
>



<
|







125
126
127
128
129
130
131
132
133
134
135
136
137

138
139
140
141
142
143
144
145
	[_host release];

	[super dealloc];
}

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

	if (_handshakeDone)
		gnutls_bye(_session, GNUTLS_SHUT_WR);


	gnutls_deinit(_session);

	if (_credentials != NULL)
		gnutls_certificate_free_credentials(_credentials);

	_session = NULL;
	_credentials = NULL;
	_handshakeDone = false;