<div dir="ltr">Thanks, Michael,  I will check out SChannel.<div>Right now I'm attempting to compile sslecho using Microsoft Visual C++.</div><div>It's giving me an error which I can't figure out.</div><div>I'm guessing that this is because it's C++ instead of C.</div><div><br></div><div>int create_socket ()<br></div>{<br>    int s;<br>    int optval = 1;<br><br>    s = socket (AF_INET, SOCK_STREAM, 0);<br>    if (s < 0) {<br>        perror("Unable to create socket");<br>        exit(EXIT_FAILURE);<br>    }<br><br>    return s;<br>}<br><div>  <br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>    int client_skt = -1;<br></div><div><br></div>    /* Create "bare" socket */<br>    client_skt = create_socket;</div><div dir="ltr"><br></div><div>Error (active) E0513 a value of type "int (*)()" cannot be assigned to an entity of type "int" OpenSSL-Demo  line 152</div><div><br></div><div dir="ltr">Error        C2440   '=': cannot convert from 'int (__cdecl *)(void)' to 'int'       OpenSSL-Demo    C:\Users\PapaDon\source\repos\OpenSSL-Demo\OpenSSL-Demo.cpp     152     <br><div><div style="font-size:12.8px"><div style="font-size:12.8px"><font face="monospace, monospace"><br></font></div><div style="font-size:12.8px"><font face="monospace, monospace">Don Payette</font></div><div style="font-size:12.8px"><span style="font-family:monospace,monospace;font-size:small">(cell) <a href="tel:(479)%20216-6320" value="+14792166320" style="color:rgb(17,85,204)" target="_blank">479-216-6320</a></span></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 18, 2023 at 11:25 AM Michael Wojcik via openssl-users <<a href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From: openssl-users <<a href="mailto:openssl-users-bounces@openssl.org" target="_blank">openssl-users-bounces@openssl.org</a>> On Behalf Of Don Payette<br>
> Sent: Thursday, 18 May, 2023 09:35<br>
<br>
> I'm a programmer that is responsible for a Windows Service written in Visual C++.It communicates<br>
> with a server using Winsock. I've been tasked with converting it to use encryption for the connection. <br>
<br>
> Are there any sample programs or any kind of guidance in how to code this?<br>
<br>
Robert's questions in his reply are pertinent – "communicates ... using Winsock" could mean a number of things.<br>
<br>
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.<br>
<br>
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.<br>
<br>
-- <br>
Michael Wojcik<br>
</blockquote></div>