[gnutls-devel] GnuTLS | ktls: basic implementation of SW mode (!1451)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Jul 19 11:13:00 CEST 2021



Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/1451 was reviewed by Daiki Ueno

--
  
Daiki Ueno started a new discussion on lib/system/ktls.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1451#note_629865974

> +#include "config.h"

Please add license header.

--
  
Daiki Ueno started a new discussion on lib/system/ktls.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1451#note_629865983

> +		*record_type = *((unsigned char *)CMSG_DATA(hdr));
> +	} else {
> +		*record_type = 23;

Let's use `GNUTLS_APPLICATION_DATA` instead of hard coding 23.

--
  
Daiki Ueno started a new discussion on lib/system/ktls.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1451#note_629865990

> +
> +int _gnutls_ktls_enable(gnutls_session_t session){
> +	return 0;

In this part, we could return `GNUTLS_E_UNIMPLEMENTED_FEATURE`.

--
  
Daiki Ueno started a new discussion on lib/system/ktls.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1451#note_629865996

> +		(sockin != sockout &&
> +		setsockopt (sockout, SOL_TCP, TCP_ULP, "tls", sizeof ("tls")) < 0)) {
> +		return 0;

Let's return a meaningful error instead of 0 or 1. I.e., return 0 on success, `GNUTLS_E_*` on failure.

--
  
Daiki Ueno started a new discussion on lib/system/ktls.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1451#note_629866000

> +	gnutls_transport_get_int2 (session, &sockin, &sockout);
> +
> +	while (data_size > 0) {

I guess this would need a bit more thinking, so it works also in a non-blocking mode. Maybe we eventually need a send (and receive) queue in session, using the `mbuffer_st` stuff.


-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1451
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210719/9b0a54b2/attachment-0001.html>


More information about the Gnutls-devel mailing list