bilal_azam
bilal_azam

Reputation: 4800

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.

Upvotes: 3

Views: 3920

Answers (1)

JustATrick
JustATrick

Reputation: 515

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.

Upvotes: 2

Related Questions