1

I have the following code in my program and it calls many functions from the openssl library, e.g. do_hadshake(*ssl), to connect to a server.

 if (SSL_connect(ssl) <= 0) { ... }

What I'm looking for is how to get output on terminal, showing all the operation it is running, e.g. performing public key encryption, private key encryption, etc. What code should I write that will give me such output in a terminal?

I am doing this on Linux Mint.

closed as off-topic by Steffen Ullrich, grochmal, Matthew, Steve, Serge Ballesta Jan 19 '17 at 18:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Information security within the scope defined in the help center." – Steffen Ullrich, grochmal, Matthew, Steve, Serge Ballesta
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Actually, I want to output all the steps in Handhake process , like those hello messages,finish messages, etc.. – dhanu10896 Jan 19 '17 at 11:03
  • 1
    OpenSSL has no such functionality built in but you can use a debugger to get what you want. How to do this is off-topic here but you can see Tool to trace local function calls in Linux for more details. – Steffen Ullrich Jan 19 '17 at 11:32
  • 1
    If you want to see the messages that are being exchanged by your application rather than the function calls, you can attach a packet capture tool like Wireshark, you'll be able to see the handshake. If you also need to dissect the encrypted part, you'll need to tell Wireshark the private key or capture the session key so Wireshark can decrypt the communication (wiki.wireshark.org/SSL). – Lie Ryan Jan 19 '17 at 11:33
  • Is any verbose logging feature is present in openssl – dhanu10896 Jan 19 '17 at 11:35

Browse other questions tagged or ask your own question.