usage of SSL_read() and SSL_write() for file transfer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

usage of SSL_read() and SSL_write() for file transfer

Roushan Ara
Hi All,
currently i am using openssl for client and server communication for file transfer. i am facing some issue regarding the writing the content of file.my requirement is i have to send the whole content of some specified file to server for that i am using SSL_write(). i can achieve this using SSL_write() in a while loop but my requirement is i have to use single SSL_write() for sending whole content of file and single SSL_read  at the server to receive the whole content of the file.because in that message itself we  have to specify some id so that it can be identified at the server to indicate that it is file reading. so i need to send single message with full content of file in a buffer. because of the maximum limitation of SSL_write() we are not able to send more than 16384 bytes.
Could somebody suggest s how can i use SSL_write() for the writing the whole content of text file in a single message without using any while loop.

Thanks in Advance.


Thanks & Regards,
Roushan Ara



Please consider the Environment before printing this e-mail.

The information contained in this message (including any attachments) is confidential and may be privileged or otherwise protected from disclosure.  If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person.  If you have received this transmission in error, please notify the sender immediately by return e-mail and permanently delete this message and any attachments from your system.  Any dissemination, use, review, distribution, printing or copying of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change.
 
SKANRAY(including its group of companies) shall not be liable for any omission or error in the message, improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system.  SKANRAY(or its group of companies) does not guarantee that the integrity of this communication has been maintained or that this communication is free of viruses, interceptions or interference.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: usage of SSL_read() and SSL_write() for file transfer

Viktor Dukhovni


> On Feb 1, 2018, at 11:42 PM, Roushan Ara <[hidden email]> wrote:
>
> currently i am using openssl for client and server communication for file transfer. i am facing some issue regarding the writing the content of file.my requirement is i have to send the whole content of some specified file to server for that i am using SSL_write(). i can achieve this using SSL_write() in a while loop but my requirement is i have to use single SSL_write() for sending whole content of file and single SSL_read  at the server to receive the whole content of the file.because in that message itself we  have to specify some id so that it can be identified at the server to indicate that it is file reading. so i need to send single message with full content of file in a buffer. because of the maximum limitation of SSL_write() we are not able to send more than 16384 bytes.
> Could somebody suggest s how can i use SSL_write() for the writing the whole content of text file in a single message without using any while loop.

Your simplest solution is to use HTTP POST over SSL to create the
illusion of a single message layered over a underlying reliable
bytestream.  Don't write your own code, consider using libcurl
or an HTTPS library that best meets your needs.

--
        Viktor.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: usage of SSL_read() and SSL_write() for file transfer

OpenSSL - User mailing list
In reply to this post by Roushan Ara

The TLS protocol puts limits on how much application data can appear in a single record.  Without knowing all the details, that seems like a very silly requirement.  There is no security reason for it.


--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users