What is the difference between OpenSSL s_server and an http server? -


the background question trying rid of http/s server component our code base, our needs limited. (we're not looking support full fledged web browsing).

in order not reinvent wheel, searched open source https server component of permissive license able perform correct ssl termination. that's when came across openssl's s_server , s_client.

can me understand if above s_server & s_client enough building blocks https server, assuming right certs in place? sample code or tutorial awesome.

thanks!

this answer job of getting , running.

basically crux of problem passing either -http or -www openssl s_server call:
openssl s_server -key key.pem -cert cert.pem -www

all -http/-www serve "./" in response requests:

 -www          - respond 'get /<path> http/1.0' file./<path>   -http         - respond 'get /<path> http/1.0' file ./<path>                   assumption contains complete http response. 

you're right, can used simple server. might enough serve needs.

from documentation openssl implementation doesn't seem support these features, may miss:

  • returning broad range of mime types
  • serving error codes other 200/404
  • state changes (post etc. requests)
  • dynamic content (although run cron or own application in background updates static files @ intervals)

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -