Re: [PATCH] OpenSSL: Mark underlying BIO with the appropriate type flags - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [PATCH] OpenSSL: Mark underlying BIO with the appropriate type flags
Date
Msg-id A42F07AB-EA0F-4D9A-9EE8-8C3DBD9EAA24@yesql.se
Whole thread Raw
In response to [PATCH] OpenSSL: Mark underlying BIO with the appropriate type flags  (Itamar Gafni <itamar.gafni@imperva.com>)
Responses RE: [PATCH] OpenSSL: Mark underlying BIO with the appropriate type flags  (Itamar Gafni <itamar.gafni@imperva.com>)
List pgsql-hackers
> On 6 Aug 2021, at 12:16, Itamar Gafni <itamar.gafni@imperva.com> wrote:

> Previous to OpenSSL version 1.1.0, the BIO methods object would be copied directly from the existing socket type and
thenits read\write functions would be replaced. 
> With 1.1.0 and up, the object is created from scratch and then all its methods are initialized to be the ones of the
sockettype, except read/write which are custom. 
> In this newer way, a new type is given to it by calling “BIO_get_new_index”, but the related type flags aren’t added.

According to the documentation (I haven't tested it yet but will) I think you
are right that the type should be set with the appropriate BIO_TYPE_ flags.

For OpenSSL 1.0.1 and 1.0.2, wouldn't we need to set the .type with a randomly
chosen index anded with BIO_TYPE_DESCRIPTOR and BIO_TYPE_SOURCE_SINK as well?

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: Nitin Jadhav
Date:
Subject: Re: when the startup process doesn't (logging startup delays)
Next
From: Mark Dilger
Date:
Subject: Re: Added schema level support for publication.