Re: [PATCH] OpenSSL: Mark underlying BIO with the appropriate type flags
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Itamar Gafni <itamar.gafni@imperva.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-08-09T15:35:59Z
Lists: 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 then its 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 socket type, 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/
Commits
-
Set type identifier on BIO
- 0a88d4ece83c 9.6.24 landed
- ed209db778b4 12.9 landed
- e15f32f0edf6 13.5 landed
- ef7e24ff7fc3 10.19 landed
- f1d5a94fc738 11.14 landed
- b88377ad65df 14.0 landed
- 31f860a52bf9 15.0 landed