1

a client send data to a server over a ssl-encrypted connection. i want to know which certificates are used. (server want a client-certificate)

to got the server certificate with:

openssl s_client -connect 192.168.254.208:40004 </dev/null 2>/dev/null | openssl x509 -outform PEM > cert.pem

but how to get the client-cert?

ist this possible with openssl s_server?

or can I use a simple python ssl-socket? (i have access to the certificates and keys from the server.) I only want to know which certificate the client sends.

2 Answers 2

1

is this possible with openssl s_server?

Start a test server which requires a client certificate. The certificate send by the client is shown as PEM in the server output:

openssl s_server -cert ... -verify 2

can I use a simple python ssl-socket

The peer_certificate method can not only be used by the client to get the server certificate but also by the server to get the client certificate.

1

For a safe communication to occur between server and client , SSL /TLS is used , where before transmitting actual data a secure channel is established thereafter everything transmitted or received is encrypted with symmetric encryption keys

outline is , the key required is dynamically derived by the process wherein both parties who want to talk, contributes in key derivation so it is required that both parties authenticate each other via some standard and universal mean .

so SSL handshake occurs where one or both parties exchange there certificate

Now it depends on your application that whether you explicitly trust and allow SELF signed certificate.. which you can very well get via tools like openssl . otherwise a certificate is needed from trusted CA

which is provided by a lot of vendors

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .