Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mock server for https connection

I have learnt about SSL and SSL certificates used on client and server side. I pretty much understand how things work and have generated server and client certificates and keys. I have studied how can I use my own CA with https in Android.

I want to setup a server where I can put the server certificate and then access it from my android device to make an emulation of what I have learnt so far.

Is there any server available where I just need to put cert and key and it will start working? I have gone through wamp and apache configuration stuff but unfortunately I am unable to make it work properly.

like image 437
mallaudin Avatar asked Nov 25 '25 01:11

mallaudin


1 Answers

If you're using OpenSSL it includes a very simple server named s_server which is very useful for this kind of experimentation. Here's an example that might get you started

$ openssl s_server -key test.key -cert test.crt -accept 8443 -WWW

This will serve up files in the current working directory from https://localhost:8443/

The manpage for s_server should give you all the info you need. I think you'll want the -CApath or -CAfile options if you're also experimenting with client certs.

like image 153
JustATrick Avatar answered Nov 27 '25 13:11

JustATrick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!