Patch attached. This is a mechanical change. BIO_new takes a non-const BIO_METHOD and the various BIO_METHODs defined in the library are also non-const, so they don't get placed in .rodata.
The change to BIO_new and the BIO struct should be source-compatible.
Fixing the in-library BIO_METHODs is not. This will work as-is:
BIO *bio = BIO_new(BIO_s_mem());
This will not:
BIO_METHOD *method = BIO_s_mem();
BIO *bio = BIO_new(method);
(method would have to be const.)
If this is a concern, I can split out just the BIO_new change (so that
external BIO_METHODs may be const without requiring casts). It would be
nice to put the in-library BIOs in .rodata too, but then functions like
BIO_s_mem would need to cast away const-ness internally. Happy to switch it
to whichever is preferable.
David
--
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4460
Please log in as guest with password guest if prompted
0001-BIO_METHODs-should-be-const.patch
Description: Binary data
-- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
