Re: problem with my code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 18, 2020 at 12:00:33PM +0200, Attila Csosz wrote:

>  err = connect(sd, (struct sockaddr*) &sa, sizeof(sa));
> 
>  // Create SSL context
>  meth = SSLv23_server_method();

Have you tried SSLv23_client_method()?  Your application is a TLS
client, not a TLS server...

>  if (!meth) throw Exception("SSL: method");
>  ctx = SSL_CTX_new(meth);
>  if (!meth) throw Exception("SSL: context");
>  ssl = SSL_new(ctx);
>  if (!ssl) throw Exception("SSL: ssl");
>  SSL_set_fd(ssl, sd);
> 
>  // Connect
>  err = SSL_connect(ssl);
>  if (err == -1) throw Exception("SSL: SSL_connect");

-- 
    Viktor.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux