The SSL backends that have no random support return CURLE_NOT_BUILT_IN as their 
value for curlssl_random().  This causes vtls.c:Curl_ssl_random() to fail and 
return CURLE_FAILED_INIT, which then causes rand.c:randit() to give up and 
return an error.

Instead, Curl_ssl_random() should check the value of curlssl_random() vs. 
CURLE_NOT_BUILT_IN, and return this code, so that randit() goes on to its 
best-effort random values.

You'll hit this if you POST form data, when formboundary() tries to generate 
the random boundary tag.

I also looked at various back-end implementations of curlssl_random().  Not all 
of them return CURLE_ codes, some return just 0 or 1 (cyassl.c, openssl.c, 
nss.c, schannel.c).  All of them should have the return type be CURLcode 
instead of "int", to make the checking of the return value use the correct 
types.

Sorry I don't have patches available, but hopefully this description makes it 
easy for you to adjust code appropriately.

--
John Kohl <[email protected]>
Software Engineer, ClearCase, HCL Products & Platforms
HCL Technologies



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to