Re: How to use openssl

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

 



Thanks, Michael,  I will check out SChannel.
Right now I'm attempting to compile sslecho using Microsoft Visual C++.
It's giving me an error which I can't figure out.
I'm guessing that this is because it's C++ instead of C.

int create_socket ()
{
    int s;
    int optval = 1;

    s = socket (AF_INET, SOCK_STREAM, 0);
    if (s < 0) {
        perror("Unable to create socket");
        exit(EXIT_FAILURE);
    }

    return s;
}
  
    int client_skt = -1;

    /* Create "bare" socket */
    client_skt = create_socket;

Error (active) E0513 a value of type "int (*)()" cannot be assigned to an entity of type "int" OpenSSL-Demo  line 152

Error C2440 '=': cannot convert from 'int (__cdecl *)(void)' to 'int' OpenSSL-Demo C:\Users\PapaDon\source\repos\OpenSSL-Demo\OpenSSL-Demo.cpp 152

Don Payette
(cell) 479-216-6320


On Thu, May 18, 2023 at 11:25 AM Michael Wojcik via openssl-users <openssl-users@xxxxxxxxxxx> wrote:
> From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Don Payette
> Sent: Thursday, 18 May, 2023 09:35

> I'm a programmer that is responsible for a Windows Service written in Visual C++.It communicates
> with a server using Winsock. I've been tasked with converting it to use encryption for the connection. 

> Are there any sample programs or any kind of guidance in how to code this?

Robert's questions in his reply are pertinent – "communicates ... using Winsock" could mean a number of things.

But that aside: do you have a requirement to use OpenSSL? Windows includes its own TLS implementation, Microsoft's Schannel, and if you only need to support Windows that is, frankly, probably an easier route. OpenSSL has various advantages, such as portability and flexibility, but if all you need is normal TLS support for Windows only, Schannel will give you a somewhat simpler API (even simpler if you were using .NET) and integration with Windows PKI, which is often more convenient for Windows customers.

It would help to know more about what actual problem you're trying to solve, rather than what technology you think you should use to solve it.

--
Michael Wojcik

[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