[openssl-users] Return type of SSL_ctrl
Jeremy Farrell
jeremy.farrell at oracle.com
Wed Nov 30 18:24:56 UTC 2016
On 30/11/2016 17:38, Ludwig, Mark wrote:
>> From: Salz, Rich, Wednesday, November 30, 2016 9:38 AM
>>
>>> We're moving up to OpenSSL 1.0.2j from OpenSSL 0.9.8<something>, and
>>> noticed that the SSL functions based on SSL_ctrl() changed from returning type int to returning type long.
>> The "proper" answer is to not use long, but rather sized types, which we are slowly moving toward.
> Funny you should mention this, because this topic arose
> internally after someone decided to change the return type
> of SSL_ctrl() to intprt_t. I have no idea why, since as far
> as I can tell, all of the return values would fit in a
> 32-bit integer; thus my question about why it was changed to
> long, which is either 32 bits or 64 bits, depending on
> platform. I suspect it was the use of long that tricked someone
> into thinking it might be holding a pointer, and thus led to the
> change to intptr_t, so it would fit on Windows. (Blind/stupid
> global replacement.)
>
> (Does OpenSSL support any platform in which type int is 16 bits?)
Some confusion here. SSL_ctrl() was defined as returning long in 0.9.8a,
and from what (little) I can see it looks like it was that way back in
0.6.4.
Regards,
jjf
--
J. J. Farrell
Not speaking for Oracle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20161130/e1338482/attachment.html>
More information about the openssl-users
mailing list