2

I'm currently writing a client program on Linux Ubuntu 16.04. I want to use OpenSSL to secure communication. But I get this error when I use gcc to complie my source code:

$gcc -o client1 client.c -lssl -lcrypto

"undefined reference to "TLSv1_3_client method"

image

The version of my OpenSSL is 1.1.1d:

image

How can I solve this ?

1 Answer 1

4

There is no TLSv1_3_client_method. And even the older TLSv1_2_client_method and similar are documented as deprecated. Instead you should use TLS_client_method which will also support TLS 1.3. If you want to restrict support to only TLS 1.3 you need to use SSL_CTX_set_options and similar with SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_1, ...

1
  • 2
    Your anwser give me a clear clue to solve my problem.From the manual page,I found it more convenient to restrict support to only TLS1.3 by using the method SSL_CTX_set_max_proto_version() and similar.
    – jiayaomin
    Sep 29, 2019 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.