>From: owner-openssl-us...@openssl.org On Behalf Of Indtiny s
>Sent: Friday, 17 May, 2013 13:34
>To: openssl-users@openssl.org; openssl-...@openssl.org

Answering users only, this is not a dev question.
        
>I need to write a simple https server using openssl , 
>I need to just receive https post from the client and return response 201. 
>is it possible use s_server code given in the openssl source to implement 
>a simple https server . ? 

Moderately simple, yes. s_server has numerous options and some debugging 
features you probably don't need, but they do you no harm. There are 
already some options and code to handle (some) GET's in a very simplistic 
way, which you could build on.

Be careful not to label or redistribute this as part of openssl;
under the license modified/derived code cannot be attributed to 
(blamed on) the project.
        
>pls through some light on how to write  a simple https server .. 

(Aside: you wanted 'throw')
        
OTOH, a minimal SSL server that just handles one connection and request 
at a time, without the complexity of multithreading or error recovery, 
is probably about 100 lines. (I've done a slightly more complicated one 
for some cases that s_server doesn't cover, in 180 lines.) Do you have 
more than one client (at a time) that needs or wants HTTP 'pipelining' 
(i.e. keep-alive)?

Handling all of HTTP is a very big job (which is why apache nginx IIS 
etc are big) but restricted as you describe it could be quite easy.
You don't say you want to do anything with the data (body) in the POST; 
if you do extracting it is a little work and somewhat more if your 
client(s) are HTTP/1.1 and use chunking (which is client's option).


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to