1

Hi I am new to OpenSSL so please ignore if its not valid question. I just want to initiate EAP-TLS session between client and server. So, I am using below mentioned command

openssl s_client -connect <ip-address>:<Port-NO> -tls1

and Its working fine but I want same to be happen using c code.

Is there any c code implementation for s_client -connect ??

jww
  • 97,681
  • 90
  • 411
  • 885

1 Answers1

2

Is there any c code implementation for s_client -connect ??

Yes, there is.

Check in <openssl src>/apps/s_client.c. That's the source code for the s_client sub command. Or, visit OpenSSL's openssl/apps/s_client.c.

You can even build s_client as stand alone with symbols so you can step it/debug it in-place. See How to run different 'modes' of a program based on command line parameters?


... EAP-TLS

As for the question on EAP-TLS... I don't think OpenSSL provides it. But I could be wrong.

I looked at the proposed standard a couple of years ago, and its more of a "framework" to plug-in authentication methods over a TLS (or into a TLS) channel. See RFC 5216 (TLS) and RFC 6347 (DTLS).

To use EAP-TLS, you need a "Keying Material Exporter". That's part of RFC 5705. I think the idea is to use your authentication method to produce the premaster_secret or master_secret, and then turn control back over to TLS.

Community
  • 1
  • 1
jww
  • 97,681
  • 90
  • 411
  • 885